summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build.PL2
-rw-r--r--Changelog3
-rw-r--r--README28
-rwxr-xr-xbin/db-iris14
-rw-r--r--lib/Travel/Status/DE/IRIS.pm4
-rw-r--r--lib/Travel/Status/DE/IRIS/Result.pm7
-rw-r--r--lib/Travel/Status/DE/IRIS/Stations.pm4
7 files changed, 51 insertions, 11 deletions
diff --git a/Build.PL b/Build.PL
index f6e7406..90de1eb 100644
--- a/Build.PL
+++ b/Build.PL
@@ -7,6 +7,8 @@ use Module::Build;
Module::Build->new(
build_requires => {
+ 'Test::Compile' => 0,
+ 'Test::Fatal' => 0,
'Test::More' => 0,
'Test::Pod' => 0,
},
diff --git a/Changelog b/Changelog
new file mode 100644
index 0000000..64d350b
--- /dev/null
+++ b/Changelog
@@ -0,0 +1,3 @@
+Travel::Status::DE::IRIS 0.01 - Fri Jan 24 2014
+
+ * Initial release. Experimental, API may change without notice
diff --git a/README b/README
new file mode 100644
index 0000000..7ceae7a
--- /dev/null
+++ b/README
@@ -0,0 +1,28 @@
+Travel::Status::DE::IRIS - Interface to IRIS based web departure monitors
+-------------------------------------------------------------------------
+
+* <http://finalrewind.org/projects/Travel-Status-DE-IRIS/>
+
+
+Dependencies
+------------
+
+* perl version 5.14.2 or newer
+* Class::Accessor
+* DateTime
+* DateTime::Format::Strptime
+* List::MoreUtils
+* LWP::UserAgent
+* XML::LibXML
+
+Installation
+------------
+
+* perl Build.PL
+* ./Build
+* sudo ./Build install
+
+See also the Module::Build documentation.
+
+You can then run 'man Travel::Status::DE::IRIS'.
+This distribution also ships the script 'db-iris', see 'man db-iris'.
diff --git a/bin/db-iris b/bin/db-iris
index a54e3c1..147119d 100755
--- a/bin/db-iris
+++ b/bin/db-iris
@@ -6,7 +6,7 @@ use utf8;
no if $] >= 5.018, warnings => 'experimental::smartmatch';
-our $VERSION = '0.00';
+our $VERSION = '0.01';
use DateTime;
use DateTime::Format::Strptime;
@@ -148,6 +148,12 @@ sub display_result {
my $d = $line->[5];
+ if ( $edata{delays}
+ and $d->delay_messages )
+ {
+ printf( ' %s',
+ join( q{ }, map { $_->[1] } ( reverse $d->delay_messages ) ) );
+ }
if ( $edata{delay}
and ( $d->delay or $d->is_cancelled )
and $d->delay_messages )
@@ -262,7 +268,7 @@ I<station>
=head1 VERSION
-version 0.00
+version 0.01
=head1 DESCRIPTION
@@ -313,7 +319,7 @@ Valid output types are:
If a train is delayed, show the most recent reason for this delay.
-=item d / delays
+=item D / delays
List all delay reasons entered into the IRIS for each train, even if the
particular train is on time by now.
@@ -415,7 +421,7 @@ None.
=head1 BUGS AND LIMITATIONS
-Todo.
+B<-oD> and B<-oq> contain duplicate entries.
=head1 AUTHOR
diff --git a/lib/Travel/Status/DE/IRIS.pm b/lib/Travel/Status/DE/IRIS.pm
index 6111882..e9a117d 100644
--- a/lib/Travel/Status/DE/IRIS.pm
+++ b/lib/Travel/Status/DE/IRIS.pm
@@ -6,7 +6,7 @@ use 5.014;
no if $] >= 5.018, warnings => 'experimental::smartmatch';
-our $VERSION = '0.00';
+our $VERSION = '0.01';
use Carp qw(confess cluck);
use DateTime;
@@ -273,7 +273,7 @@ Travel::Status::DE::IRIS - Interface to IRIS based web departure monitors.
=head1 VERSION
-version 0.00
+version 0.01
=head1 DESCRIPTION
diff --git a/lib/Travel/Status/DE/IRIS/Result.pm b/lib/Travel/Status/DE/IRIS/Result.pm
index 2b382c0..e672cd1 100644
--- a/lib/Travel/Status/DE/IRIS/Result.pm
+++ b/lib/Travel/Status/DE/IRIS/Result.pm
@@ -13,7 +13,7 @@ use DateTime;
use DateTime::Format::Strptime;
use List::MoreUtils qw(none uniq);
-our $VERSION = '0.00';
+our $VERSION = '0.01';
Travel::Status::DE::IRIS::Result->mk_ro_accessors(
qw(arrival classes date datetime delay departure is_cancelled line_no
@@ -882,7 +882,8 @@ None.
=head1 BUGS AND LIMITATIONS
-None known.
+The messages returned by B<delay_messages> and B<qos_messages> contain
+duplicates.
=head1 SEE ALSO
@@ -890,7 +891,7 @@ Travel::Status::DE::IRIS(3pm).
=head1 AUTHOR
-Copyright (C) 2013 by Daniel Friesel E<lt>derf@finalrewind.orgE<gt>
+Copyright (C) 2013-2014 by Daniel Friesel E<lt>derf@finalrewind.orgE<gt>
=head1 LICENSE
diff --git a/lib/Travel/Status/DE/IRIS/Stations.pm b/lib/Travel/Status/DE/IRIS/Stations.pm
index 891faf8..79884e8 100644
--- a/lib/Travel/Status/DE/IRIS/Stations.pm
+++ b/lib/Travel/Status/DE/IRIS/Stations.pm
@@ -7,7 +7,7 @@ use utf8;
use List::MoreUtils qw(firstval);
-our $VERSION = '0.00';
+our $VERSION = '0.01';
my @stations = (
@@ -15154,7 +15154,7 @@ Travel::Status::DE::IRIS::Stations - Station name to station code mapping
=head1 VERSION
-version 0.00
+version 0.01
=head1 DESCRIPTION