source: osm/applications/editors/josm/i18n/convstyle.pl@ 13295

Last change on this file since 13295 was 13140, checked in by stoecker, 16 years ago

added some more stuff

File size: 511 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
11while(my $line = <>)
12{
13 chomp($line);
14 if($line =~ /<rules\s+name=(".*?")/)
15 {
16 print "tr($1) /* mappaint style named $1 */\n";
17 }
18 elsif($line =~ /colour="([^"]*)#/)
19 {
20 print "tr(\"$1\") /* color $1 */\n";
21 }
22 else
23 {
24 print "/* $line */\n";
25 }
26}
Note: See TracBrowser for help on using the repository browser.