From 43570f95e14bda6528e2b1539458ddb76526b3f4 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 8 Jun 2014 20:58:42 +0400 Subject: [PATCH] Use iconv to convert cheetah-generated HTML from utf-8 --- make-files | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.39.2