Line | |
---|
1 | #! /usr/bin/perl -w
|
---|
2 |
|
---|
3 | # Written by Dirk Stöcker <openstreetmap@dstoecker.de>
|
---|
4 | # Public domain, no rights reserved.
|
---|
5 |
|
---|
6 | use strict;
|
---|
7 |
|
---|
8 | my $item;
|
---|
9 | my $comment = 0;
|
---|
10 |
|
---|
11 | # This is a simple conversion and in no way a complete XML parser
|
---|
12 | # but it works with a default Perl installation
|
---|
13 |
|
---|
14 | while(my $line = <>)
|
---|
15 | {
|
---|
16 | chomp($line);
|
---|
17 | if($line =~ /^#(.*)$/)
|
---|
18 | {
|
---|
19 | print "//$1\n";
|
---|
20 | }
|
---|
21 | elsif($line =~ /^$/)
|
---|
22 | {
|
---|
23 | print "\n";
|
---|
24 | }
|
---|
25 | elsif($line =~ /^(.*?);(.*?);(.*)$/)
|
---|
26 | {
|
---|
27 | print "tr(\"$2\") // $3\n";
|
---|
28 | }
|
---|
29 | else
|
---|
30 | {
|
---|
31 | print "/* $line */\n";
|
---|
32 | }
|
---|
33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.