PyBlosxom Manual

PyBlosxom Manual for PyBlosxom 1.3.1

Will Guaraldi

This manual will cover all aspects of using and developing for PyBlosxom. It is a work in progress.

Version: 1.3.1

Copyright (c) 2005, 2006 Will Guaraldi. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being no Invariant Sections, with the Front-Cover Texts being no Front-Cover Texts, and with the Back-Cover Texts being no Back-Cover Texts. A copy of the license is included in the appendix entitled "GNU Free Documentation License".


Table of Contents
Introduction
1. Mission, What's Missing, and Helping Out
2. Revision History
1. PyBlosxom
1.1. About PyBlosxom
1.2. Who shouldn't use PyBlosxom
1.3. Where to go for help
2. Installing PyBlosxom
2.1. Pre-requisites for installing PyBlosxom
2.2. Installing PyBlosxom
2.3. Trouble-shooting
2.3.1. Running ./pyblosxom.cgi doesn't work.
2.3.2. I see a HTTP 404 error when I try to bring up my blog
2.3.3. I see a HTTP 500 error when I try to bring up my blog
2.3.4. I have other issues
2.3.5. UGH! My blog looks UGLY!
2.3.6. I hate writing in HTML!
3. Advanced Installation
3.1. Using mod_python, Twisted or WSGI
3.2. Renaming the pyblosxom.cgi Script
3.2.1. Change the Name of the pyblosxom.cgi Script
3.2.2. Hiding the .cgi with RewriteRule
4. Flavours
4.1. Flavours and Templates
4.2. Where To Put Your Flavour Files
4.3. Template Variables
4.3.1. URL Encoding and Escaping of Template Variables
4.3.2. Variables From config.py
4.3.3. Calculated Template Variables
4.3.4. Template Variables Only Available in the story Template
4.3.5. Template Variables From Plugins
4.4. Invoking a Flavour
4.5. Order of Operations to Figure Out Which Flavour to Use
4.6. Examples of Templates
5. Plugins
5.1. Setting PyBloxsom up to Use Plugins
5.2. Finding Plugins
5.3. Installing Plugins
5.4. Writing Your Own Plugins
6. Writing Entries
6.1. Categories
6.2. The Format of an Entry
6.3. Posting Date
6.4. Entry Parsers
6.5. Beyond Editors
6.5.1. weblog-add
6.5.2. Using w.bloggar
6.5.3. Using Ecto
6.5.4. Other blog tools?
7. Static Rendering
7.1. Configuring Static Rendering
7.2. Running Static Rendering
7.2.1. Render Everything
7.2.2. Incremental Rendering
7.3. Rendering Other URIs
7.4. Additional Thoughts
8. Comments
8.1. Summary
8.2. Installing the comments plugin
8.3. Additional comments plugin configuration
8.3.1. Enabling email notification
8.4. Writing comments plugin templates
8.5. Dealing with comment spam
8.5.1. wbgcomment_blacklist
8.5.2. nospam plugin
8.5.3. rolling your own
8.6. Installing trackback
8.7. Installing pingback
8.8. Installing the CommentAPI
9. Syndication
9.1. Feed formats that come with PyBlosxom
9.1.1. RSS 0.9.1
9.1.2. RSS 2.0
9.1.3. Atom 1.0
9.2. Debugging your feeds
10. PyBlosxom Architecture
10.1. Parts
10.2. Lifecycle of a PyBlosxom Request
10.3. Lifecycle of the blosxom_handler
10.4. Lifecycle of the blosxom Renderer
10.5. Callbacks
10.5.1. Types of callbacks
10.5.2. Callbacks that have blosxom equivalents
10.5.3. cb_prepare
10.5.4. cb_logrequest
10.5.5. cb_filelist
10.5.6. cb_filestat
10.5.7. cb_pathinfo
10.5.8. cb_renderer
10.5.9. cb_entryparser
10.5.10. cb_preformat
10.5.11. cb_postformat
10.5.12. cb_start
10.5.13. cb_end
10.5.14. cb_head
10.5.15. cb_date_head
10.5.16. cb_story
10.5.17. cb_story_end
10.5.18. cb_foot
10.6. Entry Parsers
10.7. Pre-formatters and Post-formatters
10.8. Renderers
11. Writing Plugins
11.1. Things all plugins should have
11.2. How to log problems to a log file
11.3. How to store plugin state between callbacks
11.4. How to implement a callback
11.5. Writing an entryparser
11.6. Writing a preformatter plugin
A. Appendix: listing of config.py variables
B. Appendix: GNU Free Documentation License
List of Tables
4-1. Template variables from config.py
4-2. Calculated template variables
4-3. Variables in the story template
4-4. Examples of request URIs
4-5. Specifying flavour using the querystring
4-6. Default flavour used
List of Examples
2-1. first post
4-1. renderer variable value
4-2. creating your own config.py variables
4-3. default_flavour variable value
5-1. plugin_dirs variable value
5-2. load_plugins variable value
6-1. first post
6-2. more complex first post
6-3. first post with metadata
7-1. static rendering configuration
7-2. running static rendering at the command line
7-3. running static rendering incrementally
7-4. static_urls variable value
7-5. static rendering shell script
8-1. Template for plugin for rejecting comments
9-1. example of RSS 0.9.1 feed
10-1. Example of cb_prepare usage
10-2. Example of cb_logrequest argument dict
10-3. Example of cb_head usage