projects
/
mw
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
API definitely not locked in yet for version 1
[mw]
/
src
/
mw
/
api.py
diff --git
a/src/mw/api.py
b/src/mw/api.py
index 135c2a1e56deb4e529d9dbf7ec863c75fd09ff5e..c6958c28b52f0052de2536c144fcab600b91c12d 100644
(file)
--- 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
# 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 <http://www.gnu.org/licenses/>.
###
import cookielib
###
import cookielib
@@
-56,3
+55,14
@@
class API(object):
return high
else:
return low
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
Benjamin Mako Hill
||
Want to submit a patch?