[pmwiki-users] Page File Format: why? Tools to handle?

Patrick R. Michaud pmichaud at pobox.com
Sat Mar 17 15:14:22 CDT 2007


On Sat, Mar 17, 2007 at 06:42:49PM +0100, Oliver Betz wrote:
> Hello All (especially PM):
> 
> what were the reasons for the current method to store page markup text
> (in one line, with newline and percent sign converted)?

1.  It's relatively easy to handle this from PHP, while still being
    possible to manipulate the files using various other tools.

2.  For security reasons, it's very important that some characters
    be encoded somehow (notably the '<' character).  Since we have to 
    encode at least some characters, we might as well use an encoding
    scheme that is easy to handle.

3.  At the time PmWiki was developed (circa 2001-2002), there
    weren't a lot of standardized libraries or file formats that
    readily met PmWiki's needs, so I used this one.  (At the time
    I had several other projects and systems that made use of
    flat-file storage, so I had familiarity with this format.)
    
> It's somewhat hard to access this fomat from outside, e.g. diff and
> merge.
> 
> The PhpWiki "dump" format (multipart MIME) is much "friendlier" in
> this respect.

I hadn't seen the PhpWiki format details.

> Before I start to hack an import filter for Beyond Compare: Are there
> tools to convert, compare, edit the pages?

Are you planning to import pages from PhpWiki?  A simpler approach
might be to simply create a new PageStore object that can read files
from PhpWiki's dump format.  I've been very keen to come up with a
PhpWiki converter (and will be happy to work on it again), but 
I really haven't had a decent library of pages to work from.

Pm



More information about the pmwiki-users mailing list