Package: smc.mw
smc.mwA mediawiki-compatible parser for Python.Current status:UsingTo run the tests:$ make -C testsThe test result can be found intests/out/report.html.A command line tool is available, too (installed as “mw”):$ echo "''Hello World''" | python smc/mw/tool.py
<html><body><p><i>Hello World</i>
</p></body></html>DifferencesFor specific differences, see thetest results.__TOC__ and other magic words must appear on a line on their own, while MediaWiki allows them everyhwere with some strange consequences.Not supported right now: __NOEDITSECTION__, __NEWSECTIONLINK, __NONEWSECTIONLINK__.ToDoTest 843: Section extraction, <pre> around bogus header (bug 10309)
This should be fixed, as it affects parser extensions (math element,
etc), too.  For this, the preprocessor grammar needs to include
specific (but not all) XML elements parsed (counterexample: div
elements are transparent for headings, pre elements are not).ThanksThe parser uses thegrakoparser generator for PEG grammars by ResQSoft Inc. and Juancarlo Añez.AuthorsMarcus Brinkmann,m.brinkmann@semantics.deCopyrightsmc.mwCopyright (C) 2013 semantics GmbH.  All Rights Reserved.For licensing, see the file LICENSE.txt.semantics
Kommunikationsmanagement GmbH
Viktoriaallee 45
D-52066 Aachen
Germany

email: info(at)semantics.de
url: http://www.semantics.de/jquerysmc.mw includes jquery in the test suite undertests/static/jquery-1.10.1.min.js:Copyright 2013 jQuery Foundation and other contributors
http://jquery.com/

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.Test DataThe test data undertests/data/parserTests.txtandtests/extra-data/*.txtis copied verbatim from the MediaWiki project:MediaWiki Parser test cases
Some taken from http://meta.wikimedia.org/wiki/Parser_testing
All (C) their respective authors and released under the GPLtidylibThe tidylib implementation intests/mytidylibis derived from
PyTidyLib, version 0.2.1:Copyright 2009 Jason Stitt

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.