User:JHernandez (WMF)/How to migrate from g00gle docs to wikitext

Why is the title idiotic? Because you can't create pages with google on the title here. Now...

How do you covert a google drive doc (old google docs) into a wiki page? Here is a wayː

Parsing

 * 1) File -> Download as -> HTML zipped
 * 2) Unzip into a single HTML file
 * 3) Convert it to commonmark and then to mediawiki with pandocː
 * 4) Or use http://pandoc.org/try/ if your document is small enough
 * 5) Proceed to clean up the wikitext, see next section
 * 1) Or use http://pandoc.org/try/ if your document is small enough
 * 2) Proceed to clean up the wikitext, see next section

Cleanup

 * Add one heading level to all headers ( becomes  ) to match MediaWiki headers level
 * Remove empty
 * If you don't want comments around
 * Find  and remove the comments markup and text
 * Find  and remove the links to the comments content
 * Find https://www.google.com/url?q= and remove it (google docs adds it to all URLs
 * If you have links to headings in the document, you will have to manually change themː
 * Find  in the document and empty that hash id that is in the URL of the link
 * Change each url target to the mediawiki section list (usually the name of the section with instead of spaces)
 * You can use the TOC to check the ids by copying the link address on the TOC entry or clicking the TOC link and looking at the end of the URL in the browser's address bar