From: Oleg Broytman Date: Sun, 8 Jun 2014 16:58:42 +0000 (+0400) Subject: Use iconv to convert cheetah-generated HTML from utf-8 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=43570f95e14bda6528e2b1539458ddb76526b3f4;p=phdru.name%2Fphdru.name.git Use iconv to convert cheetah-generated HTML from utf-8 --- diff --git a/make-files b/make-files index 5897621..ec02398 100755 --- a/make-files +++ b/make-files @@ -8,4 +8,9 @@ if [ phd_site.tmpl -nt phd_site.py ]; then cheetah compile --nobackup phd_site.tmpl && compyle phd_site.py fi && -exec cheetah fill --nobackup "$@" +for tmpl in "$@"; do + dir="`dirname \"$tmpl\"`" + outfile="`basename \"$tmpl\" .tmpl`.html" + echo "$tmpl => $dir/$outfile" + cheetah fill --nobackup --stdout "$tmpl" | iconv -f utf-8 >"$dir/$outfile" || exit 1 +done