From: Sven Schöling Date: Tue, 11 Dec 2007 13:59:03 +0000 (+0000) Subject: kleines Script zum konvertieren von perl html -> template html X-Git-Tag: release-2.6.0beta1~392 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f4338c0b4202c8ec37bc838c012268615f58f40c;p=kivitendo-erp.git kleines Script zum konvertieren von perl html -> template html --- diff --git a/scripts/pl2tmpl.pl b/scripts/pl2tmpl.pl new file mode 100755 index 000000000..bd4d4d5f0 --- /dev/null +++ b/scripts/pl2tmpl.pl @@ -0,0 +1,15 @@ +#!/usr/local/bin/perl -pli.orig + +# +# perlcode -> template converter +# +# there's ugly perl generated html in your xy.pl? +# no problem. copy&paste it into a separate html file, remove 'qq|' and '|;' and use this script to fix most of the rest. +# +# use: perl pl2tmpl.pl +# +# will save the original file as file.orig +# + +s/\$form->\{(?:"([^}]+)"|([^}]+))\}/[% $+ %]/g; +s/\| \s* \. \s* \$locale->text \( ' ([^)]+) ' \) \s* \. \s* qq\|/$1<\/translate>/xg;