Skip to content

Instantly share code, notes, and snippets.

@RyanParsley
Last active December 15, 2015 10:39
Show Gist options
  • Save RyanParsley/5247199 to your computer and use it in GitHub Desktop.
Save RyanParsley/5247199 to your computer and use it in GitHub Desktop.
Run through a web app that removes word junk.
#!/bin/sh
input="$1"
# %%.* strips off everything after the first . in this string
filename="${input%%.*}"
textutil -convert html "$input" -output "$filename".html
curl -d html="$filename".html http://wordoff.org/api/clean
pandoc -f html -t markdown "$filename".html -o "$filename".markdown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment