diff --git a/creating-my-web.html b/creating-my-web.html index 8c896af..c51b711 100644 --- a/creating-my-web.html +++ b/creating-my-web.html @@ -139,9 +139,13 @@ clone and deploy it easily like this:

https://github.com/balkian/balkian.github.com cd balkian.github.com jekyll serve -w -

I will keep updating this post with information about: * Some Jekyll -plugins that might be useful * What CSS tricks I learnt * The webfonts -I used * The badge on the left side of the page

+

I will keep updating this post with information about:

+ diff --git a/feeds/all.atom.xml b/feeds/all.atom.xml index 8d2c31c..aee2170 100644 --- a/feeds/all.atom.xml +++ b/feeds/all.atom.xml @@ -213,11 +213,22 @@ memorability over describing the functionality.</p> </div> <div class="section" id="create-a-pypirc-configuration-file"> <h2>Create a .pypirc configuration file</h2> -<pre class="code cfg literal-block"> -<span class="err">[distutils]</span> <span class="c1"># this tells distutils what package indexes you can push to</span> -<span class="na">index-servers</span> <span class="o">=</span><span class="s"> - pypi # the live PyPI - pypitest # test PyPI</span> +<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +10 +11 +12 +13</pre></div></td><td class="code"><div class="highlight"><pre><span class="err">[distutils]</span> <span class="c1"># this tells distutils what package indexes you can push to</span> +<span class="na">index-servers</span> <span class="o">=</span><span class="s"></span> +<span class="s"> pypi # the live PyPI</span> +<span class="s"> pypitest # test PyPI</span> <span class="err">[pypi]</span> <span class="c1"># authentication details for live PyPI</span> <span class="na">repository</span> <span class="o">=</span> <span class="s">https://pypi.python.org/pypi</span> @@ -227,8 +238,8 @@ memorability over describing the functionality.</p> <span class="err">[pypitest]</span> <span class="c1"># authentication details for test PyPI</span> <span class="na">repository</span> <span class="o">=</span> <span class="s">https://testpypi.python.org/pypi</span> <span class="na">username</span> <span class="o">=</span> <span class="s">{ your_username }</span> -</pre> -<p>As you can see, you need to register both in the <a class="reference external" href="https://pypi.python.org/pypi?%3Aaction=register_form">main pypi +</pre></div> +</td></tr></table><p>As you can see, you need to register both in the <a class="reference external" href="https://pypi.python.org/pypi?%3Aaction=register_form">main pypi repository</a> and the <a class="reference external" href="https://testpypi.python.org/pypi?%3Aaction=register_form">testing server</a>. @@ -236,6 +247,7 @@ The usernames and passwords might be different, that is up to you!</p> </div> <div class="section" id="prepare-your-package"> <h2>Prepare your package</h2> +<p>This should be the structure:</p> <pre class="literal-block"> root-dir/ # Any name you want setup.py @@ -250,32 +262,48 @@ root-dir/ # Any name you want </pre> <div class="section" id="setup-cfg"> <h3>setup.cfg</h3> -<pre class="code cfg literal-block"> -<span class="k">[metadata]</span> +<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 +2</pre></div></td><td class="code"><div class="highlight"><pre><span class="k">[metadata]</span> <span class="na">description-file</span> <span class="o">=</span> <span class="s">README.md</span> -</pre> -<p>The markdown README is the <em>de facto</em> standard in Github, but you can +</pre></div> +</td></tr></table><p>The markdown README is the <em>de facto</em> standard in Github, but you can also use rST (reStructuredText), the standard in the python community.</p> </div> <div class="section" id="setup-py"> <h3>setup.py</h3> -<p>{% highlight python %} from distutils.core import setup setup( name = -'mypackage', packages = ['mypackage'], # this must be the same as the -name above version = '{ version }', description = '{ description }', -author = '{ name }', author_email = '{ email }', url = -'<a class="reference external" href="https://github.com">https://github.com</a>/{user}/{package}', # URL to the github repo -download_url = '<a class="reference external" href="https://github.com">https://github.com</a>/{user}/{repo}/tarball/{version}', -keywords = ['websockets', 'display', 'd3'], # list of keywords that -represent your package classifiers = [], ) {% endhighlight %}</p> -<p>You might notice that the download_url points to a Github URL. We could +<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +10 +11 +12</pre></div></td><td class="code"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">distutils.core</span> <span class="kn">import</span> <span class="n">setup</span> + +<span class="n">setup</span><span class="p">(</span><span class="n">name</span> <span class="o">=</span> <span class="s">&#39;mypackage&#39;</span><span class="p">,</span> + <span class="n">packages</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;mypackage&#39;</span><span class="p">],</span> <span class="c"># this must be the same as the name above</span> + <span class="n">version</span> <span class="o">=</span> <span class="s">&#39;{ version }&#39;</span><span class="p">,</span> + <span class="n">description</span> <span class="o">=</span> <span class="s">&#39;{ description }&#39;</span><span class="p">,</span> + <span class="n">author</span> <span class="o">=</span> <span class="s">&#39;{ name }&#39;</span><span class="p">,</span> + <span class="n">email</span> <span class="o">=</span> <span class="s">&#39;{ email }&#39;</span><span class="p">,</span> + <span class="n">url</span> <span class="o">=</span> <span class="s">&#39;https://github.com/{user}/{package}&#39;</span><span class="p">,</span> <span class="c"># URL to the github repo</span> + <span class="n">download</span>\<span class="n">_url</span> <span class="o">=</span> <span class="s">&#39;https://github.com/{user}/{repo}/tarball/{version}&#39;</span><span class="p">,</span> + <span class="n">keywords</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;websockets&#39;</span><span class="p">,</span> <span class="s">&#39;display&#39;</span><span class="p">,</span> <span class="s">&#39;d3&#39;</span><span class="p">],</span> <span class="c"># list of keywords that represent your package</span> + <span class="n">classifiers</span> <span class="o">=</span> <span class="p">[],</span> <span class="p">)</span> +</pre></div> +</td></tr></table><p>You might notice that the download_url points to a Github URL. We could host our package anywhere, but Github is a convenient option. To create the tarball and the zip packages, you only need to tag a tag in your repository and push it to github:</p> -<pre class="literal-block"> -git tag {version} -m &quot;{ Description of this tag/version}&quot; +<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 +2</pre></div></td><td class="code"><div class="highlight"><pre>git tag <span class="o">{</span>version<span class="o">}</span> -m <span class="s2">&quot;{ Description of this tag/version}&quot;</span> git push --tags origin master -</pre> -</div> +</pre></div> +</td></tr></table></div> </div> <div class="section" id="push-to-the-testing-main-pypi-server"> <h2>Push to the testing/main pypi server</h2> @@ -307,9 +335,9 @@ new technologies and improve it:</p> <li>Automatic generation of fake personal data to test the interface</li> <li>Obfuscation of personal emails</li> </ul> +<p>The result can be <a class="reference external" href="http://eurolovemap.herokuapp.com/">seen here</a>.</p> <div class="section" id="publishing-a-python-3-app-on-heroku"> <h2>Publishing a Python 3 app on Heroku</h2> -<p><a class="reference external" href="http://eurolovemap.herokuapp.com/">seen here</a></p> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>mkvirtualenv -p /usr/bin/python3.3 eurolovemap </pre></div> </td></tr></table><p>Since Heroku uses python 2.7 by default, we have to tell it which @@ -429,7 +457,11 @@ clone and deploy it easily like this:</p> https://github.com/balkian/balkian.github.com <span class="nb">cd </span>balkian.github.com jekyll serve -w </pre></div> -</td></tr></table><p>I will keep updating this post with information about: * Some Jekyll -plugins that might be useful * What CSS tricks I learnt * The webfonts -I used * The badge on the left side of the page</p> +</td></tr></table><p>I will keep updating this post with information about:</p> +<ul class="simple"> +<li>Some Jekyll plugins that might be useful</li> +<li>What CSS tricks I learnt</li> +<li>The webfonts I used</li> +<li>The badge on the left side of the page</li> +</ul> \ No newline at end of file diff --git a/feeds/misc.atom.xml b/feeds/misc.atom.xml index d252154..c19fbca 100644 --- a/feeds/misc.atom.xml +++ b/feeds/misc.atom.xml @@ -213,11 +213,22 @@ memorability over describing the functionality.</p> </div> <div class="section" id="create-a-pypirc-configuration-file"> <h2>Create a .pypirc configuration file</h2> -<pre class="code cfg literal-block"> -<span class="err">[distutils]</span> <span class="c1"># this tells distutils what package indexes you can push to</span> -<span class="na">index-servers</span> <span class="o">=</span><span class="s"> - pypi # the live PyPI - pypitest # test PyPI</span> +<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +10 +11 +12 +13</pre></div></td><td class="code"><div class="highlight"><pre><span class="err">[distutils]</span> <span class="c1"># this tells distutils what package indexes you can push to</span> +<span class="na">index-servers</span> <span class="o">=</span><span class="s"></span> +<span class="s"> pypi # the live PyPI</span> +<span class="s"> pypitest # test PyPI</span> <span class="err">[pypi]</span> <span class="c1"># authentication details for live PyPI</span> <span class="na">repository</span> <span class="o">=</span> <span class="s">https://pypi.python.org/pypi</span> @@ -227,8 +238,8 @@ memorability over describing the functionality.</p> <span class="err">[pypitest]</span> <span class="c1"># authentication details for test PyPI</span> <span class="na">repository</span> <span class="o">=</span> <span class="s">https://testpypi.python.org/pypi</span> <span class="na">username</span> <span class="o">=</span> <span class="s">{ your_username }</span> -</pre> -<p>As you can see, you need to register both in the <a class="reference external" href="https://pypi.python.org/pypi?%3Aaction=register_form">main pypi +</pre></div> +</td></tr></table><p>As you can see, you need to register both in the <a class="reference external" href="https://pypi.python.org/pypi?%3Aaction=register_form">main pypi repository</a> and the <a class="reference external" href="https://testpypi.python.org/pypi?%3Aaction=register_form">testing server</a>. @@ -236,6 +247,7 @@ The usernames and passwords might be different, that is up to you!</p> </div> <div class="section" id="prepare-your-package"> <h2>Prepare your package</h2> +<p>This should be the structure:</p> <pre class="literal-block"> root-dir/ # Any name you want setup.py @@ -250,32 +262,48 @@ root-dir/ # Any name you want </pre> <div class="section" id="setup-cfg"> <h3>setup.cfg</h3> -<pre class="code cfg literal-block"> -<span class="k">[metadata]</span> +<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 +2</pre></div></td><td class="code"><div class="highlight"><pre><span class="k">[metadata]</span> <span class="na">description-file</span> <span class="o">=</span> <span class="s">README.md</span> -</pre> -<p>The markdown README is the <em>de facto</em> standard in Github, but you can +</pre></div> +</td></tr></table><p>The markdown README is the <em>de facto</em> standard in Github, but you can also use rST (reStructuredText), the standard in the python community.</p> </div> <div class="section" id="setup-py"> <h3>setup.py</h3> -<p>{% highlight python %} from distutils.core import setup setup( name = -'mypackage', packages = ['mypackage'], # this must be the same as the -name above version = '{ version }', description = '{ description }', -author = '{ name }', author_email = '{ email }', url = -'<a class="reference external" href="https://github.com">https://github.com</a>/{user}/{package}', # URL to the github repo -download_url = '<a class="reference external" href="https://github.com">https://github.com</a>/{user}/{repo}/tarball/{version}', -keywords = ['websockets', 'display', 'd3'], # list of keywords that -represent your package classifiers = [], ) {% endhighlight %}</p> -<p>You might notice that the download_url points to a Github URL. We could +<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +10 +11 +12</pre></div></td><td class="code"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">distutils.core</span> <span class="kn">import</span> <span class="n">setup</span> + +<span class="n">setup</span><span class="p">(</span><span class="n">name</span> <span class="o">=</span> <span class="s">&#39;mypackage&#39;</span><span class="p">,</span> + <span class="n">packages</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;mypackage&#39;</span><span class="p">],</span> <span class="c"># this must be the same as the name above</span> + <span class="n">version</span> <span class="o">=</span> <span class="s">&#39;{ version }&#39;</span><span class="p">,</span> + <span class="n">description</span> <span class="o">=</span> <span class="s">&#39;{ description }&#39;</span><span class="p">,</span> + <span class="n">author</span> <span class="o">=</span> <span class="s">&#39;{ name }&#39;</span><span class="p">,</span> + <span class="n">email</span> <span class="o">=</span> <span class="s">&#39;{ email }&#39;</span><span class="p">,</span> + <span class="n">url</span> <span class="o">=</span> <span class="s">&#39;https://github.com/{user}/{package}&#39;</span><span class="p">,</span> <span class="c"># URL to the github repo</span> + <span class="n">download</span>\<span class="n">_url</span> <span class="o">=</span> <span class="s">&#39;https://github.com/{user}/{repo}/tarball/{version}&#39;</span><span class="p">,</span> + <span class="n">keywords</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;websockets&#39;</span><span class="p">,</span> <span class="s">&#39;display&#39;</span><span class="p">,</span> <span class="s">&#39;d3&#39;</span><span class="p">],</span> <span class="c"># list of keywords that represent your package</span> + <span class="n">classifiers</span> <span class="o">=</span> <span class="p">[],</span> <span class="p">)</span> +</pre></div> +</td></tr></table><p>You might notice that the download_url points to a Github URL. We could host our package anywhere, but Github is a convenient option. To create the tarball and the zip packages, you only need to tag a tag in your repository and push it to github:</p> -<pre class="literal-block"> -git tag {version} -m &quot;{ Description of this tag/version}&quot; +<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 +2</pre></div></td><td class="code"><div class="highlight"><pre>git tag <span class="o">{</span>version<span class="o">}</span> -m <span class="s2">&quot;{ Description of this tag/version}&quot;</span> git push --tags origin master -</pre> -</div> +</pre></div> +</td></tr></table></div> </div> <div class="section" id="push-to-the-testing-main-pypi-server"> <h2>Push to the testing/main pypi server</h2> @@ -307,9 +335,9 @@ new technologies and improve it:</p> <li>Automatic generation of fake personal data to test the interface</li> <li>Obfuscation of personal emails</li> </ul> +<p>The result can be <a class="reference external" href="http://eurolovemap.herokuapp.com/">seen here</a>.</p> <div class="section" id="publishing-a-python-3-app-on-heroku"> <h2>Publishing a Python 3 app on Heroku</h2> -<p><a class="reference external" href="http://eurolovemap.herokuapp.com/">seen here</a></p> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>mkvirtualenv -p /usr/bin/python3.3 eurolovemap </pre></div> </td></tr></table><p>Since Heroku uses python 2.7 by default, we have to tell it which @@ -429,7 +457,11 @@ clone and deploy it easily like this:</p> https://github.com/balkian/balkian.github.com <span class="nb">cd </span>balkian.github.com jekyll serve -w </pre></div> -</td></tr></table><p>I will keep updating this post with information about: * Some Jekyll -plugins that might be useful * What CSS tricks I learnt * The webfonts -I used * The badge on the left side of the page</p> +</td></tr></table><p>I will keep updating this post with information about:</p> +<ul class="simple"> +<li>Some Jekyll plugins that might be useful</li> +<li>What CSS tricks I learnt</li> +<li>The webfonts I used</li> +<li>The badge on the left side of the page</li> +</ul> \ No newline at end of file diff --git a/publishing-in-pypi.html b/publishing-in-pypi.html index b6f4de2..9e0f6da 100644 --- a/publishing-in-pypi.html +++ b/publishing-in-pypi.html @@ -122,11 +122,22 @@ memorability over describing the functionality.

Create a .pypirc configuration file

-
-[distutils] # this tells distutils what package indexes you can push to
-index-servers =
-    pypi # the live PyPI
-    pypitest # test PyPI
+
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
[distutils] # this tells distutils what package indexes you can push to
+index-servers =
+    pypi # the live PyPI
+    pypitest # test PyPI
 
 [pypi] # authentication details for live PyPI
 repository = https://pypi.python.org/pypi
@@ -136,8 +147,8 @@ memorability over describing the functionality.

[pypitest] # authentication details for test PyPI repository = https://testpypi.python.org/pypi username = { your_username } -
-

As you can see, you need to register both in the main pypi +

+

As you can see, you need to register both in the main pypi repository and the testing server. @@ -145,6 +156,7 @@ The usernames and passwords might be different, that is up to you!

Prepare your package

+

This should be the structure:

 root-dir/    # Any name you want
     setup.py
@@ -159,32 +171,48 @@ root-dir/    # Any name you want
 

setup.cfg

-
-[metadata]
+
1
+2
[metadata]
 description-file = README.md
-
-

The markdown README is the de facto standard in Github, but you can +

+

The markdown README is the de facto standard in Github, but you can also use rST (reStructuredText), the standard in the python community.

setup.py

-

{% highlight python %} from distutils.core import setup setup( name = -'mypackage', packages = ['mypackage'], # this must be the same as the -name above version = '{ version }', description = '{ description }', -author = '{ name }', author_email = '{ email }', url = -'https://github.com/{user}/{package}', # URL to the github repo -download_url = 'https://github.com/{user}/{repo}/tarball/{version}', -keywords = ['websockets', 'display', 'd3'], # list of keywords that -represent your package classifiers = [], ) {% endhighlight %}

-

You might notice that the download_url points to a Github URL. We could +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
from distutils.core import setup
+
+setup(name = 'mypackage',
+      packages = ['mypackage'], # this must be the same as the name above
+      version = '{ version }',
+      description = '{ description }',
+      author = '{ name }',
+      email = '{ email }',
+      url = 'https://github.com/{user}/{package}', # URL to the github repo
+      download\_url = 'https://github.com/{user}/{repo}/tarball/{version}',
+      keywords = ['websockets', 'display', 'd3'], # list of keywords that represent your package
+      classifiers = [], )
+
+

You might notice that the download_url points to a Github URL. We could host our package anywhere, but Github is a convenient option. To create the tarball and the zip packages, you only need to tag a tag in your repository and push it to github:

-
-git tag {version} -m "{ Description of this tag/version}"
+
1
+2
git tag {version} -m "{ Description of this tag/version}"
 git push --tags origin master
-
-
+ +

Push to the testing/main pypi server

diff --git a/theme/css/main-desktop.css b/theme/css/main-desktop.css index 348b99e..8189e66 100644 --- a/theme/css/main-desktop.css +++ b/theme/css/main-desktop.css @@ -239,16 +239,6 @@ div.navbar { color: #c00; } -.postnav { - height: 1em; - width: 100%; - padding: 15px 9px; - margin-left: -10px; - background-color: white; - text-align: right; - border: dashed 1px #AAA; -} - .previouspost { float: left; } diff --git a/theme/css/main-medium.css b/theme/css/main-medium.css index 503b0c6..055ba3f 100644 --- a/theme/css/main-medium.css +++ b/theme/css/main-medium.css @@ -240,47 +240,11 @@ a { text-decoration: none; } -.postnav { - height: 1em; - width: 100%; - padding: 15px 9px; - margin-left: -10px; - background-color: white; - text-align: right; - border: dashed 1px #AAA; -} - .previouspost { float: left; } -.pagination { - position: relative; - height: 1em; - width: 50%; - padding: 10px; - text-align: center; - background-color: #FFF; - z-index: 0; -} - -.pag-top{ - /*margin: -9px auto;*/ - /*margin-bottom 0;*/ - /*border-radius: 0 0 15px 15px;*/ - /*border: dashed 1px #AAA;*/ - /*border-top-width: 0;*/ -} - -.pag-bottom { - bottom: -10px; - /*margin: 0 auto;*/ - /*border-radius: 15px 15px 0 0;*/ - /*border: dashed 1px #AAA;*/ - /*border-bottom-width: 0;*/ -} - about ul { position: relative; width: 900px; diff --git a/theme/css/main.css b/theme/css/main.css index 1ae62c1..030430b 100644 --- a/theme/css/main.css +++ b/theme/css/main.css @@ -110,6 +110,14 @@ footer a:hover { padding-left: 0.5em; } +.postnav { + height: 1em; + width: 100%; + padding: 15px 9px; + margin-left: -10px; + background-color: white; + text-align: right; +} .nextpost, .nextpage { float: right; @@ -119,6 +127,22 @@ footer a:hover { float: left; } +.pag-top{ + /*margin: -9px auto;*/ + /*margin-bottom 0;*/ + /*border-radius: 0 0 15px 15px;*/ + /*border: dashed 1px #AAA;*/ + /*border-top-width: 0;*/ +} + +.pag-bottom { + bottom: -10px; + /*margin: 0 auto;*/ + /*border-radius: 15px 15px 0 0;*/ + /*border: dashed 1px #AAA;*/ + /*border-bottom-width: 0;*/ +} + #social { margin: 0 auto; padding: 0; @@ -200,21 +224,19 @@ footer a:hover { text-align: center; background-color: #FFF; z-index: 0; + text-weight: bold; + color: #AAA; } .pag-top{ margin: -9px auto; margin-bottom: 0; - border-radius: 0 0 15px 15px; - border: dashed 1px #AAA; border-top-width: 0; } .pag-bottom { bottom: -10px; margin: 0 auto; - border-radius: 15px 15px 0 0; - border: dashed 1px #AAA; border-bottom-width: 0; } diff --git a/updating-eurolovemap.html b/updating-eurolovemap.html index bdafc1e..622477b 100644 --- a/updating-eurolovemap.html +++ b/updating-eurolovemap.html @@ -127,9 +127,9 @@ new technologies and improve it:

  • Automatic generation of fake personal data to test the interface
  • Obfuscation of personal emails
  • +

    The result can be seen here.

    Publishing a Python 3 app on Heroku

    -

    seen here

    1
    mkvirtualenv -p /usr/bin/python3.3 eurolovemap
     

    Since Heroku uses python 2.7 by default, we have to tell it which