tmplcvt 301 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!/bin/bash
#
# Convert a template file into something like RST
#
# fix <function>
# feed to pandoc
# fix \_
# title line?
#

in=$1
rst=$2
tmp=$rst.tmp

cp $in $tmp
sed --in-place -f convert_template.sed $tmp
pandoc -s -S -f docbook -t rst -o $rst $tmp
sed --in-place -f post_convert.sed $rst
rm $tmp