X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=processor%2F.meta%2Fdefault.intermediate.do;fp=processor%2F.meta%2Fdefault.intermediate.do;h=e6addeae5d18512aee7bed156b7feea0aeda5888;hb=6ee5e0e20b722b1d4e72dfa52a19ec684cb30410;hp=0000000000000000000000000000000000000000;hpb=4373137de8ac6ad8731e6828a9876de9efe0a82e;p=redo-blog diff --git a/processor/.meta/default.intermediate.do b/processor/.meta/default.intermediate.do new file mode 100644 index 0000000..e6addea --- /dev/null +++ b/processor/.meta/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