Parcourir la source

Added Panview

Getty Ritter il y a 7 ans
Parent
commit
1bb46c674e
1 fichiers modifiés avec 22 ajouts et 0 suppressions
  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