Another PyBlosxom plugin example

Note: This is an old post in a blog with a lot of posts. The world has changed, technologies have changed, and I've changed. It's likely this is out of date and not representative. Let me know if you think this is something that needs updating.

This plugin registers with the prepareChain and for each entry it adds a $wc metadata variable. The wordcount is sort of an expensive process since it requires the data of the entry to be populated and we only populate that on-demand. Thus we need to populate the $wc variable on-demand as well.


The effects of this is that I can add a $wc variable to my story.html template file and you see a wc: thing on all of my entries.

This plugin and the entry that describes this plugin were written, tested, and documented in 15 minutes.


3/19/2003 Moved code to /~willkg/dev/pyblosxom/.

4/8/2003 Updated plugin to new architecture.

Want to comment? Send an email to willkg at bluesock dot org. Include the url for the blog entry in your comment so I have some context as to what you're talking about.