khajavi / pandoc

Automatically exported from code.google.com/p/pandoc
GNU General Public License v2.0
0 stars 0 forks source link

trac wiki import! #170

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello!

we use the trac wiki for our documentation. It would be helpful
to convert the wiki pages to docbook. How could this be archived?

I know I can write rst in trac, but all our pages are already written
in the moinmoin syntax.

best regards,

sven

Original issue reported on code.google.com by sven.ste...@gmail.com on 19 Oct 2009 at 8:09

GoogleCodeExporter commented 9 years ago
Simon Michael <simon@joyful.com> has started work on a moinmoin reader. I'm not 
sure
how far he has gotten, but you might contact him.  I'm sure he could use some 
help,
as well.

Original comment by fiddloso...@gmail.com on 19 Oct 2009 at 10:25

GoogleCodeExporter commented 9 years ago
I need a moinmoin reader as well for exactly the same reason, to convert trac 
wiki content into other formats.   I just emailed Simon to ask what the status 
is of his work.  Keep your fingers crossed.

Original comment by gregb...@gmail.com on 2 Nov 2010 at 12:41

GoogleCodeExporter commented 9 years ago
I heard back from Simon.  He has graciously released his MoinMoin.hs 
implementation, see attachments.  Now we simply need this to be integrated into 
the main release and tested a bit more.  He indicated that it was ALPHA code, 
so use at your own risk.  :)

-greg

Original comment by gregb...@gmail.com on 2 Nov 2010 at 6:08

Attachments:

GoogleCodeExporter commented 9 years ago
History is here: http://joyful.com/darcsweb/darcsweb.cgi?r=pandoc-moin
The reader converted wiki.darcs.net with only minor manual fixups. It does not 
convert 100% of MoinMoin markup (eg macros), and does not include a full test 
suite.

Original comment by simon@joyful.com on 2 Nov 2010 at 9:44

GoogleCodeExporter commented 9 years ago
I've added a moinmoin branch to the source on github.

This includes Simon's reader, with some minimal modifications to get it to 
compile against the latest pandoc.  This branch allows you to specify 
'moinmoin' as reader.

It's not yet quite complete enough to include in a release, and it doesn't 
include a test suite, which we'll need.  (This might be derived from something 
like http://moinmo.in/HelpOnMoinWikiSyntax.)  But at least you can compile the 
code and use what's there. 

Original comment by fiddloso...@gmail.com on 3 Nov 2010 at 11:50

GoogleCodeExporter commented 9 years ago
Thanks!  I'm not a Haskell hacker so I'm not going to be able to do much with 
this to help get it into the master branch.  I will try to use it as it is now 
and let you know how it goes.  :)

Original comment by gregb...@gmail.com on 3 Nov 2010 at 11:55

GoogleCodeExporter commented 9 years ago
Greg, would you be able to share your steps for others who will take anything 
they can get on the MoinMoin->markdown (my case) path?  I have a MoinMoin wiki 
that only uses basic syntax (mostly headers, lists, and preformatted blocks) 
that I'd like to migrate to markdown, or some other more popular/modern syntax. 
 I'm also not a Haskell hacker so I'd need instructions that don't involve 
writing or modifying Haskell code (python or shell are doable though)

Original comment by mrpeterl...@gmail.com on 6 Jan 2011 at 6:16

GoogleCodeExporter commented 9 years ago
Peter, I just today corresponded with John MacFarlane about MoinMoin.  He's 
added in all my changes into the main Git repository in the "moinmoin" branch.  
Check that out and see if it works for your case.  I'm not a Haskell hacker, 
but I am motivated to get this working.  I'm using it at work for a critical 
project, so it has to work.  If there is someone else out there with more 
Haskell-mojo please take up this branch and finish it so John can merge it onto 
the main branch.

Original comment by gregb...@gmail.com on 13 Jan 2011 at 8:22

GoogleCodeExporter commented 9 years ago
OK, I'll try to schedule a time to get that git branch of pandoc running and 
run some moinmoin data through it and look at the results.

Original comment by mrpeterl...@gmail.com on 13 Jan 2011 at 8:31

GoogleCodeExporter commented 9 years ago
Seems to not build for me.

[14 of 36] Compiling Text.Pandoc.Readers.MoinMoin ( 
src/Text/Pandoc/Readers/MoinMoin.hs, dist/build/Text/Pandoc/Readers/MoinMoin.o )

src/Text/Pandoc/Readers/MoinMoin.hs:565:71:
    Not in scope: data constructor `Underline'

Original comment by mrpeterl...@gmail.com on 15 Jan 2011 at 3:10

GoogleCodeExporter commented 9 years ago
Greg's latest changes broke the build.  I have reverted them.

Try it now.

Original comment by fiddloso...@gmail.com on 15 Jan 2011 at 3:24

GoogleCodeExporter commented 9 years ago
OK, I built it now.  Thanks for the quick fix. Running some test moinmoin input 
pages with markdown output. Here are some issues I've seen so far.  I'm using 
this as a reference.  http://moinmo.in/HelpOnMoinWikiSyntax

* It seems not to handle nested lists like this. Both bulleted and numbered 
lists have this problem. The list gets flattened.

 * Item A
  * Subitem A1

* it seems to not handle indented text, which MoinMoin considers a blockquote
* It treats !WikiName as a hyperlink instead of plain text. That is one of 
several syntaxes in MoinMoin do disable treating a WikiName as a hyperlink

The markdown output does bulleted lists with "-   blah" with those extra 
intermediate spaces which is not my personal preference but it's fine. The 
other problems I found I think are just that markdown does not provide as many 
features as moinmoin so they just get left alone or escaped, which is fine.

Original comment by mrpeterl...@gmail.com on 15 Jan 2011 at 3:51

GoogleCodeExporter commented 9 years ago
It seems that this moinmoin reader was based on the markdown reader.  It would 
have been better to start with the RST reader, since RST seems much closer to 
moinmoin:  in particular, in RST, indented blocks are blockquotes, and link 
nesting is caused by any indentation, as opposed to four spaces in markdown.

Original comment by fiddloso...@gmail.com on 15 Jan 2011 at 6:23