gdritter repos GRUtils / 1bb46c6
Added Panview Getty Ritter 7 years ago
1 changed file(s) with 22 addition(s) and 0 deletion(s). Collapse all Expand all
1 #!/bin/bash -e
2
3 FILE=$(mktemp)
4 if [ $# -lt 1 ]; then
5 INP="-"
6 else
7 INP="$1"
8 shift
9 fi
10
11 if [ x"$1" = x--github ]; then
12 FMT="markdown_github"
13 elif [ x"$1" = x--rst ]; then
14 FMT="rst"
15 else
16 FMT="markdown"
17 fi
18
19 echo "format: $FMT; source: $INP; tmp location: $FILE"
20 pandoc --standalone -f $FMT -i $INP -t html -o $FILE
21 surf $FILE
22 rm $FILE