ZOMG new blog! I finally killed wordpress, and now this is a fancy-schmancy "roll your own" setup. Right now, I'm calling it "whizbang" because I have no good name, though cactus suggested a few.
I have a few plans for features coming up soon:
- comments (I need a good scheme for this)
- post-specific text filters (markdown, textile, etc)
- svn hooks (so I can commit posts to svn and update the blagh)
Looks like we're pretty much done here.
usage: whizbang.py [options] template entry-or-directory
options:
--version show program's version number and exit
-h, --help show this help message and exit
-i NAME, --index=NAME
generate and index file named NAME
(default=index.html)
-n N, --num-entries=N
limit entries for an index file to N
(default=0 for all)
-t, --tags generate tag files
-e, --entries generate individual files per entry
-v, --verbose verbose output
How does it work? How do I use it? Quite simply, I run whizbang a handful of times to regenerate me blagh:
whizbang.py -te -n 10 my_template my_posts/
This generates index.html (implied -i argument) for 10 items, all the
*.tags.html pages, and the individual entry pages (per post).
Next, I may want a full.html page:
whizbang.py -i full.html my_template my_posts/
And finally, I may want an RSS feed:
whizbang.py -i rss.xml -n 10 my_RSS_template posts/
Cram all this in some bash script, or a cron job, and we're in business.
UPDATES, 13.02.2007 Well, I made some pretty decent internal changes to this little blog script. First off, I got rid of my custom parsing for RFC2822 based data that I am using. Instead, we now use python's email.Message / email.Parser. This works out a little bit better.
Secondly, I removed my hand-kludged templates, which were great, but not as variable as I'd like. So now, this is build using genshi's TextTemplate.
http://genshi.edgewall.org/wiki/Documentation/text-templates.html
Genshi itself is a bit weighty for me, and I doubt I'd ever use the true genshi templates for personal use. However, the TextTemplate class is perfect. I'd love to be able to strip that portion out of the code, but that's a lot of work I don't really care to do right now.
Anyway, with the inclusion of genshi templates, that means I can actually generate an rss feed now. Hooray! I'll get to that in a few days.