Updated parse_wrmap to accept normal strings.
[philipp/winterrodeln/wrpylib.git] / wrpylib / mwapi.py
1 #!/usr/bin/python3.4
2 # $Id$
3 # $HeadURL$
4 """This module contains general functions for using the MediaWiki API. There is one very
5 good Python wrapper implementation of the MediaWiki API:
6 * wikitools http://code.google.com/p/python-wikitools/
7
8 Therefore this module doesn't need to have much content.
9 """
10
11
12 def dbkey_to_title(value):
13     """Converts a article database key to a article title. Private function secureAndSplit() of the Title class
14     on line 3316 of includes/Title.php says:
15     $this->mTextform = str_replace( '_', ' ', $this->mDbkeyform );
16     No check for None because a missing title is an error."""
17     return value.replace('_', ' ')