X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/c9e81fbda14eace8e0f3c1b937ca5cdd39e50927..0a05ac9205612e39eb613c3daf94567bc50017e2:/doc/tips/convert_mediawiki_to_ikiwiki.mdwn?ds=sidebyside diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index 5c1a1863b..e60b413dd 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -1,6 +1,6 @@ [[!toc levels=2]] -Mediawiki is a dynamically-generated wiki which stores it's data in a +Mediawiki is a dynamically-generated wiki which stores its data in a relational database. Pages are marked up using a proprietary markup. It is possible to import the contents of a Mediawiki site into an ikiwiki, converting some of the Mediawiki conventions into Ikiwiki ones. @@ -188,7 +188,7 @@ There is a repository of tools for converting MediaWiki to Git based Markdown wi [[scy]] wrote a python script to convert from mediawiki XML dumps to git repositories at . -[[Anarcat]] wrote a python script to convert from a mediawiki website to ikiwiki at . The script doesn't need any special access or privileges and communicates with the documented API (so it's a bit slower, but allows you to mirror sites you are not managing, like parts of Wikipedia). The script can also incrementally import new changes from a running site, through RecentChanges inspection. It also supports mithro's new Mediawiki2markdown converter. +[[Anarcat]] wrote a python script to convert from a mediawiki website to ikiwiki at git://src.anarcat.ath.cx/mediawikigitdump.git/. The script doesn't need any special access or privileges and communicates with the documented API (so it's a bit slower, but allows you to mirror sites you are not managing, like parts of Wikipedia). The script can also incrementally import new changes from a running site, through RecentChanges inspection. It also supports mithro's new Mediawiki2markdown converter (which I have a copy here: git://src.anarcat.ath.cx/media2iki.git/). > Some assembly is required to get Mediawiki2markdown and its mwlib > gitmodule available in the right place for it to use.. perhaps you could @@ -204,7 +204,7 @@ There is a repository of tools for converting MediaWiki to Git based Markdown wi > fails on some html in the page named "4_metres". On archiveteam.org, > it fails trying to write to a page filename starting with "/", --[[Joey]] -> > can you show me exactly which commandline arguments you're using? also, I have made improvements over the converter too, also available here: -- [[anarcat]] +> > can you show me exactly which commandline arguments you're using? also, I have made improvements over the converter too, also available here: git://src/anarcat.ath.cx/media2iki.git/ -- [[anarcat]] >>> Not using your new converter, just the installation I did earlier >>> today: @@ -267,3 +267,20 @@ zsh: exit 1 ./mediawikigitdump.py -v -t http://archiveteam.org > > > > > > --[[Joey]] > > > > > > > I can't reproduce here, can you try with -v or -d to try to trace down the problem? -- [[anarcat]] + +
+fetching page list from namespace 0 ()
+found 473 pages
+fetching page 0 - 9  from http://www.amateur-radio-wiki.net/index.php?action=raw&title=0+-+9 into 0_-_9.mdwn
+Traceback (most recent call last):
+  File "./mediawikigitdump.py", line 304, in 
+    main()
+  File "./mediawikigitdump.py", line 301, in main
+    fetch_allpages(options.namespace)
+  File "./mediawikigitdump.py", line 74, in fetch_allpages
+    fetch_page(page.getAttribute('title'))
+  File "./mediawikigitdump.py", line 180, in fetch_page
+    f.write(options.convert(urllib.urlopen(url).read()))
+TypeError: argument 1 must be string or read-only character buffer, not None
+zsh: exit 1     ./mediawikigitdump.py -v -d -t http://www.amateur-radio-wiki.net/
+