Help needed with writing a plugin for rss2 (a bit long)
"Rune Morling" <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <000001c397ee$3f9e85b0$dc00000a@scott> |
Hi all, I would like to write a plugin for pyblosxom, both as a learning experience, but also out of a desire to get proper rss2.0 handling in pyblosxom via ?flav=rss2 or index.rss2. I've looked through the wiki and looked around in the code of pybloxom, but I'm not quite sure how to proceed. This will be a learning experience for me - I'm aiming to document the process thoroughly perhaps allowing my effort to be kind of a plugin writing HOWTO. I'll try to explain what I want to do and what my questions are in the following. --------- Overview: The plugin needs to subsitute certain template variables when a call to the appropriate flavour (rss2) is made. A default set of rss2 templates will be supplied with the plugin. ---------- Questions: When is the plugin called during the process? - This is still unclear to me. How do I make the plugin react only to ?flav=rss2? - Does it need to hook into something in order to do this? How do I make the plugin actually replace the template vars? - This part is opague to me. When the template substitution is complete, do I need to do something particular or does pyblosxom take care of the rest wrt output? How do I copy template variables out of config.py? - I'll use them to populate the rss_xxx variables documented below. Template variables (the py['xxx'] stuff needs to be copied from config.py): # What's this blog's title? rss_title = py['blog_title'] # What's this blog's author name and email? rss_author = py['blog_author'] # What's this blog's description (for outgoing RSS feed)? rss_description = py['blog_description'] # What's this blog's primary language (for outgoing RSS feed)? rss_lang = py['blog_language'] rss_link: link to the uri for the blog. rss_lastbuilddate: returns string w/date of the newest post. rss_length_item_desc: whole, positive number describing how many characters of each entry to include in the feed. The default value is 0. rss_item_desc: template variable which is exchanged with the first rss_length_item_desc characters of each entry. rss_generator: returns the version number of pyblosxom along with the plugin version. rss_ttl: Whole, positive number. How long the feed can be cached (in minutes) before an update is retried (for aggregator use). Defaults to 60. # -- end I hope someone will be able to give me some advice. Kind regards, rune ------------------------------------------------------- This SF.net email is sponsored by OSDN developer relations Here's your chance to show off your extensive product knowledge We want to know what you know. Tell us and you have a chance to win $100 http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54