Robowiki with Git-Mediawiki

From Robowiki
Jump to navigation Jump to search

Here I describe a way to get local Robowiki in the Git format. It is suitable for searching, editing, and even pushing back changes to Robowiki. But it will have no web interface thus you need to understand how Git works and be comfortable with command line interface.

Prerequisites

  • Git
  • Git-Mediawiki with my patch otherwise it will stop midway with a missing file error or you can clone from patched repo note that you need evmik-handle-404-not-found branch.
    • if you are curious about reason for this patch. Robowiki has error in the database and points to non existing file, see File:SelfPortrait.jpg and note missing revision dated 1st September 2013.
  • read and understand the manual for Git-Mediawiki especially the part about push and some of the config options which are shown below.

Commands to run

mkdir DirForRobowiki
cd DirForRobowiki

Copy the following content into the file .git/config uncomment and set the user name and password if you want to push back your local changes. If you wish to have a less complete wiki clone comment out unnecessary namespaces. The default is (Main) but then you will miss a lot of usegul information in discussions, user pages, and so on.

[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
[remote "origin"]
	url = mediawiki::http://robowiki.net/w
	fetch = +refs/heads/*:refs/remotes/origin/*
	#mwLogin = YourWikiLogin
	#mwPassword = YourWikiPassword
	mediaimport = true
	mediaexport = true
	dumbPush = true
	fetchStrategy = by_rev
	namespaces = (Main)
	namespaces = File File_talk 
	namespaces = Thread Thread_talk User User_talk
	namespaces = Project Project_talk RoboWiki RoboWiki_talk
	namespaces = Archived Archived_talk Category Category_talk 
	namespaces = Help Help_talk Media MediaWiki MediaWiki_talk 
	namespaces = RumbleArchives RumbleArchives_talk 
	namespaces = Special Summary Summary_talk Talk Template Template_talk 
[branch "master"]
	remote = origin
	merge = refs/heads/master

now you are ready to perform initial export

git pull

it will take several hours, but consequent calls for git pull will be much shorter (about 5 minutes with above settings).