Re: line count plugin
Wari Wahab <wari-Yu9E6tdDWSZWk0Htik3J/[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <[email protected]> |
* emf <i-IT4L295iNO/[email protected]> [030225 08:07]: > Er, let me clarify this: I can't even see how to get all the lines in > a plugin (I can see how to in a parser). Yes, the rather unfortunate thing in 0.6 is the inability for plugins to look inside an entry and do nifty stuff available with the information. I was just talking about this to the developers. I plan to have: 1. Plugins that can read entries before caching, so metadata produced by plugins are not called on demand anymore when cached. Your proposed plugin fits this description, why count again when the resulting number is going to stay the same?) 2. Entry reading plugins that may not what data to be cached, therefore calculated every time. Plugins that does this would include comment counts, google api queries (sorry, that's a bad one), but yeah you get the idea. So, for now, what are your options? You could wait for 0.7 or if this is important (for your site design, etc), you could either hack 0.6 or get your plugin to read the files itself, getting values of the filename from the entryList list of dicts. The plugin have to be done in such a way that when $wc is called, a counter increases to know which entry you are looking at. You can look at the dotComments plugin code to see how this is done: http://roughingit.subtlehints.net/code/pyblosxom-dotComments.tar.gz -- Regards: Wari Wahab Senior R&D Engineer Celestix Networks http://www.celestix.com/ ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf