blog.notmyidea.org/pelican-a-simple-static-blog-generator-in-python.html

216 lines
No EOL
9.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>Pelican, a simple static blog generator in python</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="./theme/css/main.css" type="text/css" />
<link href="./feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log ATOM Feed" />
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<!--[if lte IE 7]>
<link rel="stylesheet" type="text/css" media="all" href="./css/ie.css"/>
<script src="./js/IE8.js" type="text/javascript"></script><![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" media="all" href="./css/ie6.css"/><![endif]-->
</head>
<body id="index" class="home">
<a href="http://github.com/ametaireau/">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" />
</a>
<header id="banner" class="body">
<h1><a href=".">Alexis' log </a></h1>
<nav><ul>
<li><a href="./pages/projects.html">projects</a></li>
<li ><a href="./category/asso.html">asso</a></li>
<li class="active"><a href="./category/dev.html">dev</a></li>
<li ><a href="./category/python.html">python</a></li>
<li ><a href="./category/system.html">system</a></li>
<li ><a href="./category/thoughts.html">thoughts</a></li>
</ul></nav>
</header><!-- /#banner -->
<section id="content" class="body">
<article>
<header> <h1 class="entry-title"><a href=""
rel="bookmark" title="Permalink to Pelican, a simple static blog generator in python">Pelican, a simple static blog generator in python</a></h1> </header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2010-10-06T00:00:00">
Wed 06 October 2010
</abbr>
<address class="vcard author">
By <a class="url fn" href="./author/Alexis Métaireau.html">Alexis Métaireau</a>
</address>
<p>In <a href="./category/dev.html">dev</a>. </p>
</footer><!-- /.post-info -->
<p>Those days, I've wrote a little python application to fit my blogging needs.
I'm an occasional blogger, a vim lover, I like restructured text and DVCSes, so
I've made a little tool that makes good use of all that.</p>
<p><a class="reference external" href="http://alexis.notmyidea.org/pelican/">Pelican</a> (for calepin) is just a simple tool to generate your blog as static
files, letting you using your editor of choice (vim!). It's easy to extend,
and has a template support (via jinja2).</p>
<p>I've made it to fit <em>my</em> needs. I hope it will fit yours, but maybe it wont, and
it have not be designed to feet everyone's needs.</p>
<p>Need an example ? You're looking at it ! This weblog is using pelican to be
generated, also for the atom feeds.</p>
<p>I've released it under AGPL, since I want all the modifications to be profitable
to all the users.</p>
<p>You can find a mercurial repository to fork at <a class="reference external" href="http://hg.lolnet.org/pelican/">http://hg.lolnet.org/pelican/</a>,
feel free to hack it !</p>
<p>If you just want to get started, use your installer of choice (pip, easy_install, …)
And then have a look to the help (<cite>pelican --help</cite>)</p>
<div class="highlight"><pre><span class="nv">$ </span>pip install pelican
</pre></div>
<div class="section" id="usage">
<h2>Usage</h2>
<p>Here's a sample usage of pelican</p>
<div class="highlight"><pre><span class="nv">$ </span>pelican .
writing /home/alexis/projets/notmyidea.org/output/index.html
writing /home/alexis/projets/notmyidea.org/output/tags.html
writing /home/alexis/projets/notmyidea.org/output/categories.html
writing /home/alexis/projets/notmyidea.org/output/archives.html
writing /home/alexis/projets/notmyidea.org/output/category/python.html
writing
/home/alexis/projets/notmyidea.org/output/pelican-a-simple-static-blog-generator-in-python.html
Done !
</pre></div>
<p>You also can use the <cite>--help</cite> option for the command line to get more
informations</p>
<div class="highlight"><pre><span class="nv">$pelican</span> --help
usage: pelican <span class="o">[</span>-h<span class="o">]</span> <span class="o">[</span>-t TEMPLATES<span class="o">]</span> <span class="o">[</span>-o OUTPUT<span class="o">]</span> <span class="o">[</span>-m MARKUP<span class="o">]</span> <span class="o">[</span>-s SETTINGS<span class="o">]</span> <span class="o">[</span>-b<span class="o">]</span>
path
A tool to generate a static blog, with restructured text input files.
positional arguments:
path Path where to find the content files <span class="o">(</span>default is
<span class="s2">&quot;content&quot;</span><span class="o">)</span>.
optional arguments:
-h, --help show this <span class="nb">help </span>message and <span class="nb">exit</span>
-t TEMPLATES, --templates-path TEMPLATES
Path where to find the templates. If not specified,
will uses the ones included with pelican.
-o OUTPUT, --output OUTPUT
Where to output the generated files. If not specified,
a directory will be created, named <span class="s2">&quot;output&quot;</span> in the
current path.
-m MARKUP, --markup MARKUP
the markup language to use. Currently only
ReSTreucturedtext is available.
-s SETTINGS, --settings SETTINGS
the settings of the application. Default to None.
-b, --debug
</pre></div>
<p>Enjoy :)</p>
</div>
</div><!-- /.entry-content -->
<div class="comments">
<h2>Comments !</h2>
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_identifier = "pelican-a-simple-static-blog-generator-in-python.html";
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://blog-notmyidea.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
</div>
</article>
</section>
<section id="extras" class="body">
<div class="blogroll">
<h2>blogroll</h2>
<ul>
<li><a href="http://biologeek.org">Biologeek</a></li>
<li><a href="http://filyb.info/">Filyb</a></li>
<li><a href="http://www.libert-fr.com">Libert-fr</a></li>
<li><a href="http://prendreuncafe.com/blog/">N1k0</a></li>
<li><a href="http://ziade.org/blog">Tarek Ziadé</a></li>
<li><a href="http://zubin71.wordpress.com/">Zubin Mithra</a></li>
</ul>
</div><!-- /.blogroll -->
<div class="social">
<h2>social</h2>
<ul>
<li><a href="./feeds/all.atom.xml" rel="alternate">atom feed</a></li>
<li><a href="http://twitter.com/ametaireau">twitter</a></li>
<li><a href="http://lastfm.com/user/akounet">lastfm</a></li>
<li><a href="http://github.com/ametaireau">github</a></li>
</ul>
</div><!-- /.social -->
</section><!-- /#extras -->
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://alexis.notmyidea.org/pelican/">pelican</a>, which takes great advantages of <a href="http://python.org">python</a>.
</address><!-- /#about -->
<p>The theme is by <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a>, thanks!</p>
</footer><!-- /#contentinfo -->
<script type="text/javascript">
var disqus_shortname = 'blog-notmyidea';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
</body>
</html>