WordML Formatter
WordML formatter and render (export) action for MoinMoin Wiki. See OlegKobchenko, FormatterMarket.
Copyright |
(C) 2006 by Oleg Kobchenko <olegyk@yahoo.com> |
License |
GNU GPL, see COPYING for details. |
Version |
0.1 |
This is a proof-of-concept release. Try it, if you like it, watch out for more full-featured version.
Descirption
- Used from Actions menu to send the current topic rendered in WordML format and using application/msword MIME format, so that it is automatically recognized by the browser and the operating system
Requirements
MoinMoin 1.5+
Your favorite XSLT processor. Was tested on very fine and fast xsltproc from the cross-platform GNOME libxml2
Installation
- make sure a command line XSLT processor is installed
- copy the WordML folder "near" your Wiki
copy these to corresponding MoinMoin locations:
MoinMoin/action/RenderAsWordML.py MoinMoin/formatter/application_msword.py
- change your Wiki files as descibed in the following
MoinMoin/theme/__init__.py.txt YourWiki/moin.cgi.txt
Configuration
- edit the Configuration section of the installed application_msword.py
Now test you should see "Render as WordML" in the Actions menu. Test it. If errors are returned in HTML or inside the Word document, follow the description. You might have to fix the XSLT processor location/configuration/parameters.
To figure out the correct parameters you may want to practice from the command line using output from the DocBook renderer.
Bug Fixes
When encoding certain pages the resulting Word document was filled with details about a "UnicodeEncodeError". I fixed this by adding an explicit encoding around line 48 of application_msword.py:
child_in.write(input.encode("ascii", "replace"))
References
Uses wordml.xsl and template.xml by Steve Ball
DocBook to WordML, www.zveno.com