diff options
Diffstat (limited to 'bin/any2qmd.sh')
-rwxr-xr-x | bin/any2qmd.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/any2qmd.sh b/bin/any2qmd.sh new file mode 100755 index 0000000..93112a1 --- /dev/null +++ b/bin/any2qmd.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +set -au + +INFILE=$1 + +OUTFILE="$(dirname "$INFILE")/${2:-index.qmd}" + +pandoc --to commonmark+smart --wrap none "$INFILE" | perl -pe 's/ --- / -- /g; s/\\(?=['"'"'"])//g; s/^- / * /g;' > "$OUTFILE" |