Will's blog

purpose: Will Kahn-Greene's blog of Miro, PyBlosxom, Python, GNU/Linux, random content, PyBlosxom, Miro, and other projects mixed in there ad hoc, half-baked, and with a twist of lemon

[ home | blog home | recent activity ]

Thu, 13 Mar 2003

Another PyBlosxom plugin example

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 here.
4/8/2003 - Updated plugin to new architecture.

Comments:

Post a new comment:

Three things:

  1. New comments get placed in a "draft" status and will NOT show up on the site until I explicitly approve it. Sometimes that happens within 24 hours.
  2. I reserve the right to reject/remove inappropriate comments.
  3. Sometimes I'll reply to a comment directly in email--so make sure your email address is correct.

If you can't for some reason post a comment, send me an email: willg at bluesock dot org.

Your name:


Your e-mail address (this doesn't get displayed to anyone--sometimes I'll reply directly to you):


URL of your website (optional):


Comment:


Yes, I am a human!


pyblosxom::1.5-dev git-master

Copyright 1996 to 2012, Will Guaraldi Kahn-Greene, under the Creative Commons BY-SA 3.0 license

Creative Commons License
Will's Blog by William Kahn-Greene is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.