You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

opandoc 313B

123456789101112131415161718192021
  1. #!/bin/sh
  2. #
  3. # pbrisbin 2013 - view rendered markdown in a $BROWSER, using style
  4. # sheets from pbrisbin.com.
  5. #
  6. ###
  7. if [ $# -eq 0 ]; then
  8. printf "usage: opandoc FILE\n" >&2
  9. exit 64
  10. fi
  11. file="$(mktemp)"
  12. {
  13. printf '<html><body>'
  14. pandoc "$1"
  15. printf '</body></html>'
  16. } > "$file" && $BROWSER "file://$file"