[Moin-user] MoinMoin API: Writing files and HTTP redirect

Hape News hp.news at gmx.de
Thu Aug 28 03:53:35 EDT 2008


Dear all,

I'm developing a formatter for OpenDocument output (a.k.a. for StarOffice, OpenOffice, Koffice, ...). If you want, you can find it on moinmo.in in the formatter section, however only for MoinMoin 1.5 until now.

At the moment generating a OpenDocument file involves the following procedure:
- Generate some XML files (for content, styles, ...)
- Put them into a ZIP file and store it
- Open the ZIP file and deliver it as a big binary string to the client

However this has a few drawbacks:
- Browsers don't get the correct filename (at least they're missing 
  the extension ".odt"). Without this extension OpenDocument files 
  are seen as ZIP-Files (at least on my system)
- Even if there's no new revision of the page, every time when the 
  action "Render as OpenDocument" is called a new OpenDocument 
  file is generated (which may take a few seconds)

So I'm looking for a possibility to :
(1) Write an OpenDocument file and store it in some wiki directory 
     permanently (so no temp directory as I do now with 
     tempfile.mkdtemp()...)
(2) Do a HTTP redirect to this file (so all browsers get the correct 
     filename)

Before this there should be a check:
(0) Check whether there's a OpenDocument file corresponding to 
     the newest revision of the wiki page. If yes, proceed with (2), 
     if no, proceed with (1)

But I need help with this. Which directory should I choose? How do I read page revisions? How do I do a HTTP redirect in MoinMoin?

Thanks a lot for your help,

Hape
-- 
Psssst! Schon das coole Video vom GMX MultiMessenger gesehen?
Der Eine für Alle: http://www.gmx.net/de/go/messenger03




More information about the Moin-user mailing list