summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md20
-rwxr-xr-xscripts/update-readme20
2 files changed, 35 insertions, 5 deletions
diff --git a/README.md b/README.md
index b49d67b..c4551ef 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,21 @@
# hafas-m - Commandline Public Transit Departure Monitor
hafas-m is a commandline client and Perl module for HAFAS public transit
-departure interfaces such as
-[bahn.de/ris](https://reiseauskunft.bahn.de//bin/bhftafel.exe/dn). See the
-[Travel::Status::DE::DeutscheBahn
-homepage](https://finalrewind.org/projects/Travel-Status-DE-DeutscheBahn) for
-details.
+departure interfaces. It provides native support for the following
+interfaces, and can also be pointed to URLs not listed here.
+
+* [Deutsche Bahn](https://reiseauskunft.bahn.de/bin/bhftafel.exe)
+* [Nahverkehrsverbund Schleswig-Holstein](https://nah.sh.hafas.de/bin/stboard.exe)
+* [Nahverkehrsservice Sachsen-Anhalt](https://reiseauskunft.insa.de/bin/stboard.exe)
+* [Nordhessischer VerkehrsVerbund](https://auskunft.nvv.de/auskunft/bin/jp/stboard.exe)
+* [Rostocker Straßenbahn AG](https://fahrplan.rsag-online.de/hafas/stboard.exe)
+* [Verkehrsverbund Berlin-Brandenburg](https://fahrinfo.vbb.de/bin/stboard.exe)
+* [Verkehrsverbund Bremen/Niedersachsen](https://fahrplaner.vbn.de/hafas/stboard.exe)
+* [Österreichische Bundesbahnen](https://fahrplan.oebb.at/bin/stboard.exe)
+
+See the [Travel::Status::DE::DeutscheBahn
+homepage](https://finalrewind.org/projects/Travel-Status-DE-DeutscheBahn) and
+[hafas-m manual](https://man.finalrewind.org/1/hafas-m) for details.
## Installation
diff --git a/scripts/update-readme b/scripts/update-readme
new file mode 100755
index 0000000..27ea318
--- /dev/null
+++ b/scripts/update-readme
@@ -0,0 +1,20 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use 5.010;
+
+use File::Slurp qw(read_file write_file);
+use Travel::Status::DE::HAFAS;
+
+my $service_list = q{};
+
+for my $s ( Travel::Status::DE::HAFAS::get_services() ) {
+ $service_list .= sprintf( "* [%s](%s)\n", $s->{name}, $s->{url} );
+}
+
+my $readme = read_file('README.md', { binmode => ':utf8' } );
+
+$readme
+ =~ s{(?<=to URLs not listed here.\n\n).*(?=\nSee the \[)}{$service_list}s;
+
+write_file('README.md', {binmode => ':utf8'}, $readme);