← Back to team overview

launchpad-dev team mailing list archive

Re: Using reStructured Text instead of moin syntax in the wiki?

 

Barry Warsaw <barry@xxxxxxxxxxxxx> writes:
>>  4) Is there an automated moin->reST converter anywhere?  (I couldn't
>>     find one; I could only find reSt->foo.)
>
> I'm not aware of one, but I think we can take the same opportunistic
> conversion approach with wiki pages that we already take with
> doctests.

This is unrealistic.  "Opportunistic" is just a polite way of saying "We
don't know how long it will take."  For an indefinite amount of time, we
would have two syntaxes in our wiki, and everyone who works on the wiki
regularly would need to know both of them -- because people who hit Edit
to make a quick tweak are not going to say "Oh, and I guess while I'm
here I'll just convert the entire page to a new syntax."

There are already about 600 pages in the dev wiki.  Converting even the
most-frequently-visited ones by hand opportunistically seems unlikely,
in any time frame that doesn't involve constellations shifting.

Doing search://"moin to rest"/ gets four hits, one of which is Mark
Shuttleworth saying in IRC in 2004 "we can probably automatically
convert moin to ReST" :-).  No one follows up to say how, though.  The
other three hits also lead nowhere.  Various other searches turn up no
automated converter; I hope I've missed something, but fear I haven't.

Moin itself has a parser, obviously; maybe we could hack that to do the
conversion?

  $ hg clone http://hg.moinmo.in/moin/1.9/ moin-1.9
  $ cd moin-1.9/MoinMoin/parser/
  $ ls
  _creole.py      text_cplusplus.py  text_html.py       text.py
  highlight.py    text_creole.py     text_irssi.py      text_python.py
  __init__.py     text_csv.py        text_java.py       text_rst.py
  _ParserBase.py  text_diff.py       text_moin_wiki.py  text_xslt.py
  _tests/         text_docbook.py    text_pascal.py
  $ cat text_moin_wiki.py
  [...]
  """
      MoinMoin - MoinMoin Wiki Markup Parser
      [...]  
  """
  [...]  
  class Parser:
      """
          Parse wiki format markup (and call the formatter to generate output).
  
          All formatting commands can be parsed one line at a time, though
          some state is carried over between lines.
  [...]
  $ 

Well, that's somewhat promising.  At least it's in Python.  I have no
estimate on how long this would actually take to write, though.

The rest of this thread is already discussing the wisdom of the change.
What I'd like to add here is realism: opportunistic conversion will not
happen in non-geological time, let's just face that fact.  There are too
many pages already in moin syntax, and it's precisely the fact that most
edits are lightweight and opportunistic that makes conversion of whole
pages on an "opportunistic" basis highly unlikely.

So our choices are:

  1) Find or write a converter.
  2) Live with two syntaxes in the wiki for a long time (yuck).
  3) Stick with moin (manually converting the few reST pages is easy).
  4) Organize a massively parallel human effort to convert all the moin
     pages.  I don't see how we'd justify that, though.

-Karl



Follow ups

References