2004/06/08 CMcC - Update: cosmetic mods to Wikit checked into Wikit CVS. This version is required for writable wikit vfs.
A Wikit tcl vfs.
It's a work in progress, but should eventually lead to the ability to directly support Wikit under Tclhttpd.
06jun04 jcw - Great! I've folded your one-line change into wikit, so the CVS repository and wikit.kit should be ok now. Apart from being just plain cool, this might also help find out to what extent a VFS driver layer affects overhead. Another interesting side is that this may help us come up with a good way to define plug-ins for tclhttpd, when both tclhttpd itself and the functionality to be plugged into it is a starkit - maybe there's an intersection with TIP 189 (modules) waiting to be discovered here?
CMcC - The matter of tclhttpd plugins is an interesting one. At the moment, you can drop things into (usually) /usr/lib/custom, and if they're .tcl files they're sourced. One of the simple supplied custom modules is dodirs.tcl which loads any directory in custom/ containing a startup.tcl file (this was with a view, and by analogy to, running starkits unpacked from custom/) it would be very easy to write a starload.tcl in custom which loads wrapped starkits into tclhttpd's directory and proc namespaces, to add functionality to the running server. Vikit now sources wiki starkit to get access to the wiki functionality.
If you like (when vikit's tested and functional) you could add vikit.tcl to the wikit starkit, and get a self-attaching wikit.
Some Q&D documentation: the wikit is in essence a flat collection of id:(title,page,who,date) records, but is habitually searched by supplying a title or keyword to be searched for. In vikit, id is treated as a file name, and titles and keywords (distinguished by trailing '*') are treated as the file names of synthetic directories containing the names of all the records matched. Appending '!' to a record number yields a directory of pages referencing that record. Appending a '@' to a record number yields the file in its original format, leaving it naked yields the file rendered in HTML.
TODO: make the choice of rendering easier - so one could return Tk formatted output, make it an error to open an *@ file for anything but reading.
LV Near the first paragraph is a mention of what vikit is - a wikit virtual file system driver providing read/write support. What might be useful is an answer to the questions exactly what features does vikit.tcl provide that are not by default in a wikit - and why would I want those features?
If I were to take the words literally, I would say that vikit.tcl provides something (perhaps a general application? I'm uncertain of the audience that the code is intended) the ability to mount a wikit data file (the thing that contains all the data pages) so that the application can both read and write information to the wikit's data file. I presume that this would only be safe if the wikit is not using the data file at the time.
If the author or someone who understands vikit stops by here, could you confirm or correct this impression?
CMcC vikit.tcl provides a modifiable filesystem view into a wikit file. You mount a wikit.tkd somewhere (say /wikit) then you can read, write and append to pages using open/read/write/close. The various searches can be phrased as globs.