[pmwiki-users] PmWiki namespaces

Twylite twylite at crypt.co.za
Sat Aug 29 08:36:41 CDT 2009


Hi,
> I'm working on a new way of handling attachments in PmWiki that would
> make file meta information (filesize, mime type, copyright, etc.)
> accessible and to some extent editable from within PmWiki (with eg.
> {Attach:Site./pmwiki-powered.png$MimeType}). Essentially I'm taking a
> new approach at what Attachtable[1] does and re-implementing it in a
> more generic manner.
> At this point, I haven't decided exactly how to do this, but a vague
> structure is forming based on adding a custom PageStore for
> attachments, not entirely unlike Sisterly[2].
I thought I'd throw in an interesting concept here that I encountered 
recently, and is a different way of thinking about attachments.

Sputnik (http://sputnik.freewisdom.org/) is a wiki engine written in 
Lua.  Unlike most Wikis it has no support for attachments; instead each 
wiki page has a MimeType and an associated handler.  The handler defines 
how to handle actions for that MimeType.  In this way any resource - not 
just text with wiki markup - becomes a first-class citizen of the Wiki.  
A link [[A.B]] may be a Wiki page, a binary, an image, or just about 
anything else.

So there is a "Wiki" handler that handles pages that contain wiki 
markup.  It supports a view action that renders the page to HTML, an 
edit action that provides a form for modifying the page source, a post 
action that updates the page (i.e. what the form of the edit action 
posts to), a source action that renders the source as HTML, etc.  This 
is much like how I understand PmWiki to work.

There is also a "Binary" handler that handles arbitrary binaries.  It 
supports a view action to download the binary, an edit action with an 
upload form, and a post action to accept the modified binary.

There is an "Image" handle that handles images; it is much like the 
binary handler.

A good example of this is the http://spu.tnik.org/en/Graphviz_Demo .  
The graphviz source is a "page" or "node" that can be edited, rendered 
as a gif or png, etc. by the graphviz handler.  Several pages can share 
the same image because it is a separate resource rather than something 
embedded in the page.

Regards,
Twylite




More information about the pmwiki-users mailing list