|
From: Wari W. <wa...@ce...> - 2003-02-10 12:11:33
|
I've checked in some code today, basically infrastucture stuff. But what the heck is infrastructure and what am I actually doing. I've got to answer this question first I guess. There are a few things I want to do, one of them, the external cron job thing and we talked about previously. But as an external entity, I wanted to reuse a lot of pyblosxom code if possible, and if I added in a new feature or two, I would be able to get all those features immediately without changing a line of code. Here's what I planned for (as much as I can remember). 1. Structured caching 2. Multiple entry file types 3. Renderers 4. XMLRPC plugins And some other things I can't remember off hand. 1. External programs should use the cache if possible to get important entry data stuff. Cache are mostly post formatted data, processed by preformatters, or can contain data processed by entryparsers. This is to ensure that there's no slowdown in whatever data we deal with. This is done with the libs.cache module, very simple to get data from. 2. What if our external program kicks off before an entry gets cached? What if the entries are not in txt format? That's where entryparsers comes in. Entryparsers right now look at .txt files, but later in its life it will be able to get .xhtml (where you get the title off a <title> tag and metadata out of a <meta> tag. Easy as that, of course if you use xhtml, your input must be a valid xhtml possibly verified by some external entity (emacs?) the body text is available from the <body></body> tag (duh!:) If I'm free, I read up on DOM and see if I can create my XHTML parser. Possibility are endless here, word documents (yeah you have to convert them to html), pdfs, latex (huh?) whatever you can throw at it as long as you have the parser for it, it should work. If you look at http://roughingit.subtlehints.net/pyblosxom-dev and compare the output of http://roughingit.subtlehints.net/pyblosxom you'll see entryparsers at work, I created a dummy xhtml.py which is a copy of txt.py, you'll see that in the permalink(#), you'll see text.xhtml.html as the link, of course following it - http://roughingit.subtlehints.net/pyblosxom/test.xhtml.html, does not work as I still have to change startup() and getProperties a bit as they hardcode the txt extension. This is still a work in progress, but it's getting there. What do you think? I need feedback here 3. Renderers - These are page generators, basically they are the code in libs.pyblosxom.PyBlosxom.run() after the Walk, now called fileListHandler(), I want to use another object for that, something around the structure of how cache/ and preformatters/ work. Renderers should be able to handle some input, and produce an output in a query, together using entryparser and cache, I should be able to change the way templating works, standard blosxom, or go all out with Cheetah, you name it any hacker should be able to extend it. If people love MovableType (HTML::Template) style of using templates someone would easily hack out such code without modifying pyblosxom. Is this a good idea? 4. XMLRPC.py is fixed right now, I need them to be pluggable in order to support trackback queries, as well as a pingback ping server. If the user want's bloggerAPI I should be able to drop that in and make it optional. -- Regards: Wari Wahab Senior R&D Engineer Celestix Networks http://www.celestix.com/ |