Skip to content

Instantly share code, notes, and snippets.

vovan888 / gist:9436638
Last active Aug 29, 2015
Split mediawiki xml export file to separate pages - one file for every page.
View gist:9436638
#!/usr/bin/perl -w
# output files can be converted to other wiki formats with pandoc:
# find . -type f -exec pandoc -f mediawiki -t markdown_github -o "{}".mark "{}" \;
use strict;
use Parse::MediaWikiDump;
my $file = shift(@ARGV) or die "must specify a Mediawiki dump file";
my $pages = Parse::MediaWikiDump::Pages->new($file);