=== modified file 'file_table' --- file_table 2017-11-07 00:12:35 +0000 +++ file_table 2014-03-20 11:04:35 +0000 @@ -1,4 +1,16 @@ #!/bin/sh +render() { + mkdir -p head/${1%/*} || exit $? + if test raw/"$1" -nt head.old/"$1".html; then + # TODO: escape filename!! + vim /dev/null 2>&1 raw/"$1" +'set nornu number fdm=' +TOhtml '+w! head/'"$1".html '+qa!' + touch -r raw/"$1" head/"$1".html + else + mv head.old/"$1".html head/"$1".html + fi + +} + while IFS='' read LINE; do F=${LINE% *} T=${LINE##* } === modified file 'render_files' --- render_files 2017-11-07 00:12:35 +0000 +++ render_files 2017-11-06 22:58:38 +0000 @@ -2,20 +2,10 @@ render() { mkdir -p head/${1%/*} || exit $? if test raw/"$1" -nt head.old/"$1".html -o '!' -e head.old/"$1".html; then - # escaped="head/$(printf '%s\n' "$1" | sed 's/[#%|\\]/\\&/').html" - # vim /dev/null 2>&1 raw/"$1" +'set modeline' +'e!' +'set nornu number fdm=manual' +TOhtml '+w! '"$escaped" '+qa!' - # todo: HTML escape title - {printf "%s\n" \ - '' \ - '