Skip to content
This repository has been archived by the owner on Mar 2, 2020. It is now read-only.

Commit

Permalink
add html2md.sh re: #48
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Gough committed Sep 4, 2015
1 parent 5c8b9aa commit fd4c658
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions html2md.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

HTML_SRC="_build/html"
MD_SRC="_build/md"

# we need the HTML to have been build
if [ ! -d "$HTML_SRC" ]
then
echo "ERROR: missing directory, %s" % $HTML_SRC
exit 1
fi

# we need a target to build to
if [ ! -d "$MD_SRC" ]
then
mkdir "$MD_SRC"
fi

oldpwd=`pwd`
cd $HTML_SRC
for file in `find . | grep "\.html$"`
do
pandoc -f html -t markdown -o ../md/$file $file
done

0 comments on commit fd4c658

Please sign in to comment.