Skip to main content

smc.mw

A mediawiki-compatible parser for Python.

Current status:

https://travis-ci.org/lambdafu/smc.mw.png https://coveralls.io/repos/lambdafu/smc.mw/badge.png?branch=master https://pypip.in/v/smc.mw/badge.png https://pypip.in/d/smc.mw/badge.png

Using

To run the tests:

$ make -C tests

The test result can be found in tests/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>

Differences

For specific differences, see the test 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__.

ToDo

  • Test 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).

Thanks

The parser uses the grako parser generator for PEG grammars by ResQSoft Inc. and Juancarlo Añez.

Authors

Metadata

Release files for smc.mw 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for smc.mw 0.3
File Size Uploaded Provenance Actions
smc.mw-0.3.zip 777.4 kB Without provenance Details for smc.mw-0.3.zip

Release files / smc.mw-0.3.zip

Download URL smc.mw-0.3.zip
Size 777.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a09e1212b0f8c19339cc573d95b7354dbd9450f49e3a891b1c17834ac059ef2e
BLAKE2b-256 checksum
How to use checksums
3c24bf79e2983466cd642d47316dc193a756cdab20ae9101f66adc2c053fc6f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for smc.mw 0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page