added mdw.sh
This commit is contained in:
parent
60a15ad87e
commit
7329f17095
1 changed files with 11 additions and 0 deletions
11
.local/bin/mdw.sh
Executable file
11
.local/bin/mdw.sh
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#! /bin/bash
|
||||||
|
[ ! -r "$1" ] && {
|
||||||
|
echo "Usage: $0 <input file>" >&2
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
TEMP_FILE=$(mktemp --tmpdir -u "$(basename "$1").XXXXXX.html")
|
||||||
|
pandoc "$1" > "$TEMP_FILE"
|
||||||
|
x-www-browser "$TEMP_FILE"
|
||||||
|
sleep 2
|
||||||
|
/bin/rm "$TEMP_FILE"
|
||||||
|
|
Loading…
Reference in a new issue