Merge branch 'master' of ssh://git.ikiwiki.info

master
Joey Hess 2012-04-04 12:59:20 -04:00
commit 46d93629b0
9 changed files with 150 additions and 29 deletions

View File

@ -7,3 +7,9 @@ used. --[[Joey]]
> pages used the full url. So I don't see a bug here, or am missing
> something from my memory of the report (which was done the bad way, on
> IRC). [[done]] --[[Joey]]
> > Sorry about wittering on IRC instead of reporting proper bugs.
> >
> > The setup I have is nginx in front of apache, so that nginx is listening on port 80, apache is on port 81, and ikiwiki is being served by apache. After upgrading to 3.20120203 (backported to squeeze) I found that the URLs in the edit page all have the port set as :81 ... but now that I look at it more closely, that is the case for several ikiwiki-hosting controlled sites, but not for a few other sites that are also on the same machine, so it must be some difference between the settings for the sites, either in ikiwiki, or apache, or perhaps even nginx. Anyway, on the affected sites, explicitly including a port :80 in the cgiurl fixes the problem.
> > So, for the moment, this bug report is a bit useless, until I find out what is causing the ikiwiki-hosting sites to be beffuddled, so it should probably stay closed -[[fil]]

View File

@ -3,5 +3,7 @@ to convert it to ikiwiki? Various tools and techniques have been developed
to handle such conversions.
* [[tips/convert_mediawiki_to_ikiwiki]]
* [[tips/convert_MoinMoin_and_TWiki_to_ikiwiki]]
* [[tips/Convert_MoinMoin_to_ikiwiki]]
* [[tips/convert_blogger_blogs_to_ikiwiki]]
In addition, [[JoshTriplett]] has written scripts to convert Twiki sites, see [his page](/users/JoshTriplett) for more information.

View File

@ -1,27 +0,0 @@
[[JoshTriplett]] has developed scripts to convert MoinMoin and TWiki wikis
to ikiwikis backed by a git repository, including full history. For
details, see [[his_user_page|JoshTriplett]].
> I have worked on porting this to more recent MoinMoin versions, optimising it and making sure it works reliably even on big wikis with funky things.
>
> git clone git://src.anarcat.ath.cx/moin2iki
>
> List of improvements:
>
>* full rewrite of git migration tool to support latest MoinMoin versions (tested with 1.9.x)
>* uses `git fast-import` to improve performance (10 minutes and 200M of ram for a 7 years old 2GB Moinmoin wiki)
>* more reliable as it uses the per-page edit log
>* consistent: multiple runs will generate the same repository
>* re-entrant: can be run multiple times to import new changes
>
> Look at the `moin2git2` script for most of my work, which really consisted on importing the MoinMoin pages into git reliably. Now I am rewriting the MoinMoin parser to generate markdown directly instead of going through HTML, because I want to support translating the macros too.
>
> Big things missing:
>
> * lots of macros are not translated
> * a bunch of markup and exotic uses of parsers will probably fail?
> * [[todo/internal_definition_list_support/]]
> * [[todo/do_not_make_links_backwards/]]
> * fix up documentation and make sure all the pieces go into place
>
> Comments and feedback always welcome! --[[anarcat]]

View File

@ -1 +0,0 @@
I look forward to trying this. I have a large (~10 year old) MoinMoin installation that has been migrated up to a 1.8.x version so far, and which is partially ACL'd away behind logins. — [[Jon]]

View File

@ -0,0 +1,105 @@
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.
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).
The MoinMoin side of things was completely re-written by [[anarcat]] and is currently still in development. That version is available at:
git clone git://src.anarcat.ath.cx/moin2iki
It doesn't feature support to migrate from Tikiwiki anymore and focuses on MoinMoin support.
[[!toc levels=2]]
The software is made of two pieces:
* the importer (`moin2git`) - which converts the wiki pages into a git repository with full history
* the converter (`moin2mdwn`) - which converts a set of moin-formatted text files into markdown + ikiwiki directives
## MoinMoin importer features
* supports latest MoinMoin versions (tested with 1.9.x)
* uses `git fast-import` to improve performance (10 minutes and 200M of ram for a 7 years old 2GB Moinmoin wiki)
* multistep process allows bulk edit through git before markdown conversion, or staying with a
* imports attachments as subpages
* uses the per-page edit log
* consistent: multiple runs will generate the same repository
* re-entrant: can be run multiple times to import new changes
## MoinMoin converter features
* most of the inline markup
* links
* attachment links
* smileys
* images (not well tested), into [[ikiwiki/directive/img]]
* preformatted and code areas, including [[ikiwiki/directive/format]]
* ordered, unordered and definition lists
* tables (although only with HTML and no styles)
### Supported macros
* TableOfContents, through [[ikiwiki/directive/toc]]
* Navigation, through [[ikiwiki/directive/map]] (so as a nested
vertical list instead of an horizontal list)
* PageList, through [[ikiwiki/directive/map]]
* MonthCalendar, partially, through [[ikiwiki/directive/calendar]]
* FootNote, through markdown
* Anchor, through markdown and plain HTML
* `<<BR>>`, through the weird line ending thing
* AttachList, through a weird [[ikiwiki/directive/inline]]
* FullSearch, partially, only through [[ikiwiki/directive/inline]] (so no textual search)
* Include, partially through [[ikiwiki/directive/inline]] (so missing boundary extraction and heading level generation)
* PageCount, same name even :)
* OrphanedPages, through [[ikiwiki/directive/oprhans]]
### Supported parsers
* the main "moin wiki" markup
* highlight parser, through the [[plugins/format]] plugin
* other parsers may be supported if an equivalent plugin exists in Ikiwiki (example: [[plugin/rst]])
## Current blocker
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:
* 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
## Todos
There are also significant pieces missing:
* inline parsers and hackish styled tables
* turn categories into tags
* name converted page to the right name depending on the `#format` parameter on top of page
* finish a full converter run on the Koumbitwiki
* improve the output of the converter (too much debugging)
## MoinMoin features missing from ikiwiki
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.
* [[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
* [[todo/internal_definition_list_support/]] - includes tabling the results ([MoinMoin's DictColumns macro](http://moinmo.in/MacroMarket/DictColumns))
* [[todo/per page ACLs]] - ([MoinMoin's ACLs](http://moinmo.in/HelpOnAccessControlLists))
* [MailTo](http://moinmo.in/HelpOnMacros/MailTo) macro spam protection
* list pages based on full text page search
* extract part of other pages with the inline macro
* specifying a template when creating a page (as opposed to matching a pagespec)
* specifying a style for a sub-section (MoinMoin's inline parsers
allow the user to specify a CSS class - very useful see
[the documentation](http://moinmo.in/HelpOnMoinWikiSyntax#Using_the_wiki_parser_with_css_classes)
to get an idea)
* the above also keeps the SectionParser from being properly supported
* regex matching all over the place: pagespec, basically, but all
full text search (which is missing anyways, see above)
### Missing macros
* RandomPage(N) - lists N random pages, skipped
* Gallery() - skipped
* Gettext - translates the string accordign to internal translation
system, ignored
* AdvancedSearch - an elaborate search form provided by MoinMoin
* Goto - a simple "jump to page" macro
Comments and feedback always welcome! --[[anarcat]]

View File

@ -0,0 +1,5 @@
I look forward to trying this. I have a large (~10 year old) MoinMoin installation that has been migrated up to a 1.8.x version so far, and which is partially ACL'd away behind logins. — [[Jon]]
> I'll make that clearer in the docs, but we do not deal with ACL (yet?), as ikiwiki doesn't support Moinmoin's level of ACL flexibility. See [[todo/per_page_ACLs]] for more information. --[[anarcat]]
>> I was actually thinking the ACLs would cause a problem just for the crawler, I hadn't considered their re-implementation (but yes, that would be good!) — [[Jon]]

View File

@ -0,0 +1,14 @@
Wishlist items such as [[Add space before slash in parent links]] would be easier to deal with if the page.tmpl template was broken up into sections and each section had a separate template file which was included in the master page.tmpl file. This would make it easier to customize parts of a page without having to fork the whole page.tmpl and then have things break when there's an update of the master page.tmpl file.
Suggested sections:
* page_head.tmpl for the things in the <head> section
* page_header.tmpl for things in the "header" div (which includes the PARENTLINKS loop)
* page_actions.tmpl for the actions section
* page_sidebar.tmpl for the sidebar
* page_content.tmpl for the main content
* page_footer.tmpl for the footer
Would this work, or would HTML::Template have problems with this?
-- [[KathrynAndersen]]

View File

@ -0,0 +1,15 @@
This is about going beyond the current [[ACL]] system and allow not only readonly pages (through [[plugins/lockedit]]) but also read protection, and per page. To quote that other page:
> [[!acl user=joe page=.png allow=upload]]
> [[!acl user=bob page=/blog/bob/ allow=]]
> [[!acl user= page=/blog/bob/ deny=]]
> [[!acl user=http://jeremie.koenig.myopenid.com/ page=/todo/* deny=create
> reason="spends his time writing todo items instead of source code"]]
>
> Each would expand to a description of the resulting rule.
>
> a configurable page of the wiki would be used as an ACL list. Possibly could refer to other ACL pages, as in:
>
> [[!acl user= page=/subsite/ acl=/subsite/acl.mdwn]]
I think this would be perfectly possible in Ikiwiki, provided of course the access to the full repository is not allowed, as that cannot be made granular. The way I would see that happen would be by dropping .htaccess files in the right directories and with clever configuration of the virtual host containing the ikiwiki install. Apache has plenty of methods for doing such authentication, and we could simply rely on [[plugins/httpauth/]] for that. *But* there is a key feature of having ACLs per page, or improving the httpauth plugin to have "noread" pagespecs... --[[anarcat]]

View File

@ -64,3 +64,5 @@ The other thing I saw was:
Moin version is 1.8.5
Help please!
> Please take a look at [[tips/Convert_MoinMoin_to_ikiwiki]] again, the code has radically changed and should now be easier to use *and* work with 1.8.x. --[[anarcat]]