X-Git-Url: https://projects.mako.cc/source/mw/blobdiff_plain/856c67a6f2c8a618e94bf0c72af70e7d65bd10c4..c846c000883d4eebd1d4135dac6a379faf7484c7:/src/mw/api.py diff --git a/src/mw/api.py b/src/mw/api.py index bd12bb0..c6958c2 100644 --- a/src/mw/api.py +++ b/src/mw/api.py @@ -55,3 +55,14 @@ class API(object): return high else: return low + + +def pagename_to_filename(name): + name = name.replace(' ', '_') + name = name.replace('/', '!') + return name + +def filename_to_pagename(name): + name = name.replace('!', '/') + name = name.replace('_', ' ') + return name