tips:mediawiki_to_dokuwiki_converter
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tips:mediawiki_to_dokuwiki_converter [2013-04-24 05:24] – Project at GitHub is always newer than anything pasted here. Better to use the link than broken code. 74.243.147.85 | tips:mediawiki_to_dokuwiki_converter [2017-10-12 17:51] (current) – [yamdwe tool] 207.191.190.131 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== MediaWiki to DokuWiki Converter ====== | ====== MediaWiki to DokuWiki Converter ====== | ||
+ | ===== Automatic script ===== | ||
+ | |||
+ | This script will automatically convert a MediaWiki install to DokuWiki. No configuration is required as all it needs is the path to '' | ||
+ | |||
+ | The '' | ||
+ | |||
+ | Find on GitHub: \\ https:// | ||
+ | |||
+ | ===== yamdwe tool ===== | ||
+ | |||
+ | " | ||
+ | |||
+ | https:// | ||
+ | |||
+ | **Pros**: | ||
+ | * It uses the MediaWiki API so can create a local DokuWiki from a remote MediaWiki install. Automatically imports full revision history for each page, imports media and (optionally) imports users & passwords if it has database access. | ||
+ | * Uses [[http:// | ||
+ | |||
+ | **Cons**: | ||
+ | * Is Python based so it's more involved to set up than most of the other tools listed here (install steps for Linux are provided.) | ||
+ | * Slow for large amounts of Mediawiki content | ||
+ | * Categories are not converted (the content within the category pages) | ||
+ | ===== Older scripts: ===== | ||
===== Updated Scripts for Converting Mediawiki 1.15.1 to Anteater. ===== | ===== Updated Scripts for Converting Mediawiki 1.15.1 to Anteater. ===== | ||
Line 44: | Line 67: | ||
==== Source ===== | ==== Source ===== | ||
File mediawiki2dokuwiki.sh: | File mediawiki2dokuwiki.sh: | ||
- | <code bash> | + | <code bash mediawiki2dokuwiki.sh> |
#! /bin/sh | #! /bin/sh | ||
# Mediawiki2Dokuwiki Converter | # Mediawiki2Dokuwiki Converter | ||
Line 469: | Line 492: | ||
--- [[user> | --- [[user> | ||
- | ===== Another automatic script ===== | ||
- | This script will automatically convert a MediaWiki install to DokuWiki. No configuration is required as all it needs is the path to LocalSettings.php. The above shell script did not work as expected as DokuWiki did not find the pages after they were injected manually. Instead, this script uses DokuWiki' | + | ====== Mediawiki 2 Dokuwiki Converter ====== |
- | The mw2dw-conv_sed.sh script has been converted into native PHP so shell access is not required. Also runs from the web server if desired. | + | <code perl> |
+ | #! /bin/sh | ||
+ | # Mediawiki2Dokuwiki Converter | ||
+ | # originally by Johannes Buchner <buchner.johannes [at] gmx.at> | ||
+ | # License: GPL (http:// | ||
+ | |||
+ | # Headings | ||
+ | cat mediawiki | \ | ||
+ | perl -pe 's/^[ ]*=([^=])/< | ||
+ | perl -pe ' | ||
+ | perl -pe 's/^[ ]*==([^=])/< | ||
+ | perl -pe ' | ||
+ | perl -pe 's/^[ ]*===([^=])/< | ||
+ | perl -pe ' | ||
+ | perl -pe 's/^[ ]*====([^=])/< | ||
+ | perl -pe ' | ||
+ | perl -pe 's/^[ ]*=====([^=])/< | ||
+ | perl -pe ' | ||
+ | perl -pe 's/^[ ]*======([^=])/< | ||
+ | perl -pe ' | ||
+ | > mediawiki1 | ||
+ | |||
+ | cat mediawiki1 | \ | ||
+ | perl -pe ' | ||
+ | perl -pe ' | ||
+ | perl -pe ' | ||
+ | perl -pe ' | ||
+ | perl -pe ' | ||
+ | perl -pe ' | ||
+ | cat > mediawiki2 | ||
+ | |||
+ | # lists | ||
+ | cat mediawiki2 | | ||
+ | perl -pe ' | ||
+ | perl -pe ' | ||
+ | perl -pe ' | ||
+ | perl -pe ' | ||
+ | perl -pe ' | ||
+ | perl -pe ' | ||
+ | perl -pe ' | ||
+ | perl -pe ' | ||
+ | perl -pe ' | ||
+ | perl -pe ' | ||
+ | cat > mediawiki3 | ||
+ | |||
+ | #[link] => [[link]] | ||
+ | cat mediawiki3 | | ||
+ | perl -pe ' | ||
+ | perl -pe ' | ||
+ | perl -pe ' | ||
+ | perl -pe ' | ||
+ | > mediawiki4 | ||
+ | |||
+ | #[[url text]] => [[url|text]] | ||
+ | cat mediawiki4 | | ||
+ | perl -pe ' | ||
+ | > mediawiki5 | ||
+ | |||
+ | # bold, italic | ||
+ | cat mediawiki5 | | ||
+ | perl -pe " | ||
+ | perl -pe " | ||
+ | > mediawiki6 | ||
+ | |||
+ | # talks | ||
+ | cat mediawiki6 | | ||
+ | perl -pe "s/^[ ]*:/>/ | ||
+ | perl -pe " | ||
+ | perl -pe " | ||
+ | perl -pe " | ||
+ | perl -pe " | ||
+ | perl -pe " | ||
+ | perl -pe " | ||
+ | > mediawiki7 | ||
+ | |||
+ | cat mediawiki7 | | ||
+ | perl -pe " | ||
+ | perl -pe " | ||
+ | > mediawiki8 | ||
+ | |||
+ | cat mediawiki8 > dokuwiki | ||
+ | </ | ||
- | Find on GitHub: https:// |
tips/mediawiki_to_dokuwiki_converter.1366773879.txt.gz · Last modified: 2013-04-24 05:24 by 74.243.147.85