Skip to content

Instantly share code, notes, and snippets.

@sytabaresa
Last active April 15, 2025 12:05
Show Gist options
  • Save sytabaresa/bea2a6964c2a90fb80f656348e3c9b97 to your computer and use it in GitHub Desktop.
Save sytabaresa/bea2a6964c2a90fb80f656348e3c9b97 to your computer and use it in GitHub Desktop.
a snippet to convert .DOCX files to .HTML (respect hierarchy)
myfilename="./filename-without-ext"
hachi ➤ pandoc \
-t markdown_strict \
--extract-media='./attachments/$myfilename' \
$myfilename.docx \
-o $myfilename.md
pandoc -f markdown $myfilename.md > $myfilename.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment