summaryrefslogtreecommitdiff
path: root/scripts/acronyms.pl
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2016-05-09 20:49:29 +0200
committerDaniel Friesel <derf@finalrewind.org>2016-05-09 20:49:29 +0200
commitdce8472ad375624287c7e5c1dd80ea0d53e7e678 (patch)
treedf4051292f9a033bc9cef0d8df5106bc71f49ada /scripts/acronyms.pl
parent2bb64f91d3dc628728bb9de3a9c3888462f66eb2 (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-xscripts/acronyms.pl8
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';