Skip to content

Python library to convert mediawiki syntax to HTML

License

Notifications You must be signed in to change notification settings

brondsem/mediawiki2html

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a fork of https://github.com/zikzakmedia/python-mediawiki aka https://pypi.org/project/mediawiki/

It has updates to run with Python 3. No further maintenance or feature development is planned at this point.

This updated version is published at https://pypi.org/project/mediawiki2html/ (pip install mediawiki2html) but still provides the "mediawiki" module that you import.

Presentation

Convert MediaWiki Syntax to HTML

How to use in a program

Example for HTML

In order to use this tool to render wikitext into HTML in a Python program, you can use the following lines:

from mediawiki import *

source = ''
with open("syntax") as f:
   for line in f:
       source += line

wiki_content = wiki2html(source, True)
print(wiki_content)

Doc about Syntax

See doc dir more about syntax and HTML code generated and example

About

Python library to convert mediawiki syntax to HTML

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 93.2%
  • HTML 6.8%