summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/acronyms.pl8
-rwxr-xr-xscripts/acronyms.sh2
2 files changed, 5 insertions, 5 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';
diff --git a/scripts/acronyms.sh b/scripts/acronyms.sh
index 57b48ce..908f7d8 100755
--- a/scripts/acronyms.sh
+++ b/scripts/acronyms.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-curl -s http://data.deutschebahn.com/datasets/betriebsstellen/DBNetz-Betriebsstellenverzeichnis-Stand2015-05.csv \
+curl -s http://data.deutschebahn.com/datasets/haltestellen/D_Bahnhof_2016_01_alle.csv \
| perl scripts/acronyms.pl \
> lib/Travel/Status/DE/IRIS/Stations.pm