[darcs-users] Converting MoinMoin to Markdown/RST
Trent W. Buck
trentbuck at gmail.com
Tue Jan 27 01:31:51 UTC 2009
Gwern Branwen <gwern0 at gmail.com> 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 '/<head>/,/<style/p'":
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.5:
http://docutils.sourceforge.net/" />
<title>Tron: The Musical</title>
<meta name="author" content="Alan Bradley" />
<meta name="date" content="Fri, 15 Jan 1988 12:22:22 +1100" />
<style type="text/css">
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.
We could ease this transition by making moinmoin still available during
this time, but only in a read-only fashion.
More information about the darcs-users
mailing list