Migrating documents from MediaWiki to Markdown.
XML
file will be saved locally on Downloads
Here, I make use of mediawiki-to-gfm. In particular, on the local directory where all xml files are located I run:
docker run -v $PWD:/app oooc/mediawiki-to-gfm --filename=file_name.xml
This makes a new markdown file named file_name.md
. It contains a copy of the contents of file_name.xml
. The markdown document will be located in a folder output
in the same directory as where the code above is being run. In the example above, then, you would find the following file structure:
file_name.xml
output/file_name.md
Not all files were successfully copied into markdown, and in some cases, an xml file was turned into a folder with a markdown inside it.
Case: folder creation.
Example: An xml file called DAP4:_Aggregg.xml
. Then executing docker run -v ...
on the command line produced:
output/DAP4/Aggregg.md
Case: error and no markdown file creation.
This happened with a few files. For each case I created an issue explaining the error message and the file that lead to the error.