Revision f4338c0b
Von Sven Schöling vor fast 17 Jahren hinzugefügt
scripts/pl2tmpl.pl | ||
---|---|---|
1 |
#!/usr/local/bin/perl -pli.orig |
|
2 |
|
|
3 |
# |
|
4 |
# perlcode -> template converter |
|
5 |
# |
|
6 |
# there's ugly perl generated html in your xy.pl? |
|
7 |
# no problem. copy&paste it into a separate html file, remove 'qq|' and '|;' and use this script to fix most of the rest. |
|
8 |
# |
|
9 |
# use: perl pl2tmpl.pl <file> |
|
10 |
# |
|
11 |
# will save the original file as file.orig |
|
12 |
# |
|
13 |
|
|
14 |
s/\$form->\{(?:"([^}]+)"|([^}]+))\}/[% $+ %]/g; |
|
15 |
s/\| \s* \. \s* \$locale->text \( ' ([^)]+) ' \) \s* \. \s* qq\|/<translate>$1<\/translate>/xg; |
Auch abrufbar als: Unified diff
kleines Script zum konvertieren von perl html -> template html