(no commit message)
[ikiwiki] / doc / tips / convert_moinmoin_to_ikiwiki.mdwn
1 This MoinMoin converter converts wikis to ikiwikis backed by a git repository, including full history. It simply parses the wiki pages into markdown using the MoinMoin engine.
2
3 The converter was originally written by [[JoshTriplett]] and included support for Tikiwiki, for which it parses the wiki pages to HTML then back into markdown using the `libhtml-wikiconverter` Perl package. That original version from Josh is still available from [his wiki page](/users/JoshTriplett). 
4
5 The MoinMoin side of things was completely re-written by [[anarcat]] and is currently still in development. That version is available at:
6
7     git clone git://git.koumbit.net/moin2iki.git
8
9 It doesn't feature support to migrate from Tikiwiki anymore and focuses on MoinMoin support.
10
11 Issues can be filed in the redmine bugtracker: <https://redmine.koumbit.net/projects/moin2iki>
12
13 [[!toc levels=2]]
14
15 The software is made of two pieces:
16
17  * the importer (`moin2git`) - which converts the wiki pages into a git repository with full history
18  * the converter (`moin2mdwn`) - which converts a set of moin-formatted text files into markdown + ikiwiki directives
19
20 ## MoinMoin importer features
21
22  * supports latest MoinMoin versions (tested with 1.9.x)
23  * uses `git fast-import` to improve performance (10 minutes and 200M of ram for a 7 years old 2GB Moinmoin wiki)
24  * multistep process allows bulk edit through git before markdown conversion, or staying with a 
25  * imports attachments as subpages
26  * uses the per-page edit log
27  * consistent: multiple runs will generate the same repository
28  * re-entrant: can be run multiple times to import new changes
29
30 ## MoinMoin converter features
31
32  * most of the inline markup
33  * links
34  * attachment links
35  * smileys
36  * images (not well tested), into [[ikiwiki/directive/img]]
37  * preformatted and code areas, including [[ikiwiki/directive/format]]
38  * ordered, unordered and definition lists
39  * tables (although only with HTML and no styles)
40
41 ### Supported macros
42
43  * TableOfContents, through [[ikiwiki/directive/toc]]
44  * Navigation, through [[ikiwiki/directive/map]] (so as a nested
45    vertical list instead of an horizontal list)
46  * PageList, through [[ikiwiki/directive/map]]
47  * MonthCalendar, partially, through [[ikiwiki/directive/calendar]]
48  * FootNote, through markdown
49  * Anchor, through markdown and plain HTML
50  * `<<BR>>`, through the weird line ending thing
51  * AttachList, through a weird [[ikiwiki/directive/inline]]
52  * FullSearch, partially, only through [[ikiwiki/directive/inline]] (so no textual search)
53  * Include, partially through [[ikiwiki/directive/inline]] (so missing boundary extraction and heading level generation)
54  * PageCount, same name even :)
55  * OrphanedPages, through [[ikiwiki/directive/orphans]]
56  * Date and Datetime, should be through [[plugins/date]] instead of
57    current hack
58
59 ### Supported parsers
60
61  * the main "moin wiki" markup
62  * highlight parser, through the [[plugins/format]] plugin
63  * other parsers may be supported if an equivalent plugin exists in Ikiwiki (example: [[plugins/rst]])
64
65 ## Current blocker
66
67 This script is being used to test the conversion of the venerable [Koumbit wiki](https://wiki.koumbit.net/) into Ikiwiki, and so far progress is steady but difficult. The current blocker is:
68
69  * figuring out exactly which pages should exist and which should not, as there is ambiguity in the internal datastructures of MoinMoin, which become apparent when running the conversion script, as files a missing
70
71 ## Todos
72
73 There are also significant pieces missing:
74
75  * inline parsers and hackish styled tables
76  * turn categories into tags
77  * name converted page to the right name depending on the `#format` parameter on top of page
78  * finish a full converter run on the Koumbitwiki
79  * improve the output of the converter (too much debugging)
80
81 ## MoinMoin features missing from ikiwiki
82
83 The importer is pretty much complete, but the converter can only go so far as what features ikiwiki supports. Here are the MoinMoin features that are known to be missing from ikiwiki. Note that some of those features are available in MoinMoin only through third-party extensions.
84
85  * [[todo/do_not_make_links_backwards/]] - MoinMoin and Creole use `\[[link|text]]`, while ikiwiki uses `\[[text|link]]` - for now the converter generates [[markdown]] links so this is not so much an issue, but will freak out users
86  * [[todo/internal_definition_list_support/]] - includes tabling the results ([MoinMoin's DictColumns macro](http://moinmo.in/MacroMarket/DictColumns))
87  * [[todo/per page ACLs]] - ([MoinMoin's ACLs](http://moinmo.in/HelpOnAccessControlLists))
88  * [MailTo](http://moinmo.in/HelpOnMacros/MailTo) macro spam protection
89  * list pages based on full text page search
90  * extract part of other pages with the inline macro
91  * specifying a template when creating a page (as opposed to matching a pagespec)
92  * specifying a style for a sub-section (MoinMoin's inline parsers
93    allow the user to specify a CSS class - very useful see
94    [the documentation](http://moinmo.in/HelpOnMoinWikiSyntax#Using_the_wiki_parser_with_css_classes)
95    to get an idea)
96  * the above also keeps the SectionParser from being properly supported
97  * regex matching all over the place: pagespec, basically, but all
98    full text search (which is missing anyways, see above)
99
100 ### Missing macros
101
102  * RandomPage(N) - lists N random pages, skipped
103  * Gallery() - skipped
104  * Gettext - translates the string accordign to internal translation
105    system, ignored
106  * AdvancedSearch - an elaborate search form provided by MoinMoin
107  * Goto - a simple "jump to page" macro
108
109 Comments and feedback always welcome! --[[anarcat]]