X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=make-files;h=5c736eaab2ee41b82d45b6d96c48727b2ebf3857;hb=c979d8e477cde0da0e4ed7accbdf68066f3fa04e;hp=589762119111ee83b6a3528c47cff6118a6d8688;hpb=9797aa2bbe23cd2cf09c70290819245a8c67d84e;p=phdru.name%2Fphdru.name.git diff --git a/make-files b/make-files index 5897621..5c736ea 100755 --- a/make-files +++ b/make-files @@ -2,10 +2,20 @@ umask 022 PYTHONPATH=. -export PYTHONPATH +PYTHONIOENCODING=koi8-r:replace +export PYTHONPATH PYTHONIOENCODING -if [ phd_site.tmpl -nt phd_site.py ]; then - cheetah compile --nobackup phd_site.tmpl && compyle phd_site.py +if [ \! -e phd_site.py -o phd_site.tmpl -nt phd_site.py ]; then + cheetah compile --encoding=koi8-r --settings='encoding="koi8-r"' --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 --encoding=koi8-r --settings='encoding="koi8-r"' \ + --nobackup --stdout "$tmpl" | iconv -f utf-8 -t koi8-r >"$dir/$outfile" || exit 1 +done + +exec sitemap_gen.py --config=sitemaps/phdru.name-config.xml