[darcs-users] Converting MoinMoin to Markdown/RST
Gwern Branwen
gwern0 at gmail.com
Tue Jan 27 02:43:25 UTC 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
On Mon, Jan 26, 2009 at 8:31 PM, Trent W. Buck wrote:
> Gwern Branwen writes:
>
>>> 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.
>
> Well just as a simple example, I'm not aware of any standard[0] markdown
> equivalent to recognize the use of metadata in the document prelude and
> propagate to the output document, e.g.:
>
>
> $ rst2pdf | with-temp-file pdfinfo
> Tron: The Musical
> =================
>
> :Author: Alan Bradley
> :Date: Fri, 15 Jan 1988 12:22:22 +1100
>
> Main content
> ^D
>
> Emits:
>
> Title: Tron: The Musical
> Subject: (unspecified)
> Keywords:
> Author: Alan Bradley
> Producer: ReportLab http://www.reportlab.com
> CreationDate: Tue Jan 27 12:22:50 2009
> Tagged: no
> Pages: 1
> Encrypted: no
> Page size: 595.276 x 841.89 pts (A4)
> File size: 3427 bytes
> Optimized: no
> PDF version: 1.3
>
> Running the same input through "rst2html | sed -n '//,/
>
>
> http://docutils.sourceforge.net/" />
> Tron: The Musical
>
>
>
>
> Sure, you can live without such niceties, but I'd prefer not to.
>
> [0] I say "standard" because it's possible that pandoc's markdown
> extensions cover this particular example in a non-portable
> (i.e. specific to pandoc) way.
>
>>> +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?
>
> I intend to do it on an ad-hoc basis once we dump the existing files
> (and preferably, change history) into a darcs repo backed onto gitit.
I think getting the MoinMoin history into gitit may be overly
ambitious, unless you've found some clever way of doing it.
> We could ease this transition by making moinmoin still available during
> this time, but only in a read-only fashion.
That seems sensible. So the procedure would be:
1) set MoinMoin read-only
2) take a dump of all its files
3) create, at an alternative URL, a new gitit repo and start it running
4) copy all the MoinMoin files into the repo, and do a mass 'darcs add
&& record'
5) Take whatever script you've cooked up and run it over all the files
6) Probably do some mass renamings as well (to get a .page suffix,
maybe unCamelCase, etc.)
7) Eventually shut down the MoinMoin server and move the gitit wiki to
the original URL
?
- --
gwern
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEAREKAAYFAkl+dM8ACgkQvpDo5Pfl1oLZlgCcC3Z1xY5B4dHehd7iZVvrrsd/
1UgAn2g5Z+8sTdQD64hUp+SJppJryIGv
=+oAX
-----END PGP SIGNATURE-----
More information about the darcs-users
mailing list