Citizendium Forums
November 28, 2014, 08:17:13 UTC *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: This forums is now a read-only archive. Project members may post on the new forum. Non-members may use only the "Open Forum" group, but still must register before posting (it's easy!). Posts will otherwise be deleted.
To edit your displayed name, click on Profile > Account Related Settings. To edit your signature, click on Profile > Forum Profile Information.
Click here to return to the wiki
   Home   Help Search Login Register  
Pages: [1]
Author Topic: Gitizendium  (Read 1103 times)
Tom Morris
Forum Participant
Posts: 354

« on: May 30, 2010, 15:42:20 UTC »

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!  Grin If and when it all works, you'll all get to play - I promise.
« Last Edit: May 30, 2010, 15:53:35 UTC by Tom Morris » Logged

Daniel Mietchen
Forum Member
Posts: 25

« Reply #1 on: June 01, 2010, 23:12:58 UTC »

I like this idea very much! Relevant interview.

Aleta Curry
Forum Regular
Posts: 1894

« Reply #2 on: June 10, 2010, 23:21:43 UTC »

Tom dear, I have absolutely no idea as to what you're talking about.

Which means you're lumping me in with the 'normal people' (I think)

So, thanks!  (I think!)  Grin

Lady Astor, to Winston Churchill:  Sir, if you were my husband, I'd put poison in your tea!

Churchill:  Madam, if I were your husband, I'd drink it!
Pages: [1]
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.15 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!