The state of Catkin
2003-04-27 22:37:05 UTC
A status update for those of you who are wondering what's happening with Catkin: Well, I'm working on it. I've been a bit busy with other things over the last few months, but I've snatched a bit of time to work on it here and there, and I'm slowly getting closer to 0.3.
The most significant change is that I've switched it from using HTML::Template to Template::Toolkit. This makes the templates much more powerful. I've also made it so that instead of having a predefined set of templates, you can now create any number of templates. These templates are divided into two types: index templates (which are rebuilt whenever anything changes), and individual templates (which can have a user-defined set of dependencies controlling when they get rebuilt). These templates have access to all the data in the blog.
In order to do this efficiently I'm now going to have to make some changes to the internals so that there's an effective caching system. I'm also thinking about plugins, though they almost certainly won't be in 0.3.0.
My idea about plugins goes something like this: There will be several different types of plugins. Most obviously, there should be input plugins to control how data is formatted as it is input to the system. At the moment, when you write a new entry, you can have the data interpreted as text which gets transformed to HTML, or as HTML which gets automatically corrected, or as HTML which doesn't get corrected. It'd be good to allow other formatting options such as Wiki-style or whatever. This should certainly be done as plugins.
The other type of plugin that I'm thinking about is some way to extend the data that can be stored with an entry or a comment. Adding methods to the entry and comment objects should be fairly simple, I think. More complicated is how that data should then be stored, both in memory and on disk. I think I've come up with a nice solution though: Just give access to the DOM tree corresponding to the entry or comment, and allow plugins to manipulate that directly. (I might also set up a few convenience functions for simple manipulations of the tree.) Then storing on disk is simply a matter of transforming the tree into its XML representation and writing it to a file.
I'll have to give these ideas a bit of testing. If anyone wants to take a look at the current state of the code, just ask. Someday I'll set myself up with a public CVS repository.