Browse Source

Added Panview

Getty Ritter 7 years ago
parent
commit
1bb46c674e
1 changed files with 22 additions and 0 deletions
  1. 22 0
      scripts/panview

+ 22 - 0
scripts/panview

@@ -0,0 +1,22 @@
+#!/bin/bash -e
+
+FILE=$(mktemp)
+if [ $# -lt 1 ]; then
+    INP="-"
+else
+    INP="$1"
+    shift
+fi
+
+if [ x"$1" = x--github ]; then
+    FMT="markdown_github"
+elif [ x"$1" = x--rst ]; then
+    FMT="rst"
+else
+    FMT="markdown"
+fi
+
+echo "format: $FMT; source: $INP; tmp location: $FILE"
+pandoc --standalone -f $FMT -i $INP -t html -o $FILE
+surf $FILE
+rm $FILE