From 3e3a8bbe0b742133477d5a9ad41c4f7336d94355 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=2E=20Fernando=20S=C3=A1nchez?=
Date: Tue, 8 Dec 2015 01:39:33 +0100
Subject: [PATCH] Generate Pelican site
---
creating-my-web.html | 10 +++--
feeds/all.atom.xml | 88 ++++++++++++++++++++++++++------------
feeds/misc.atom.xml | 88 ++++++++++++++++++++++++++------------
publishing-in-pypi.html | 76 +++++++++++++++++++++-----------
theme/css/main-desktop.css | 10 -----
theme/css/main-medium.css | 36 ----------------
theme/css/main.css | 30 +++++++++++--
updating-eurolovemap.html | 2 +-
8 files changed, 206 insertions(+), 134 deletions(-)
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 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
+
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]
+
| [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}"
+
| 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
| mkvirtualenv -p /usr/bin/python3.3 eurolovemap
|
Since Heroku uses python 2.7 by default, we have to tell it which