KPLUG-List Digest, Vol 7, Issue 9
george_geller at speakeasy.net
Tue Jul 5 17:49:44 PDT 2005
> George Geller wrote:
> > I've added SVG support to ZWiki, with the goal of creating a wiki engine
> > that will conveniently handles chemical structures from programs like
> > bkchem. I've got it working and I'd like to present it on Thursday.
> > First I'll demo the application, then I'll give a tour of the code.
> Tracy R. Reed wrote:
> Wow, that sounds really cool! Wish I could make it this Thursday.
> Unfortunately I won't be able to make it but I would love to hear more
> about how you did this. I hope you will put a writeup online somewhere
> and a working example that we can access. There are various other
> content types that I would like to add to zwiki also and I am curious if
> your work might be of use.
Eventually, it will all be in the wikicampus project on sourceforge.net.
I will also have a demo site. This will take a while, since I can't
spend as much time as I'd like working on it. (If someone could show me
how to set up zope behind apache, it would speed things up a bit.) In
the meantime, I'll try to write up something and on the kplug wiki. (I
think I can post screen dumps there.)
Here's a short summary:
You install zopeedit on your client and configure it.
On your client, you create the chemical structures in SVG format with a
slightly modified version of bkchem.
You open a ZWiki page with a browser, like the firefox nightly build
that includes SVG support. Upload an SVG file as in image attached to
the wiki page.
I modified ZWiki's Editing.py so that it checks for content_type ==
'image/svg+xml' and generates html code that displays in image in the
wiki page with a little pencil icon next to the image of the molecule.
If you click on the pencil icon next to the SVG picture, your file gets
sent back to the client for editing with bkchem as the external editor.
You edit the text on the wiki page as before, either with you external
(text) editor, or in the text box in zwiki. It's a lot easier to
demonstrate than to explain like this.
So, mostly I glued together what other people had done. The hooks
weren't exactly in a well-documented API, but if you look at the source
code it is easy enough (at least in retrospect).
There are a lot of chemical structures posted on the web, but I couldn't
find an wiki implementation for them.
More information about the KPLUG-List