X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;ds=sidebyside;f=processor%2Fdefault.intermediate.do;fp=processor%2Fdefault.intermediate.do;h=7470c3c11806051bdcaa84a0fcb1545062d99a41;hb=dfdd193cf3f2f215fd26bae06ada013a14422581;hp=0000000000000000000000000000000000000000;hpb=72e91a2e5600566eae283d427450fa1c2fe4969b;p=redo-blog diff --git a/processor/default.intermediate.do b/processor/default.intermediate.do new file mode 100644 index 0000000..7470c3c --- /dev/null +++ b/processor/default.intermediate.do @@ -0,0 +1,15 @@ +#!/bin/sh + +template=intermediate.tmpl +uuidfile="${1%.intermediate}.uuid" +redo-ifchange "$uuidfile" +redo-ifchange "$template" +mdfile="${1%.intermediate}.md" +rstfile="${1%.intermediate}.rst" +if [ -f "$rstfile" ]; then + redo-ifchange "$rstfile" + pandoc -f rst --template="$template" --mathml -t html5 "$rstfile" > "$3" +elif [ -f "$mdfile" ]; then + redo-ifchange "$mdfile" + pandoc -f markdown --template="$template" --mathml -t html5 "$mdfile" > "$3" +fi