]> sipb.mit.edu Git - ikiwiki.git/blob - doc/tips/convert_MoinMoin_to_ikiwiki.mdwn
Added a comment
[ikiwiki.git] / 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://src.anarcat.ath.cx/moin2iki
8
9 It doesn't feature support to migrate from Tikiwiki anymore and focuses on MoinMoin support.
10
11 [[!toc levels=2]]
12
13 The software is made of two pieces:
14
15  * the importer (`moin2git`) - which converts the wiki pages into a git repository with full history
16  * the converter (`moin2mdwn`) - which converts a set of moin-formatted text files into markdown + ikiwiki directives
17
18 ## MoinMoin importer features
19
20  * supports latest MoinMoin versions (tested with 1.9.x)
21  * uses `git fast-import` to improve performance (10 minutes and 200M of ram for a 7 years old 2GB Moinmoin wiki)
22  * multistep process allows bulk edit through git before markdown conversion, or staying with a 
23  * imports attachments as subpages
24  * uses the per-page edit log
25  * consistent: multiple runs will generate the same repository
26  * re-entrant: can be run multiple times to import new changes
27
28 ## MoinMoin converter features
29
30  * most of the inline markup
31  * links
32  * attachment links
33  * smileys
34  * images (not well tested), into [[ikiwiki/directive/img]]
35  * preformatted and code areas, including [[ikiwiki/directive/format]]
36  * ordered, unordered and definition lists
37  * tables (although only with HTML and no styles)
38
39 ### Supported macros
40
41  * TableOfContents, through [[ikiwiki/directive/toc]]
42  * Navigation, through [[ikiwiki/directive/map]] (so as a nested
43    vertical list instead of an horizontal list)
44  * PageList, through [[ikiwiki/directive/map]]
45  * MonthCalendar, partially, through [[ikiwiki/directive/calendar]]
46  * FootNote, through markdown
47  * Anchor, through markdown and plain HTML
48  * `<<BR>>`, through the weird line ending thing
49  * AttachList, through a weird [[ikiwiki/directive/inline]]
50  * FullSearch, partially, only through [[ikiwiki/directive/inline]] (so no textual search)
51  * Include, partially through [[ikiwiki/directive/inline]] (so missing boundary extraction and heading level generation)
52  * PageCount, same name even :)
53  * OrphanedPages, through [[ikiwiki/directive/oprhans]]
54
55 ### Supported parsers
56
57  * the main "moin wiki" markup
58  * highlight parser, through the [[plugins/format]] plugin
59  * other parsers may be supported if an equivalent plugin exists in Ikiwiki (example: [[plugin/rst]])
60
61 ## Current blocker
62
63 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:
64
65  * 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
66
67 ## Todos
68
69 There are also significant pieces missing:
70
71  * inline parsers and hackish styled tables
72  * turn categories into tags
73  * name converted page to the right name depending on the `#format` parameter on top of page
74  * finish a full converter run on the Koumbitwiki
75  * improve the output of the converter (too much debugging)
76
77 ## MoinMoin features missing from ikiwiki
78
79 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.
80
81  * [[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
82  * [[todo/internal_definition_list_support/]] - includes tabling the results ([MoinMoin's DictColumns macro](http://moinmo.in/MacroMarket/DictColumns))
83  * [[todo/per page ACLs]] - ([MoinMoin's ACLs](http://moinmo.in/HelpOnAccessControlLists))
84  * [MailTo](http://moinmo.in/HelpOnMacros/MailTo) macro spam protection
85  * list pages based on full text page search
86  * extract part of other pages with the inline macro
87  * specifying a template when creating a page (as opposed to matching a pagespec)
88  * specifying a style for a sub-section (MoinMoin's inline parsers
89    allow the user to specify a CSS class - very useful see
90    [the documentation](http://moinmo.in/HelpOnMoinWikiSyntax#Using_the_wiki_parser_with_css_classes)
91    to get an idea)
92  * the above also keeps the SectionParser from being properly supported
93  * regex matching all over the place: pagespec, basically, but all
94    full text search (which is missing anyways, see above)
95
96 ### Missing macros
97
98  * RandomPage(N) - lists N random pages, skipped
99  * Gallery() - skipped
100  * Gettext - translates the string accordign to internal translation
101    system, ignored
102  * AdvancedSearch - an elaborate search form provided by MoinMoin
103  * Goto - a simple "jump to page" macro
104
105 Comments and feedback always welcome! --[[anarcat]]