X-Git-Url: https://projects.mako.cc/source/mw/blobdiff_plain/fb328c2757462c9a7ea8ee85075b5c1b68e5d396..4a350e948aa21b25d74b618c8050755bb1b26d4c:/src/mw/api.py diff --git a/src/mw/api.py b/src/mw/api.py index 135c2a1..c6958c2 100644 --- a/src/mw/api.py +++ b/src/mw/api.py @@ -13,8 +13,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# with this program. If not, see . ### import cookielib @@ -56,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