Skip to content

Instantly share code, notes, and snippets.

@jackkinsella
Last active March 10, 2021 15:31
Show Gist options
  • Save jackkinsella/b6415e23a9304b41ea7799a26c8e7bf3 to your computer and use it in GitHub Desktop.
Save jackkinsella/b6415e23a9304b41ea7799a26c8e7bf3 to your computer and use it in GitHub Desktop.
Convert a folder of Word files to markdown using Pandoc
for filename in edited/*.docx; do
pandoc -s $filename -t markdown_mmd --extract-media "media-`$filename | cut -d- -f1-2`" --wrap=none --smart --normalize -o "`basename $filename .docx`".md
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment