source: subversion/applications/editors/josm/i18n/convstyle.pl @ 29943

Last change on this file since 29943 was 29943, checked in by Dirk Stoecker, 7 years ago

remove obsolete comments to empty string

File size: 726 bytes
Line 
1#! /usr/bin/perl -w
2
3# Written by Dirk Stöcker <openstreetmap@dstoecker.de>
4# Public domain, no rights reserved.
5
6use strict;
7
8# This is a simple conversion and in no way a complete XML parser
9# but it works with a default Perl installation
10
11# Print a header to write valid Java code.  No line break,
12# so that the input and output line numbers will match.
13print "class trans_style { void tr(String s){} void f() {";
14
15while(my $line = <>)
16{
17  chomp($line);
18  print "tr(\"\"); ";
19  if($line =~ /<rules\s+name=(".*?")/)
20  {
21    print "/* mappaint style named $1 */ tr($1);\n";
22  }
23  elsif($line =~ /colour="([^"]+)#/)
24  {
25    print "/* color $1 */ tr(\"$1\");\n";
26  }
27  else
28  {
29    print "/* $line */\n";
30  }
31}
32
33print "}}\n";
Note: See TracBrowser for help on using the repository browser.