Robert Seeger
Email: <ro be rt DOT see ger AT usa SPAMFREE DOT net>
My Patches
My Projects
Universal MoinMoin export
One of my main issues is how to export parts of a MoinMoin wiki (or even the whole wiki) into other document formats that are used in the business (Microsoft Windows-oriented) world. (I know that MS sucks and I used to love Latex etc., but in the "real world" I have to deal with customers who demand MS Word, Excel, Powerpoint etc.)
Starting with MoinMoin 1.1. I have worked on a server-based exporter tool that is based on the idea of moin_dump.py and combines some core patches, modified parsers and special formatters to create external documents.
The one that is in productive use on our 1.1. wiki farm produces CHM (compressed HTML) files, the standard format for online help on Microsoft Windows, from selected parts of the wiki, including TOC and index pages that are maintained (or generated) as wiki pages.
We are in the process of migrating to 1.3.5 and I currently have an intern working on enhancement of the exporter to:
create a formatter using reportlab to produce good PDF
finalize my experimental MS Word formatter - this uses MS Word application scripting (in Python, not VBA) as a 'side effect' and handles tables, links, images etc. quite well.
if this is succesful, consider the same method to export to Excel (tables) and Powerpoint (slideshows).
Stay tuned or contact me if you are interested. At the moment we need a number of core patches including a slightly different "wiki for export" parser, this is why I haven't published it yet.
The other issue, obviously, is how to get content into a wiki from business documents, so he will also work on a MS Word to wiki importer.
The final goal is to support a full roundtrip Word -> Wiki -> Word with the ability to edit in both formats an convert without any need for manual rework.
-- RobertSeeger 2005-10-20 16:09:40 Within the next 3 weeks we will decide if we continue with reportlab (hopefully we'll be finished by then, anyway or if we rewrite the whole export formatter using a commercial package TX TextControl ActiveX Server which would allow us to produce MS Word, PDF, RTF etc. with the same formatter. PDF is only a "sideline", our main goal is MS Word. The first experiments look quite promising. Unfortunately the MoinMoin community might not like this approach, as it is Windows only and the tool is not for free, but I have to cater to my management first and can't considerate this too much.
Just to clarify this: anything in that solution is open source, besides Microsoft Word (esp. the connectors and ReportLab)? (AlexanderSchremmer said that)
Unfortunately no, if we are moving towards TX TextControl ActiveX Server then this will be neither open source nor free, it is rather expensive but seems worthwile in a commercial environment. Any exporter source we provide is of course free and we will provide the current (unfinished) formatter versions that use Reportlab and Word. -- RobertSeeger 2005-10-24 10:34:44
And TextControl is a simple OLE automation server that can create word and pdf files?
Yes, an OLE automation server. No, not "simple" (this is why it isn't cheap, too). In their words it is "a family of word processing components that offers developers all the features expected in a high end word processing package in reusable component form". It can be used both as a (programmable) GUI editor control and as an invisible automation server that supports XML, PDF, CSS, RTF, HTML, DOC, ANSI, Unicode files and has some limited database input API (MS Access, ADO records, memory data). See their website for more. It is directed towards Visual Basic and Delphi developers but I have done some python experiments to create a simple document in PDF, DOC and HTM, see the code snippet below. It doesn't do LaTex or MoinMoin, though ;-(( -- RobertSeeger 2005-10-26 12:13:11
code sample to use TX TextControl
1 """
2 Testing TX TextControl 12.0 ActiveX Server with Python and Win32COM
3 sample based on step1.asp
4 """
5
6 import sys,os
7
8
9 bin_path="E:\\Programme\\TXTextControl12.0\\Bin"
10
11 #sys.path.append(bin_path)
12 import win32com.client, win32com.client.dynamic
13
14 lc = win32com.client.Dispatch("TIS.TX.LicManager.12")
15 tx = win32com.client.Dispatch("TIS.TX.TextControl.12")
16 tx.EnableAutomationServer()
17 tx.Text = "The quick brown fox jumps over the lazy dog."
18 # Save in Adobe pdf format (format identifier 12)
19 tx.Save("E:\\Programme\\TXTextControl12.0\\Samples\\Python\\step1.pdf", 0, 12)
20 vbTrue=-1
21 vbFalse=0
22
23 tx.Text = ""
24 tx.ViewMode=1
25 tx.FormatSelection = vbTrue
26
27 tx.HeaderFooter =win32com.client.constants.txHeader
28 tx.HeaderFooterSelect (win32com.client.constants.txHeader)
29 tx.SelText = 'The story of the fox'
30 tx.SelStart=-1
31 tx.HeaderFooterSelect(0)
32 tx.SelText = 'The quick'
33 tx.SelStart=-1
34 tx.FontBold=1
35 tx.SelText = ' brown'
36 tx.SelStart=-1
37 tx.FontBold=0
38 tx.SelStart=-1
39 tx.SelText = ' fox'
40 tx.SelStart=-1
41 tx.SelText = '\n'
42 tx.SelStart=-1
43 tx.SelText = 'jumps over the '
44 tx.SelStart=-1
45 tx.FontItalic=1
46 tx.SelText = 'lazy '
47 tx.SelStart=-1
48 tx.FontItalic=0
49 tx.SelText = 'dog.'
50
51 tx.Save("E:\\Programme\\TXTextControl12.0\\Samples\\Python\\step2.pdf", 0, 12)
52 tx.Save("E:\\Programme\\TXTextControl12.0\\Samples\\Python\\step2.doc", 0, 9)
53 tx.Save("E:\\Programme\\TXTextControl12.0\\Samples\\Python\\step2.htm", 0, 4)
See the current source based on 1.3.5 (core patches, plugins, other) at /MoinExporter
Talk
Thanks for the DiffPage action, I'll definitely have a look at it. -- VillePekkaVainio 2007-06-07 08:26:05
-=Robert, any update on this? -- Mujtaba
Things to look at
Better RSS?
Synchronized Wiki Distribution, Offline-Wiki