Skip to content

Instantly share code, notes, and snippets.

View spagu's full-sized avatar
💭
I may be slow to respond.

Mona Lisa spagu

💭
I may be slow to respond.
View GitHub Profile
@spagu
spagu / docx-to-html.sh
Created February 24, 2018 00:12
Script to convert DOCX to HTML using bash and pandoc
#!/usr/bin/env bash
# use: ./docx-to-html.sh /folderpath/
find $1 -type f -name "*.docx" -print0 | while IFS= read -r -d $'\0' FINALNAME; do
BASENAME=$(basename "$FINALNAME" .docx)
DIRNAME=$(dirname "$FINALNAME")
echo "$FINALNAME"
pandoc -t html -o "$DIRNAME/$BASENAME.html" "$FINALNAME"
done