Revision 2,
527 bytes
checked in by niltonneto, 18 years ago
(diff) |
Removida todas as tags usadas pelo CVS ($Id, $Source).
Primeira versão no CVS externo.
|
-
Property svn:executable set to
*
-
Property svn:mime-type set to
application/octet-stream
|
Rev | Line | |
---|
| 1 | #!/usr/bin/perl |
---|
| 2 | # Takes a simple text file of properties and turns them |
---|
| 3 | # into a themes files. |
---|
| 4 | # Use it like so: |
---|
| 5 | # template2theme.pl < infile > outfile |
---|
| 6 | # by Stephan |
---|
| 7 | # $Id: template2theme.pl,v 1.5 2003/08/28 14:29:08 ralfbecker Exp $ |
---|
| 8 | $wrap='$phpgw_info['theme']['_KEY_']= '_VAL_''; |
---|
| 9 | print '<?\n'; |
---|
| 10 | print << 'EOF'; |
---|
| 11 | # phpGroupWare Theme file |
---|
| 12 | EOF |
---|
| 13 | |
---|
| 14 | while( $_ = <STDIN> ) { |
---|
| 15 | next unless ( $_ =~ /^\s*(\w+)\s*=(.+)/ ); |
---|
| 16 | $k=$1; |
---|
| 17 | $v=$2; |
---|
| 18 | my $foo = $wrap; |
---|
| 19 | $foo =~ s/_KEY_/$k/; |
---|
| 20 | $foo =~ s/_VAL_/$v/; |
---|
| 21 | print '$foo;\n'; |
---|
| 22 | } |
---|
| 23 | print '?>'; |
---|
Note: See
TracBrowser
for help on using the repository browser.