Going from ODT to Github Wiki - betrusted-io/betrusted-wiki GitHub Wiki

  1. Edit file in LibreOffice. In my process, I annotate URLs using markdown syntax and paste pictures directly into the document. I also use the native "headers" style to indicate sections.
  2. unzip the .odt file. It turns out .odt is nothing more than a ZIP file. There will be a directory of Pictures.
  3. Rename Pictures to something unique and copy it into the Wiki github ([email protected]:betrusted-io/betrusted-wiki.wiki.git)
  4. Export the ODT text to HTML using pandoc: pandoc -s --metadata pagetitle=whatever -o temp.html original.odt
  5. Export HTML to Markdown: pandoc -f html -s -t markdown temp.html -o md_to_github.md
  6. Open the .md in an editor (vscode with Markdown All in One for example), and search/replace Pictures/ with a URL of the form https://raw.githubusercontent.com/wiki/betrusted-io/betrusted-wiki/pictures_monitoring/. Push the changes to github.
  7. Search and replace instances of \ with nothing (of course paying attention to e.g. Windows paths or legit uses of )
  8. You should be able to preview the markdown, complete with pictures, by doing Ctrl-Shift-V.
  9. Add a ToC by doing Ctr-Shift-P and going to Markdown All in One: Create Table of Contents.
  10. Add the resulting .md file to the wiki.