Posts Tagged ‘python’

New awesomeness: mw

December 7th, 2009

During an extremely long hackfest today at FUDCon Toronto 2009, I planned to work on resurrecting fuse-mediawiki from its 15-month slumber.

I failed.

After talking with Jesus M. Rodriguez for an hour or so, we both determined that FUSE is not the right way to go about this for what I want to accomplish. The only thing we were planning to use FUSE for so far was downloading the wiki pages; everything else would be done with helper scripts.

We discussed things like “pull” and “commit”. It started to sound like a bastardized VCS. So we wrote a bastardized VCS. :)

Introducing mw: a command-line program with subcommands like “fetch” and “commit” to work with MediaWiki installations. I spent all day creating the framework for commands and all sorts of things, and ended up creating the init and fetch commands to start a mw repo and fetch some pages.

Currently: useless. Future: promising. I’m hoping that I can get the committing portion ready to roll within the week, and have fetch get all the pages of wikis and categories soonish.

Some key awesomeness: attempts to merge instead of just giving up (haha, you suck, MediaWiki), unified diffs, logs, and anything you really feel like doing.

Clone it now and read the README and HACKING:

git clone git://github.com/ianweller/mw.git

Edit: If you want to discuss this with me at FUDCon tomorrow, by all means do. Ping me on IRC to see where I’m at. :)

Tags: , , , , , | 1 Comment »

fuse-mediawiki 0.1

July 27th, 2008

A fun personal project of mine, fuse-mediawiki, has been pushed to 0.1. It’s most likely still very broken, but it’d be nice if people would be able to test it a bit, submit patches, whatever.

Fetch the source with

$ git clone git://repo.or.cz/fuse-mediawiki.git

and play around. This’ll get you started with the Fedora Project wiki:

$ mkdir ~/wiki/
$ python fuse-mediawiki.git https://fedoraproject.org/w/index.php ~/wiki/ --auth-basic -u FAS_USERNAME
$ mkdir -p ~/wiki/content/User:Ianweller/
$ vim ~/wiki/content/User:Ianweller/fuse-mediawiki_playground.wiki

and a :wq and changes will be committed to the wiki. Exit the filesystem with

$ fusermount -u ~/wiki/

Do NOT, under any circumstances, use this for real work and blame me for any damage caused. However, please do test it in places where it doesn’t matter what happens, and let me know what breaks.

There is currently nothing to prevent you from overwriting somebody else’s changes. There is currently nothing that clears out the cache of a page unless you remount it.

I have no clue how this works in Emacs, or gedit, or anything else. Patches welcome to fix it. :)

If you’re trying to debug something, pass the -f option to the end of the command line; it’ll put the program in the foreground and print fun debugging information. Read the README for more info.

This may be a personal project, but if somebody would like to work on this with me, that’d be great! Shoot me an email.

Edit: I fail. The correct option for auth_basic is --http-basic.

Tags: , , | 2 Comments »