GEEK ALERT! This stuff is geeky and new. Normal people need not apply at the moment.
Partly as a response to the silliness of the approval process, I've created a Git repository I've called "gitizendium" (heh). I was up most of last night till about 6am getting the code working.
A small chunk of Citizendium is now up on GitHub
as a Git repository.
I've pulled some articles into the repository - basically a few big articles and some stuff from my editing history.
Don't worry, I'm not planning to go rogue and launch my Super-Duper Wikipedia Beater (as a few of our former authors are now doing). I'm just playing about with Git as an alternative to MediaWiki software. And as a way to work on articles when I'm offline (which I am quite often). Eventually, I'd like to create a little package called git-cz. I looked at Levitation but it's too complex, so I'm just using this little Ruby script to pull articles in. It currently has a whole bunch of issues:
- MediaWiki and OS X differ in terms of file naming conventions. MediaWiki lets you have case-sensitive names. Linux does too. But Windows and OS X don't, which means that if you check Gitizendium out on Mac or Windows, you'll only see one article on 'Philosophy of science', but there's actually two - 'Philosophy of Science' (capital S) is a redirect to 'Philosophy of science'. I discovered this by accidentally capitalizing the 'S' when testing the import script. (This is obviously annonying now, but I think that the correct approach is if we were ever to produce a real Gitizendium, we'd just ignore MediaWiki's goofy naming crap and move to a sane way of doing it. For the URL, the case should match insensitively. But there ought not be multiple articles called "iphone", "iPhone", "iPhOnE" or any of that. CZ (and I guess WP) use a lowercase template so that the page /wiki/IPhone is actually displayed "iPhone". That seems equally stupid. If git ever replaces MediaWiki, we just have case-preserving, case-insensitive (like Windows and OS X), have the web server resolve case matching properly with a 302 redirect and not have manual redirect pages like "Philosophy of Science".
- Subpages aren't being pulled in yet. Nor are templates, namespaced pages, talk pages or anything else really. I can pull in approved pages, but my script just went crazy when I tried to get Homeopathy/Draft. It has something to do with JSON encoding errors - I may try switching it over to XML rather than JSON.
- The commits are all in a wacky order. If you use git log, everything looks silly. This is because fast-import is designed for one-shot importation.
- Currently, I'm using the API, but I'm not pulling in new changes after we run the first import. That's because the software isn't finished yet. So, if you write something important in Gitizendium, you still need to manually push it to Citizendium. I'll fix this up eventually, and hopefully git-cz will be able to just talk effortlessly to CZ.
- I think you need git 1.7 - I've got 1.7 on my Mac and 1.6 on my Linux netbook and there's some weird stuff going on with 1.6 with branching.
Anyway, what's cool about this? Check this out: blame for existentialism
This shows each line from the article 'Existentialism' with who is last responsible for editing it on the left. Pretty cool, no?
If you know what you are doing with Git and don't need me to explain it and want to participate, just say and I can help get you set up. Basically, you need git 1.7 and Ruby 1.8 or 1.9 with the json gem.
If you don't know what this does, just wait and see!
If and when it all works, you'll all get to play - I promise.