Thanks for mw2md project. It helped me a lot!
Dump mediawiki latest data
php /var/www/html/mediawiki_1.21.1/maintenance/dumpBackup.php --current > /root/wiki2markdown/dump.xml
Dump all latest images to a folder: images
php /var/www/html/mediawiki_1.21.1/maintenance/dumpUploads.php | sed 's~mwstore://local-backend/local-public~/var/www/html/mediawiki_1.21.1/images~' | xargs cp -t /root/wiki2markdown/images/
Change config.yml. Add image tag with 'ccccccc' or any other key character(s)
# Rewrite special wiki constructs to be markdown-friendly
# (output should be HTML that feeds into the Markdown conversion)
rewrite_wiki:
'\{\{#ev:youtube\|([^|}]*)\|([^|}]*)\}\}': '<iframe width="\2" src="//youtube.com/embed/\1" frameborder="0" allowfullscreen="true"> </iframe>'
'\{\{#ev:youtube\|([^|}]*)\|([^|}]*)\|([^|}]*)[^}]?\}\}': '<iframe width="\2" src="//youtube.com/embed/\1" frameborder="0" align="\3" allowfullscreen="true"> </iframe>'
'\[\[image:(.*)\]\]': '!ccccccc\1ccccccc(/images/\1)'
# Rewrite resulting Markdown
rewrite_markdown:
'!ccccccc': '!['
'ccccccc': ']'
Result should be
