I haven't automated this yet, but will if I ever do this again.
-
Get a trac wiki export:
trac-admin $PWD wiki dump /tmp/wiki-dump/
-
cd /tmp/wiki-dump
-
Rename the home page:
mv WikiStart Home
-
Clean up trac-specific junk:
rm -f Wiki* Trac* CamelCase BadIP PageTemplates Inter* SandBox TitleIndex RecentChanges
-
Trac syntax is pretty close to MediaWiki syntax, but this may also help...
http://www.mediawiki.org/wiki/Extension:TracWiki2MediaWiki#How_to_use
... also need to name the files .wiki
$ for f in *; do perl ~/bin/perl/TracWiki2MediaWiki.pl $f; mv $f.after $f.wiki; done
-
Create your github repo
-
Clone its wiki by adding .wiki to the repo name:
git clone git@github.com:slinkp/scratch.wiki.git
-
Add your content:
cd scratch.wiki/
git rm -f Home.md
cp /tmp/wiki-dump/*wiki .
git add *wiki
git commit
git push
- View your wiki and hand-fix anything borken.