demydd / pandoc

Automatically exported from code.google.com/p/pandoc
0 stars 0 forks source link

mediawiki reader and writer #58

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Such a feature would be useful for people who want to convert back and
forth between the mediawiki syntax (which is used in wikipedia, wikibooks
and a bunch of other organisational wikis) and something like LaTeX.

Original issue reported on code.google.com by eric....@gmail.com on 18 Feb 2008 at 1:28

GoogleCodeExporter commented 8 years ago

Original comment by fiddloso...@gmail.com on 18 Feb 2008 at 4:22

GoogleCodeExporter commented 8 years ago
Markdown (and pandoc) allow list items to contain multiple block
elements.  For example,

1.  First item.

    > quoted material inside
    > first item.

2.  Second item.

    Second paragraph of second item.

        { code block, still under second item }

    - sub list
    - sub list

3.  Third item.

How is this done in mediawiki?  It wasn't obvious from any documentation I've 
seen.

Original comment by fiddloso...@gmail.com on 23 Jul 2008 at 2:36

GoogleCodeExporter commented 8 years ago
Even without a mediawiki writer, you can convert markdown to mediawiki using
pandoc + the perl module HTML::WikiConverter:

pandoc FILE | html2wiki --dialect=MediaWiki

However, this doesn't seem to handle list items containing multiple paragraphs
properly.

Original comment by fiddloso...@gmail.com on 23 Jul 2008 at 3:01

GoogleCodeExporter commented 8 years ago
No idea, sadly.

I'm looking at the advanced documentation,
http://meta.wikimedia.org/wiki/Help:Advanced_editing

I know how to do sublists and to insert newlines in a list (the HTML br tag), 
but the
FAQ complains that inserting pre-formatted text no longer works in one of the 
version
of mediawiki

Original comment by eric....@gmail.com on 24 Jul 2008 at 9:09

GoogleCodeExporter commented 8 years ago
Following up on this, it turns out you can use HTML lists directly, i.e. using 
the ol
and ul tags.  Maybe Pandoc could use such lists when it detects the presence of 
fancy
stuff?

http://meta.wikimedia.org/wiki/Help:List

Original comment by eric....@gmail.com on 24 Jul 2008 at 9:28

GoogleCodeExporter commented 8 years ago
Good suggestion.  I've got the writer working pretty well now, and it
will probably be included in the 0.47 release!

Original comment by fiddloso...@gmail.com on 26 Jul 2008 at 6:31

GoogleCodeExporter commented 8 years ago
Writer added in r1337.

Original comment by fiddloso...@gmail.com on 27 Jul 2008 at 3:27

GoogleCodeExporter commented 8 years ago

Original comment by fiddloso...@gmail.com on 10 Aug 2008 at 11:54

GoogleCodeExporter commented 8 years ago
Any chance that someone is working on a reader? I'm interested in converting a 
lot of
Mediawiki text into markdown format.

Original comment by tans...@google.com on 20 Oct 2008 at 8:00

GoogleCodeExporter commented 8 years ago
Niels Aan de Brugh was working on one:
http://groups.google.com/group/pandoc-discuss/browse_thread/thread/00cf832e81a35
c6d
You might contact him directly to see how much progress he has made.

Original comment by fiddloso...@gmail.com on 20 Oct 2008 at 8:57

GoogleCodeExporter commented 8 years ago
Closing this issue, since the writer is finished.
Starting a new one for the mediawiki reader.

Original comment by fiddloso...@gmail.com on 1 Nov 2008 at 9:13