Permalink
Browse files

pelican!

  • Loading branch information...
1 parent f127fb7 commit b737b73826fa577326fc828787c634a616605cb9 @wraithan committed Sep 21, 2012
Showing with 208 additions and 171 deletions.
  1. +76 −0 Makefile
  2. +83 −0 develop_server.sh
  3. +0 −130 google-reader-subscriptions.xml
  4. +0 −38 index.html
  5. +22 −0 pelicanconf.py
  6. +0 −1 pubkey.txt
  7. +18 −0 publishconf.py
  8. +9 −0 requirements.txt
  9. +0 −2 robots.txt
View
@@ -0,0 +1,76 @@
+PELICAN=pelican
+PELICANOPTS=
+
+BASEDIR=$(PWD)
+INPUTDIR=$(BASEDIR)/content
+OUTPUTDIR=$(BASEDIR)/output
+CONFFILE=$(BASEDIR)/pelicanconf.py
+PUBLISHCONF=$(BASEDIR)/publishconf.py
+
+FTP_HOST=localhost
+FTP_USER=anonymous
+FTP_TARGET_DIR=/
+
+SSH_HOST=localhost
+SSH_PORT=22
+SSH_USER=root
+SSH_TARGET_DIR=/var/www
+
+DROPBOX_DIR=~/Dropbox/Public/
+
+help:
+ @echo 'Makefile for a pelican Web site '
+ @echo ' '
+ @echo 'Usage: '
+ @echo ' make html (re)generate the web site '
+ @echo ' make clean remove the generated files '
+ @echo ' make regenerate regenerate files upon modification '
+ @echo ' make publish generate using production settings '
+ @echo ' make serve serve site at http://localhost:8000'
+ @echo ' make devserver start/restart develop_server.sh '
+ @echo ' ssh_upload upload the web site via SSH '
+ @echo ' rsync_upload upload the web site via rsync+ssh '
+ @echo ' dropbox_upload upload the web site via Dropbox '
+ @echo ' ftp_upload upload the web site via FTP '
+ @echo ' github upload the web site via gh-pages '
+ @echo ' '
+
+
+html: clean $(OUTPUTDIR)/index.html
+ @echo 'Done'
+
+$(OUTPUTDIR)/%.html:
+ $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
+
+clean:
+ find $(OUTPUTDIR) -mindepth 1 -delete
+
+regenerate: clean
+ $(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
+
+serve:
+ cd $(OUTPUTDIR) && python -m SimpleHTTPServer
+
+devserver:
+ $(BASEDIR)/develop_server.sh restart
+
+publish:
+ $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
+
+ssh_upload: publish
+ scp -P $(SSH_PORT) -r $(OUTPUTDIR)/* $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR)
+
+rsync_upload: publish
+ rsync -e "ssh -p $(SSH_PORT)" -P -rvz --delete $(OUTPUTDIR)/* $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR)
+
+dropbox_upload: publish
+ cp -r $(OUTPUTDIR)/* $(DROPBOX_DIR)
+
+ftp_upload: publish
+ lftp ftp://$(FTP_USER)@$(FTP_HOST) -e "mirror -R $(OUTPUTDIR) $(FTP_TARGET_DIR) ; quit"
+
+github: publish
+ ghp-import $(OUTPUTDIR)
+ git push origin gh-pages
+
+.PHONY: html help clean regenerate serve devserver publish ssh_upload rsync_upload dropbox_upload ftp_upload github
View
@@ -0,0 +1,83 @@
+#!/bin/bash
+##
+# This section should match your Makefile
+##
+PELICAN=pelican
+PELICANOPTS=
+
+BASEDIR=$(PWD)
+INPUTDIR=$BASEDIR/content
+OUTPUTDIR=$BASEDIR/output
+CONFFILE=$BASEDIR/pelicanconf.py
+
+###
+# Don't change stuff below here unless you are sure
+###
+
+SRV_PID=$BASEDIR/srv.pid
+PELICAN_PID=$BASEDIR/pelican.pid
+
+function usage(){
+ echo "usage: $0 (stop) (start) (restart)"
+ echo "This starts pelican in debug and reload mode and then launches"
+ echo "A SimpleHTTP server to help site development. It doesn't read"
+ echo "your pelican options so you edit any paths in your Makefile"
+ echo "you will need to edit it as well"
+ exit 3
+}
+
+function shut_down(){
+ if [[ -f $SRV_PID ]]; then
+ PID=$(cat $SRV_PID)
+ PROCESS=$(ps -p $PID | tail -n 1 | awk '{print $4}')
+ if [[ $PROCESS == python ]]; then
+ echo "Killing SimpleHTTPServer"
+ kill $PID
+ else
+ echo "Stale PID, deleting"
+ fi
+ rm $SRV_PID
+ else
+ echo "SimpleHTTPServer PIDFile not found"
+ fi
+
+ if [[ -f $PELICAN_PID ]]; then
+ PID=$(cat $PELICAN_PID)
+ PROCESS=$(ps -p $PID | tail -n 1 | awk '{print $4}')
+ if [[ $PROCESS != "" ]]; then
+ echo "Killing Pelican"
+ kill $PID
+ else
+ echo "Stale PID, deleting"
+ fi
+ rm $PELICAN_PID
+ else
+ echo "Pelican PIDFile not found"
+ fi
+}
+
+function start_up(){
+ echo "Starting up Pelican and SimpleHTTPServer"
+ shift
+ $PELICAN --debug --autoreload -r $INPUTDIR -o $OUTPUTDIR -s $CONFFILE $PELICANOPTS &
+ echo $! > $PELICAN_PID
+ cd $OUTPUTDIR
+ python -m SimpleHTTPServer &
+ echo $! > $SRV_PID
+ cd $BASEDIR
+}
+
+###
+# MAIN
+###
+[[ $# -ne 1 ]] && usage
+if [[ $1 == "stop" ]]; then
+ shut_down
+elif [[ $1 == "restart" ]]; then
+ shut_down
+ start_up
+elif [[ $1 == "start" ]]; then
+ start_up
+else
+ usage
+fi
@@ -1,130 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<opml version="1.0">
- <head>
- <title>Wraith subscriptions in Google Reader</title>
- </head>
- <body>
- <outline title="Programmer Blogs" text="Programmer Blogs">
- <outline text="Alex Gaynor's Blago-blog Latest Posts"
- title="Alex Gaynor's Blago-blog Latest Posts" type="rss"
- xmlUrl="http://alexgaynor.net/feeds/latest/" htmlUrl="http://alexgaynor.net/"/>
- <outline text="Armin Ronacher" title="Armin Ronacher"
- type="rss" xmlUrl="http://lucumr.pocoo.org/feed.atom" htmlUrl="http://lucumr.pocoo.org/"/>
- <outline text="Caseorganic Blog" title="Caseorganic Blog"
- type="rss" xmlUrl="http://caseorganic.com/feed/" htmlUrl="http://caseorganic.com"/>
- <outline text="Compound Thinking" title="Compound Thinking"
- type="rss"
- xmlUrl="http://compoundthinking.com/blog/index.php/feed/" htmlUrl="http://compoundthinking.com/blog"/>
- <outline text="delicious robots blog"
- title="delicious robots blog" type="rss"
- xmlUrl="http://blog.deliciousrobots.com/feed/" htmlUrl="http://blog.deliciousrobots.com/"/>
- <outline text="DISQUS Code Blog" title="DISQUS Code Blog"
- type="rss"
- xmlUrl="http://feeds.feedburner.com/DisqusCode" htmlUrl="http://www.google.com/reader/view/feed%2Fhttp%3A%2F%2Ffeeds.feedburner.com%2FDisqusCode"/>
- <outline text="Don G. Park" title="Don G. Park" type="rss"
- xmlUrl="http://donpark.org/blog/articles.rss" htmlUrl="http://donpark.org/blog"/>
- <outline text="emacs-fu" title="emacs-fu" type="rss"
- xmlUrl="http://emacs-fu.blogspot.com/feeds/posts/default" htmlUrl="http://emacs-fu.blogspot.com/"/>
- <outline text="Healthy Skepticism for the Impossible"
- title="Healthy Skepticism for the Impossible" type="rss"
- xmlUrl="http://bobhancock.blogspot.com/feeds/posts/default" htmlUrl="http://www.bobhancock.org/"/>
- <outline text="M-x all-things-emacs"
- title="M-x all-things-emacs" type="rss"
- xmlUrl="http://feeds.feedburner.com/emacsblog" htmlUrl="http://emacsblog.org"/>
- <outline text="Michael Schurter" title="Michael Schurter"
- type="rss"
- xmlUrl="http://michael.susens-schurter.com/blog/feed/" htmlUrl="http://blog.schmichael.com"/>
- <outline text="The Blaggin' Wraith"
- title="The Blaggin' Wraith" type="rss"
- xmlUrl="http://blog.wraithan.net/feeds/posts/default" htmlUrl="http://blog.wraithan.net/"/>
- <outline text="The GitHub Blog" title="The GitHub Blog"
- type="rss" xmlUrl="http://github.com/blog.atom" htmlUrl="https://github.com/blog"/>
- <outline text="xkcd" title="xkcd" type="rss"
- xmlUrl="http://blag.xkcd.com/feed/" htmlUrl="http://blog.xkcd.com"/>
- </outline>
- <outline text="What's Hot in Google Reader"
- title="What's Hot in Google Reader" type="rss"
- xmlUrl="http://www.google.com/reader/public/atom/user/15650323335570657892/label/cool" htmlUrl="http://www.google.com/reader/view/user%2F15650323335570657892%2Flabel%2Fcool"/>
- <outline title="Gaming" text="Gaming">
- <outline text="Zero Punctuation" title="Zero Punctuation"
- type="rss"
- xmlUrl="http://www.escapistmagazine.com/rss/videos/list/1.xml" htmlUrl="http://www.escapistmagazine.com/videos/view/zero-punctuation"/>
- </outline>
- <outline title="Tech News" text="Tech News">
- <outline text="Blog - Stack Exchange"
- title="Blog - Stack Exchange" type="rss"
- xmlUrl="http://blog.stackoverflow.com/feed/" htmlUrl="http://blog.stackoverflow.com"/>
- <outline text="EcoGeek" title="EcoGeek" type="rss"
- xmlUrl="http://feeds.feedburner.com/EcoGeek" htmlUrl="http://www.ecogeek.org/"/>
- <outline text="git blog" title="git blog" type="rss"
- xmlUrl="http://gitlog.wordpress.com/feed/" htmlUrl="http://gitlog.wordpress.com"/>
- <outline text="Google Blogoscoped"
- title="Google Blogoscoped" type="rss"
- xmlUrl="http://blog.outer-court.com/rss.xml" htmlUrl="http://blogoscoped.com"/>
- <outline text="LLVM Project Blog" title="LLVM Project Blog"
- type="rss"
- xmlUrl="http://blog.llvm.org/feeds/posts/default" htmlUrl="http://blog.llvm.org/"/>
- <outline text="Official Google Reader Blog"
- title="Official Google Reader Blog" type="rss"
- xmlUrl="http://googlereader.blogspot.com/feeds/posts/default" htmlUrl="http://googlereader.blogspot.com/"/>
- <outline text="Python News" title="Python News" type="rss"
- xmlUrl="http://www.python.org/channews.rdf" htmlUrl="http://www.python.org/"/>
- <outline text="The Django weblog" title="The Django weblog"
- type="rss"
- xmlUrl="http://www.djangoproject.com/rss/weblog/" htmlUrl="http://www.djangoproject.com/weblog/"/>
- <outline text="The OpenHatch blog"
- title="The OpenHatch blog" type="rss"
- xmlUrl="https://openhatch.org/blog/feed/" htmlUrl="https://openhatch.org/blog"/>
- <outline text="WeeChat dev news" title="WeeChat dev news"
- type="rss" xmlUrl="http://dev.weechat.org/feed/atom" htmlUrl="http://dev.weechat.org/"/>
- </outline>
- <outline title="Comic" text="Comic">
- <outline text="Abstruse Goose" title="Abstruse Goose"
- type="rss" xmlUrl="http://abstrusegoose.com/feed" htmlUrl="http://abstrusegoose.com"/>
- <outline text="Animals Being Dicks"
- title="Animals Being Dicks" type="rss"
- xmlUrl="http://animalsbeingdicks.com/rss" htmlUrl="http://animalsbeingdicks.com/"/>
- <outline text="Basic Instructions"
- title="Basic Instructions" type="rss"
- xmlUrl="http://basicinstructions.net/basic-instructions/atom.xml" htmlUrl="http://basicinstructions.net/basic-instructions/"/>
- <outline
- text="Channelate by Ryan Hudson : Week daily comics"
- title="Channelate by Ryan Hudson : Week daily comics"
- type="rss" xmlUrl="http://www.channelate.com/feed/" htmlUrl="http://www.channelate.com"/>
- <outline text="Ctrl+Alt+Del" title="Ctrl+Alt+Del" type="rss"
- xmlUrl="http://www.cad-comic.com/rss/" htmlUrl="http://www.cad-comic.com/"/>
- <outline text="Dilbert Daily Strip"
- title="Dilbert Daily Strip" type="rss"
- xmlUrl="http://feeds.feedburner.com/DilbertDailyStrip" htmlUrl="http://dilbert.com/"/>
- <outline text="Dresden Codak" title="Dresden Codak"
- type="rss"
- xmlUrl="http://feeds2.feedburner.com/rsspect/fJur" htmlUrl="http://dresdencodak.com"/>
- <outline text="Hyperbole and a Half"
- title="Hyperbole and a Half" type="rss"
- xmlUrl="http://feeds.feedburner.com/Hyperbole-and-a-half" htmlUrl="http://hyperboleandahalf.blogspot.com/"/>
- <outline text="Loading Artist" title="Loading Artist"
- type="rss" xmlUrl="http://www.loadingartist.com/feed/" htmlUrl="http://www.loadingartist.com"/>
- <outline text="Not Invented Here" title="Not Invented Here"
- type="rss"
- xmlUrl="http://feeds.feedburner.com/NotInventedHere" htmlUrl="http://notinventedhe.re/"/>
- <outline text="Penny Arcade" title="Penny Arcade" type="rss"
- xmlUrl="http://www.penny-arcade.com/rss.xml" htmlUrl="http://www.penny-arcade.com"/>
- <outline text="pictures for sad children"
- title="pictures for sad children" type="rss"
- xmlUrl="http://www.rsspect.com/rss/pfsc.xml" htmlUrl="http://www.picturesforsadchildren.com"/>
- <outline text="QC RSS" title="QC RSS" type="rss"
- xmlUrl="http://www.questionablecontent.net/QCRSS.xml" htmlUrl="http://www.questionablecontent.net"/>
- <outline text="SMBC - Inline" title="SMBC - Inline"
- type="rss"
- xmlUrl="http://pipes.yahoo.com/pipes/pipe.run?_id=ziSa_qe13RGGTT5lBR50VA&amp;_render=rss" htmlUrl="http://pipes.yahoo.com/pipes/pipe.info?_id=ziSa_qe13RGGTT5lBR50VA"/>
- <outline text="Surviving The World"
- title="Surviving The World" type="rss"
- xmlUrl="http://survivingtheworld.net/feed.xml" htmlUrl="http://survivingtheworld.net"/>
- <outline text="That Deaf Guy" title="That Deaf Guy"
- type="rss"
- xmlUrl="http://www.thatdeafguy.com/?feed=rss2" htmlUrl="http://www.thatdeafguy.com"/>
- <outline text="xkcd.com" title="xkcd.com" type="rss"
- xmlUrl="http://xkcd.com/rss.xml" htmlUrl="http://xkcd.com/"/>
- </outline>
- </body>
-</opml>
View
@@ -1,38 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <title>wraithan.net - index</title>
- <link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css">
- <script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-9867191-3']);
- _gaq.push(['_trackPageview']);
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-
- </script>
- </head>
- <body style="padding-top:40px;">
- <div class="topbar">
- <div class="topbar-inner">
- <div class="container">
- <a class="brand" href="index.html">Wraithan</a>
- <ul>
- <li><a href="https://github.com/wraithan">Code</a></li>
- <li><a href="http://wiki.wraithan.net/">Wiki</a></li>
- <li><a href="http://blog.wraithan.net/">Blog</a></li>
- <li><a href="/pubkey.txt">key</a></li>
- <li><a href="http://wraithan.readthedocs.org/">Resume</a></li>
- </ul>
- </div>
- </div>
- </div>
- <div class="container">
- <h1>Ohai</h1>
- <p>This is my personal site. The top has the interesting stuff for now.</p>
- </div>
- </body>
-</html>
View
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*- #
+
+AUTHOR = u"Wraithan"
+SITENAME = u"wraithan.net"
+SITEURL = ''
+
+TIMEZONE = 'Europe/Paris'
+
+DEFAULT_LANG = 'en'
+
+# Blogroll
+LINKS = (('Pelican', 'http://docs.notmyidea.org/alexis/pelican/'),
+ ('Python.org', 'http://python.org'),
+ ('Jinja2', 'http://jinja.pocoo.org'),
+ ('You can modify those links in your config file', '#'),)
+
+# Social widget
+SOCIAL = (('You can add links in your config file', '#'),
+ ('Another social link', '#'),)
+
+DEFAULT_PAGINATION = 10
View
View
@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*- #
+
+import sys
+sys.path.append('.')
+from pelicanconf import *
+
+SITEURL = 'http://beta.wraithan.net'
+
+DELETE_OUTPUT_DIRECTORY = True
+
+# Following items are often useful when publishing
+
+# Uncomment following line for absolute URLs in production:
+#RELATIVE_URLS = False
+
+#DISQUS_SITENAME = ""
+#GOOGLE_ANALYTICS = ""
View
@@ -0,0 +1,9 @@
+Jinja2==2.6
+Pygments==1.5
+Unidecode==0.04.9
+blinker==1.2
+docutils==0.9.1
+feedgenerator==1.2.1
+pelican==3.0
+pytz==2012d
+
View
@@ -1,2 +0,0 @@
-User-agent: *
-Disallow:

0 comments on commit b737b73

Please sign in to comment.