[darcs-users] Converting MoinMoin to Markdown/RST

Gwern Branwen gwern0 at gmail.com
Mon Jan 26 14:23:56 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On Mon, Jan 26, 2009 at 1:42 AM, Trent W. Buck  wrote:
> Gwern Branwen  writes:
>
>> it might be nice to switch to a Darcs-backed Gitit wiki*.
>
> +1
>
>> 4) Markdown/RST input (as opposed to MoinMoin markup)
>
> +1 for reST.
>
> I'm not impressed by markdown, but by all accounts pandoc (and thus
> gitit) has an extended markdown implementation and a crippled reST
> implementation, so within the scope of gitit, I guess the difference is
> not so staggering.

I dunno how crippled the RST is (I wouldn't expect it to be too
crippled since it's so close to Markdown), but it's a reasonable
subset - I didn't see any of the DWN RST files break horribly when I
looked via Pandoc.

>> However, what stymies me currently is figuring out how to actually
>> convert the pages in the wiki! Leaving aside the issue that
>> http://wiki.darcs.net/DarcsWiki/TitleIndex doesn't seem to distinguish
>> between human-written & MoinMoin-made pages (we only want the former),
>> I can't see how to convert from MoinMoin to Markdown/RST.
>
> MoinMoin uses a database backend, right?  Can you start by dumping the
> blobs to files?

According to Wikipedia:
"MoinMoin's storage mechanism is based on flat files and folders,
rather than a database. This makes it easy to manipulate the content
in a text editor on the server if necessary, including managing
revisions if the wiki gets attacked by spammers. A storage abstraction
layer is currently being worked on, which will allow the server
administrator to select between flat file-storage or a relational
database."

I don't have any access to the wiki files.

>> 1) Just dump all the MoinMoin content into a Gitit. Let people convert
>> by hand as they edit pages.
>
> +1.  I believe I have adequate sed-fu to handle the majority of
> differences.  There *will* be edge cases, and we can resolve these
> by hand.

Cool, so are you going to create the script?

>> 2) Hack up some regexp script of our own. '== .* ==' would be convert
>> to '## .*' and so on.
>
> That's implied by (1), except we do it ad-hoc instead of up-front.  The
> benefit of doing it ad-hoc is that I can "darcs get", try things, and
> only send in what works.  Meantime, other people can proof read and
> manually fix other parts.  Yay for distributed version control.

So, it already starts paying for itself! :)

- --
gwern
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEAREKAAYFAkl9x30ACgkQvpDo5Pfl1oIvkQCgjsfSsltVPJU+Qna54vf9FoTE
xcYAnRWfOCBq8x/Ef9QBk6boZ+bsHW2x
=T+tp
-----END PGP SIGNATURE-----


More information about the darcs-users mailing list