mirror of
https://github.com/balkian/balkian.github.com.git
synced 2025-02-20 16:55:08 +00:00
Generate Pelican site
This commit is contained in:
parent
7d8d2ffcd4
commit
3e3a8bbe0b
@ -139,9 +139,13 @@ clone and deploy it easily like this:</p>
|
|||||||
https://github.com/balkian/balkian.github.com <span class="nb">cd </span>balkian.github.com
|
https://github.com/balkian/balkian.github.com <span class="nb">cd </span>balkian.github.com
|
||||||
jekyll serve -w
|
jekyll serve -w
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</td></tr></table><p>I will keep updating this post with information about: * Some Jekyll
|
</td></tr></table><p>I will keep updating this post with information about:</p>
|
||||||
plugins that might be useful * What CSS tricks I learnt * The webfonts
|
<ul class="simple">
|
||||||
I used * The badge on the left side of the page</p>
|
<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>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -213,11 +213,22 @@ memorability over describing the functionality.</p>
|
|||||||
</div>
|
</div>
|
||||||
<div class="section" id="create-a-pypirc-configuration-file">
|
<div class="section" id="create-a-pypirc-configuration-file">
|
||||||
<h2>Create a .pypirc configuration file</h2>
|
<h2>Create a .pypirc configuration file</h2>
|
||||||
<pre class="code cfg literal-block">
|
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||||
<span class="err">[distutils]</span> <span class="c1"># this tells distutils what package indexes you can push to</span>
|
2
|
||||||
<span class="na">index-servers</span> <span class="o">=</span><span class="s">
|
3
|
||||||
pypi # the live PyPI
|
4
|
||||||
pypitest # test PyPI</span>
|
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="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>
|
<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="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">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>
|
<span class="na">username</span> <span class="o">=</span> <span class="s">{ your_username }</span>
|
||||||
</pre>
|
</pre></div>
|
||||||
<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
|
</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
|
repository</a> and
|
||||||
the <a class="reference external" href="https://testpypi.python.org/pypi?%3Aaction=register_form">testing
|
the <a class="reference external" href="https://testpypi.python.org/pypi?%3Aaction=register_form">testing
|
||||||
server</a>.
|
server</a>.
|
||||||
@ -236,6 +247,7 @@ The usernames and passwords might be different, that is up to you!</p>
|
|||||||
</div>
|
</div>
|
||||||
<div class="section" id="prepare-your-package">
|
<div class="section" id="prepare-your-package">
|
||||||
<h2>Prepare your package</h2>
|
<h2>Prepare your package</h2>
|
||||||
|
<p>This should be the structure:</p>
|
||||||
<pre class="literal-block">
|
<pre class="literal-block">
|
||||||
root-dir/ # Any name you want
|
root-dir/ # Any name you want
|
||||||
setup.py
|
setup.py
|
||||||
@ -250,32 +262,48 @@ root-dir/ # Any name you want
|
|||||||
</pre>
|
</pre>
|
||||||
<div class="section" id="setup-cfg">
|
<div class="section" id="setup-cfg">
|
||||||
<h3>setup.cfg</h3>
|
<h3>setup.cfg</h3>
|
||||||
<pre class="code cfg literal-block">
|
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||||
<span class="k">[metadata]</span>
|
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>
|
<span class="na">description-file</span> <span class="o">=</span> <span class="s">README.md</span>
|
||||||
</pre>
|
</pre></div>
|
||||||
<p>The markdown README is the <em>de facto</em> standard in Github, but you can
|
</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>
|
also use rST (reStructuredText), the standard in the python community.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="setup-py">
|
<div class="section" id="setup-py">
|
||||||
<h3>setup.py</h3>
|
<h3>setup.py</h3>
|
||||||
<p>{% highlight python %} from distutils.core import setup setup( name =
|
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||||
'mypackage', packages = ['mypackage'], # this must be the same as the
|
2
|
||||||
name above version = '{ version }', description = '{ description }',
|
3
|
||||||
author = '{ name }', author_email = '{ email }', url =
|
4
|
||||||
'<a class="reference external" href="https://github.com">https://github.com</a>/{user}/{package}', # URL to the github repo
|
5
|
||||||
download_url = '<a class="reference external" href="https://github.com">https://github.com</a>/{user}/{repo}/tarball/{version}',
|
6
|
||||||
keywords = ['websockets', 'display', 'd3'], # list of keywords that
|
7
|
||||||
represent your package classifiers = [], ) {% endhighlight %}</p>
|
8
|
||||||
<p>You might notice that the download_url points to a Github URL. We could
|
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
|
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
|
the tarball and the zip packages, you only need to tag a tag in your
|
||||||
repository and push it to github:</p>
|
repository and push it to github:</p>
|
||||||
<pre class="literal-block">
|
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||||
git tag {version} -m &quot;{ Description of this tag/version}&quot;
|
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
|
git push --tags origin master
|
||||||
</pre>
|
</pre></div>
|
||||||
</div>
|
</td></tr></table></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="push-to-the-testing-main-pypi-server">
|
<div class="section" id="push-to-the-testing-main-pypi-server">
|
||||||
<h2>Push to the testing/main pypi server</h2>
|
<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>Automatic generation of fake personal data to test the interface</li>
|
||||||
<li>Obfuscation of personal emails</li>
|
<li>Obfuscation of personal emails</li>
|
||||||
</ul>
|
</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">
|
<div class="section" id="publishing-a-python-3-app-on-heroku">
|
||||||
<h2>Publishing a Python 3 app on Heroku</h2>
|
<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
|
<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>
|
</pre></div>
|
||||||
</td></tr></table><p>Since Heroku uses python 2.7 by default, we have to tell it which
|
</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
|
https://github.com/balkian/balkian.github.com <span class="nb">cd </span>balkian.github.com
|
||||||
jekyll serve -w
|
jekyll serve -w
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</td></tr></table><p>I will keep updating this post with information about: * Some Jekyll
|
</td></tr></table><p>I will keep updating this post with information about:</p>
|
||||||
plugins that might be useful * What CSS tricks I learnt * The webfonts
|
<ul class="simple">
|
||||||
I used * The badge on the left side of the page</p>
|
<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>
|
||||||
</summary><category term="starters"></category><category term="javascript"></category><category term="ruby"></category><category term="github"></category><category term="git"></category></entry></feed>
|
</summary><category term="starters"></category><category term="javascript"></category><category term="ruby"></category><category term="github"></category><category term="git"></category></entry></feed>
|
@ -213,11 +213,22 @@ memorability over describing the functionality.</p>
|
|||||||
</div>
|
</div>
|
||||||
<div class="section" id="create-a-pypirc-configuration-file">
|
<div class="section" id="create-a-pypirc-configuration-file">
|
||||||
<h2>Create a .pypirc configuration file</h2>
|
<h2>Create a .pypirc configuration file</h2>
|
||||||
<pre class="code cfg literal-block">
|
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||||
<span class="err">[distutils]</span> <span class="c1"># this tells distutils what package indexes you can push to</span>
|
2
|
||||||
<span class="na">index-servers</span> <span class="o">=</span><span class="s">
|
3
|
||||||
pypi # the live PyPI
|
4
|
||||||
pypitest # test PyPI</span>
|
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="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>
|
<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="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">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>
|
<span class="na">username</span> <span class="o">=</span> <span class="s">{ your_username }</span>
|
||||||
</pre>
|
</pre></div>
|
||||||
<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
|
</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
|
repository</a> and
|
||||||
the <a class="reference external" href="https://testpypi.python.org/pypi?%3Aaction=register_form">testing
|
the <a class="reference external" href="https://testpypi.python.org/pypi?%3Aaction=register_form">testing
|
||||||
server</a>.
|
server</a>.
|
||||||
@ -236,6 +247,7 @@ The usernames and passwords might be different, that is up to you!</p>
|
|||||||
</div>
|
</div>
|
||||||
<div class="section" id="prepare-your-package">
|
<div class="section" id="prepare-your-package">
|
||||||
<h2>Prepare your package</h2>
|
<h2>Prepare your package</h2>
|
||||||
|
<p>This should be the structure:</p>
|
||||||
<pre class="literal-block">
|
<pre class="literal-block">
|
||||||
root-dir/ # Any name you want
|
root-dir/ # Any name you want
|
||||||
setup.py
|
setup.py
|
||||||
@ -250,32 +262,48 @@ root-dir/ # Any name you want
|
|||||||
</pre>
|
</pre>
|
||||||
<div class="section" id="setup-cfg">
|
<div class="section" id="setup-cfg">
|
||||||
<h3>setup.cfg</h3>
|
<h3>setup.cfg</h3>
|
||||||
<pre class="code cfg literal-block">
|
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||||
<span class="k">[metadata]</span>
|
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>
|
<span class="na">description-file</span> <span class="o">=</span> <span class="s">README.md</span>
|
||||||
</pre>
|
</pre></div>
|
||||||
<p>The markdown README is the <em>de facto</em> standard in Github, but you can
|
</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>
|
also use rST (reStructuredText), the standard in the python community.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="setup-py">
|
<div class="section" id="setup-py">
|
||||||
<h3>setup.py</h3>
|
<h3>setup.py</h3>
|
||||||
<p>{% highlight python %} from distutils.core import setup setup( name =
|
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||||
'mypackage', packages = ['mypackage'], # this must be the same as the
|
2
|
||||||
name above version = '{ version }', description = '{ description }',
|
3
|
||||||
author = '{ name }', author_email = '{ email }', url =
|
4
|
||||||
'<a class="reference external" href="https://github.com">https://github.com</a>/{user}/{package}', # URL to the github repo
|
5
|
||||||
download_url = '<a class="reference external" href="https://github.com">https://github.com</a>/{user}/{repo}/tarball/{version}',
|
6
|
||||||
keywords = ['websockets', 'display', 'd3'], # list of keywords that
|
7
|
||||||
represent your package classifiers = [], ) {% endhighlight %}</p>
|
8
|
||||||
<p>You might notice that the download_url points to a Github URL. We could
|
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
|
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
|
the tarball and the zip packages, you only need to tag a tag in your
|
||||||
repository and push it to github:</p>
|
repository and push it to github:</p>
|
||||||
<pre class="literal-block">
|
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||||
git tag {version} -m &quot;{ Description of this tag/version}&quot;
|
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
|
git push --tags origin master
|
||||||
</pre>
|
</pre></div>
|
||||||
</div>
|
</td></tr></table></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="push-to-the-testing-main-pypi-server">
|
<div class="section" id="push-to-the-testing-main-pypi-server">
|
||||||
<h2>Push to the testing/main pypi server</h2>
|
<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>Automatic generation of fake personal data to test the interface</li>
|
||||||
<li>Obfuscation of personal emails</li>
|
<li>Obfuscation of personal emails</li>
|
||||||
</ul>
|
</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">
|
<div class="section" id="publishing-a-python-3-app-on-heroku">
|
||||||
<h2>Publishing a Python 3 app on Heroku</h2>
|
<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
|
<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>
|
</pre></div>
|
||||||
</td></tr></table><p>Since Heroku uses python 2.7 by default, we have to tell it which
|
</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
|
https://github.com/balkian/balkian.github.com <span class="nb">cd </span>balkian.github.com
|
||||||
jekyll serve -w
|
jekyll serve -w
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</td></tr></table><p>I will keep updating this post with information about: * Some Jekyll
|
</td></tr></table><p>I will keep updating this post with information about:</p>
|
||||||
plugins that might be useful * What CSS tricks I learnt * The webfonts
|
<ul class="simple">
|
||||||
I used * The badge on the left side of the page</p>
|
<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>
|
||||||
</summary><category term="starters"></category><category term="javascript"></category><category term="ruby"></category><category term="github"></category><category term="git"></category></entry></feed>
|
</summary><category term="starters"></category><category term="javascript"></category><category term="ruby"></category><category term="github"></category><category term="git"></category></entry></feed>
|
@ -122,11 +122,22 @@ memorability over describing the functionality.</p>
|
|||||||
</div>
|
</div>
|
||||||
<div class="section" id="create-a-pypirc-configuration-file">
|
<div class="section" id="create-a-pypirc-configuration-file">
|
||||||
<h2>Create a .pypirc configuration file</h2>
|
<h2>Create a .pypirc configuration file</h2>
|
||||||
<pre class="code cfg literal-block">
|
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||||
<span class="err">[distutils]</span> <span class="c1"># this tells distutils what package indexes you can push to</span>
|
2
|
||||||
<span class="na">index-servers</span> <span class="o">=</span><span class="s">
|
3
|
||||||
pypi # the live PyPI
|
4
|
||||||
pypitest # test PyPI</span>
|
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="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>
|
<span class="na">repository</span> <span class="o">=</span> <span class="s">https://pypi.python.org/pypi</span>
|
||||||
@ -136,8 +147,8 @@ memorability over describing the functionality.</p>
|
|||||||
<span class="err">[pypitest]</span> <span class="c1"># authentication details for test PyPI</span>
|
<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">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>
|
<span class="na">username</span> <span class="o">=</span> <span class="s">{ your_username }</span>
|
||||||
</pre>
|
</pre></div>
|
||||||
<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
|
</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
|
repository</a> and
|
||||||
the <a class="reference external" href="https://testpypi.python.org/pypi?%3Aaction=register_form">testing
|
the <a class="reference external" href="https://testpypi.python.org/pypi?%3Aaction=register_form">testing
|
||||||
server</a>.
|
server</a>.
|
||||||
@ -145,6 +156,7 @@ The usernames and passwords might be different, that is up to you!</p>
|
|||||||
</div>
|
</div>
|
||||||
<div class="section" id="prepare-your-package">
|
<div class="section" id="prepare-your-package">
|
||||||
<h2>Prepare your package</h2>
|
<h2>Prepare your package</h2>
|
||||||
|
<p>This should be the structure:</p>
|
||||||
<pre class="literal-block">
|
<pre class="literal-block">
|
||||||
root-dir/ # Any name you want
|
root-dir/ # Any name you want
|
||||||
setup.py
|
setup.py
|
||||||
@ -159,32 +171,48 @@ root-dir/ # Any name you want
|
|||||||
</pre>
|
</pre>
|
||||||
<div class="section" id="setup-cfg">
|
<div class="section" id="setup-cfg">
|
||||||
<h3>setup.cfg</h3>
|
<h3>setup.cfg</h3>
|
||||||
<pre class="code cfg literal-block">
|
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||||
<span class="k">[metadata]</span>
|
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>
|
<span class="na">description-file</span> <span class="o">=</span> <span class="s">README.md</span>
|
||||||
</pre>
|
</pre></div>
|
||||||
<p>The markdown README is the <em>de facto</em> standard in Github, but you can
|
</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>
|
also use rST (reStructuredText), the standard in the python community.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="setup-py">
|
<div class="section" id="setup-py">
|
||||||
<h3>setup.py</h3>
|
<h3>setup.py</h3>
|
||||||
<p>{% highlight python %} from distutils.core import setup setup( name =
|
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||||
'mypackage', packages = ['mypackage'], # this must be the same as the
|
2
|
||||||
name above version = '{ version }', description = '{ description }',
|
3
|
||||||
author = '{ name }', author_email = '{ email }', url =
|
4
|
||||||
'<a class="reference external" href="https://github.com">https://github.com</a>/{user}/{package}', # URL to the github repo
|
5
|
||||||
download_url = '<a class="reference external" href="https://github.com">https://github.com</a>/{user}/{repo}/tarball/{version}',
|
6
|
||||||
keywords = ['websockets', 'display', 'd3'], # list of keywords that
|
7
|
||||||
represent your package classifiers = [], ) {% endhighlight %}</p>
|
8
|
||||||
<p>You might notice that the download_url points to a Github URL. We could
|
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">'mypackage'</span><span class="p">,</span>
|
||||||
|
<span class="n">packages</span> <span class="o">=</span> <span class="p">[</span><span class="s">'mypackage'</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">'{ version }'</span><span class="p">,</span>
|
||||||
|
<span class="n">description</span> <span class="o">=</span> <span class="s">'{ description }'</span><span class="p">,</span>
|
||||||
|
<span class="n">author</span> <span class="o">=</span> <span class="s">'{ name }'</span><span class="p">,</span>
|
||||||
|
<span class="n">email</span> <span class="o">=</span> <span class="s">'{ email }'</span><span class="p">,</span>
|
||||||
|
<span class="n">url</span> <span class="o">=</span> <span class="s">'https://github.com/{user}/{package}'</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">'https://github.com/{user}/{repo}/tarball/{version}'</span><span class="p">,</span>
|
||||||
|
<span class="n">keywords</span> <span class="o">=</span> <span class="p">[</span><span class="s">'websockets'</span><span class="p">,</span> <span class="s">'display'</span><span class="p">,</span> <span class="s">'d3'</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
|
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
|
the tarball and the zip packages, you only need to tag a tag in your
|
||||||
repository and push it to github:</p>
|
repository and push it to github:</p>
|
||||||
<pre class="literal-block">
|
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||||
git tag {version} -m "{ Description of this tag/version}"
|
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">"{ Description of this tag/version}"</span>
|
||||||
git push --tags origin master
|
git push --tags origin master
|
||||||
</pre>
|
</pre></div>
|
||||||
</div>
|
</td></tr></table></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="push-to-the-testing-main-pypi-server">
|
<div class="section" id="push-to-the-testing-main-pypi-server">
|
||||||
<h2>Push to the testing/main pypi server</h2>
|
<h2>Push to the testing/main pypi server</h2>
|
||||||
|
@ -239,16 +239,6 @@ div.navbar {
|
|||||||
color: #c00;
|
color: #c00;
|
||||||
}
|
}
|
||||||
|
|
||||||
.postnav {
|
|
||||||
height: 1em;
|
|
||||||
width: 100%;
|
|
||||||
padding: 15px 9px;
|
|
||||||
margin-left: -10px;
|
|
||||||
background-color: white;
|
|
||||||
text-align: right;
|
|
||||||
border: dashed 1px #AAA;
|
|
||||||
}
|
|
||||||
|
|
||||||
.previouspost {
|
.previouspost {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
@ -240,47 +240,11 @@ a {
|
|||||||
text-decoration: none;
|
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 {
|
.previouspost {
|
||||||
float: left;
|
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 {
|
about ul {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 900px;
|
width: 900px;
|
||||||
|
@ -110,6 +110,14 @@ footer a:hover {
|
|||||||
padding-left: 0.5em;
|
padding-left: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.postnav {
|
||||||
|
height: 1em;
|
||||||
|
width: 100%;
|
||||||
|
padding: 15px 9px;
|
||||||
|
margin-left: -10px;
|
||||||
|
background-color: white;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
.nextpost, .nextpage {
|
.nextpost, .nextpage {
|
||||||
float: right;
|
float: right;
|
||||||
@ -119,6 +127,22 @@ footer a:hover {
|
|||||||
float: left;
|
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 {
|
#social {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@ -200,21 +224,19 @@ footer a:hover {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #FFF;
|
background-color: #FFF;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
|
text-weight: bold;
|
||||||
|
color: #AAA;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pag-top{
|
.pag-top{
|
||||||
margin: -9px auto;
|
margin: -9px auto;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
border-radius: 0 0 15px 15px;
|
|
||||||
border: dashed 1px #AAA;
|
|
||||||
border-top-width: 0;
|
border-top-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pag-bottom {
|
.pag-bottom {
|
||||||
bottom: -10px;
|
bottom: -10px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
border-radius: 15px 15px 0 0;
|
|
||||||
border: dashed 1px #AAA;
|
|
||||||
border-bottom-width: 0;
|
border-bottom-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,9 +127,9 @@ new technologies and improve it:</p>
|
|||||||
<li>Automatic generation of fake personal data to test the interface</li>
|
<li>Automatic generation of fake personal data to test the interface</li>
|
||||||
<li>Obfuscation of personal emails</li>
|
<li>Obfuscation of personal emails</li>
|
||||||
</ul>
|
</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">
|
<div class="section" id="publishing-a-python-3-app-on-heroku">
|
||||||
<h2>Publishing a Python 3 app on Heroku</h2>
|
<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
|
<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>
|
</pre></div>
|
||||||
</td></tr></table><p>Since Heroku uses python 2.7 by default, we have to tell it which
|
</td></tr></table><p>Since Heroku uses python 2.7 by default, we have to tell it which
|
||||||
|
Loading…
Reference in New Issue
Block a user