diff options
author | Daniel Friesel <derf@finalrewind.org> | 2016-05-09 20:49:29 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2016-05-09 20:49:29 +0200 |
commit | dce8472ad375624287c7e5c1dd80ea0d53e7e678 (patch) | |
tree | df4051292f9a033bc9cef0d8df5106bc71f49ada /scripts/acronyms.pl | |
parent | 2bb64f91d3dc628728bb9de3a9c3888462f66eb2 (diff) |
Switch to Deutsche Bahn Haltestellen list
Note that this does NOT include stations outside of germany, even if they
have Deutsche Bahn trains. This may be fixed in another commit.
Diffstat (limited to 'scripts/acronyms.pl')
-rwxr-xr-x | scripts/acronyms.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/acronyms.pl b/scripts/acronyms.pl index 9a32783..124034e 100755 --- a/scripts/acronyms.pl +++ b/scripts/acronyms.pl @@ -34,19 +34,19 @@ while (my $line = <STDIN>) { my $status = $csv->parse($line); my @fields = $csv->fields; - if ($fields[0] eq 'Abk') { + my ($uic, $station, $name, $mot, $longitute, $latitude) = @fields; + + if ($station eq 'DS100' or $station eq q{}) { next; } - my ($station, $name, $country, $location, $valid_since) = @fields; - $name =~ s{!}{ }g; $name =~ s{^\s+}{}; $name =~ s{\s+$}{}; $name =~ s{\s+}{ }g; $name =~ s{'}{\\'}g; - printf("\t['%s','%s'],\n", encode('UTF-8', $station), encode('UTF-8', $name)); + printf("\t['%s','%s',%s,%s,%s],\n", encode('UTF-8', $station), encode('UTF-8', $name), $uic, $longitute, $latitude); } say <<'EOF'; |