X-Git-Url: https://projects.mako.cc/source/mw/blobdiff_plain/4a350e948aa21b25d74b618c8050755bb1b26d4c..9b8e57d467b0a3c0ae3b38fd781f668d409ddac6:/src/mw/api.py diff --git a/src/mw/api.py b/src/mw/api.py index c6958c2..88dee80 100644 --- a/src/mw/api.py +++ b/src/mw/api.py @@ -1,6 +1,6 @@ ### # mw - VCS-like nonsense for MediaWiki websites -# Copyright (C) 2009 Ian Weller +# Copyright (C) 2010 Ian Weller # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -23,7 +23,9 @@ from StringIO import StringIO import urllib import urllib2 + class API(object): + def __init__(self, api_url): self.api_url = api_url self.cookiejar = cookielib.CookieJar() @@ -62,6 +64,7 @@ def pagename_to_filename(name): name = name.replace('/', '!') return name + def filename_to_pagename(name): name = name.replace('!', '/') name = name.replace('_', ' ')