python-scripts/scripts/14_html_to_markdown.sh
2016-12-17 09:22:43 -07:00

17 lines
338 B
Bash
Executable File

# Convert all html files in a single directory to markdown
#
# 1. Install pandoc
# 2. Run the script
FILES=*.html
for f in $FILES
do
# extension="${f##*.}"
filename="${f%.*}"
echo "Converting $f to $filename.md"
`pandoc $f -t markdown -o ../mds/$filename.md`
# uncomment this line to delete the source file.
# rm $f
done