On Tue, 2003-04-01 at 12:05, Ian Bicking wrote: > I've made another sort of proto-Wiki, available in the Sandbox > (ianbicking/Wiki/Wiki.py). There's a simple Webware UI around the > UI-independant library, but there's nothing special about it. > > It doesn't have a lot of features, because I was originally writing it > as an example application for a paper. But I like it's basic structure, > and adding more features shouldn't be too hard. > > It uses reST and probably requires docutils from CVS. It doesn't use a > database -- in the previous implementation (actually no relation to this > one) the database was used exclusively for searching (links, backlinks, > titles, etc). That could probably be done by keeping index files, so it > could be efficient without requiring a database.
Along the lines of using reST and whatnot... Pretty much junk at this point, but my local "sandbox" (in subversion): http://svn.etria.org/root/trunk/webware-site/server/Plugins/ I do not know the Webware internals well yet, but what I basically want is a caching setup for generated documents (such as the XML you get from reST or anything produced with XML and XSLT). My current solution seems overly complex :) I have a parent class 'Cached' which holds 'Source' objects. There are a number of different kinds of Source objects such as FileSource and DatabaseSource (in theory...right now I just have FileSource) since each type of Source has different ways of getting its mtime (a file would get it from os.stat, data from a database would prob need a mtime column...I want HTTP/FTP/Dav sources too at some point..). A class that inherits 'Cached' will hold a list of Source objects as well as a result object (which is really a Source object). Whenever a one of these documents is needed, lets say by calling Document.content(), all the source mtimes are checked against the result mtime and the cache content is returned (after being re-generated if any of the sources are newer than the current cache). Make sense? It's just a slick (in theory) way of saying "gimme this document, but dont regenerate it if its in the cache". My questions: Is there a better way? Is there some internal method that will tell me where the Cache directory is? How can I get to the config options set in the Config direcotry? (Ian, you told me this on IRC at some point but it slipped my mind) Thanks, -Tom
signature.asc
Description: This is a digitally signed message part