summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-02-02 08:59:23 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2025-02-02 08:59:23 +0100
commitb9ed81508031a1b66aa2ef73bdb77cefb35b9f17 (patch)
treef6cdfbb6e0a64a44f06344ec6c713e19994fb58c
parent951ffc66cd97a67cb648dcffc8e525f5aab647de (diff)
Release v0.030.03
-rw-r--r--Build.PL4
-rw-r--r--Changelog11
-rwxr-xr-xbin/dbris29
-rw-r--r--lib/Travel/Routing/DE/DBRIS.pm4
-rw-r--r--lib/Travel/Routing/DE/DBRIS/Connection.pm2
-rw-r--r--lib/Travel/Routing/DE/DBRIS/Connection/Segment.pm3
-rwxr-xr-xscripts/makedeb-docker-helper4
7 files changed, 47 insertions, 10 deletions
diff --git a/Build.PL b/Build.PL
index be94955..617d7dc 100644
--- a/Build.PL
+++ b/Build.PL
@@ -30,8 +30,8 @@ Module::Build->new(
'List::Util' => 0,
'LWP::UserAgent' => 0,
'LWP::Protocol::https' => 0,
- 'Travel::Status::DE::DBRIS' => '0.02',
- 'Travel::Status::DE::DBRIS::Location' => '0.02',
+ 'Travel::Status::DE::DBRIS' => '0.04',
+ 'Travel::Status::DE::DBRIS::Location' => '0.04',
},
script_files => 'bin/',
sign => 1,
diff --git a/Changelog b/Changelog
index cc60e65..a586ca3 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,14 @@
+Travel::Routing::DE::DBRIS 0.03 - Sun Feb 02 2025
+
+ * Connection: Add is_cancelled, is_unscheduled, is_unlikely accessors
+ * Segment: Add is_unlikely and transfer_duration accessors
+ * Parse and expose messages related to connections and connection segments
+ * dbris: Indicate connections that include cancelled segments or
+ segments that will likely not be reached due to insufficient layover
+ time
+ * dbris: add -j / --with-jid option
+ * dbris: add -v / --verbose option
+
Travel::Routing::DE::DBRIS 0.02 - Tue Jan 28 2025
* Add support for up to two stopovers
diff --git a/bin/dbris b/bin/dbris
index 4656a67..64a3039 100755
--- a/bin/dbris
+++ b/bin/dbris
@@ -3,7 +3,7 @@ use strict;
use warnings;
use 5.020;
-our $VERSION = '0.02';
+our $VERSION = '0.03';
use utf8;
use DateTime;
@@ -484,7 +484,7 @@ B<dbris> [B<-d> I<DD.MM.YYYY>] [B<-t> I<HH:MM>] [...] I<from-stop>
=head1 VERSION
-version 0.02
+version 0.03
=head1 DESCRIPTION
@@ -506,6 +506,11 @@ Default: today.
Show intermediate stops rather than just start/end of connection legs.
+=item B<--first-class>
+
+Request first class offers.
+Only useful when combined with B<--passengers>.
+
=item B<-j>, B<--with-jid>
Show JourneyID for each connection segment.
@@ -537,6 +542,21 @@ for 90 seconds in F<~/.cache/Travel-Routing-DE-DBRIS> (or a path relative to
C<$XDG_CACHE_HOME>, if set). Use this option to disable caching. You can use
B<--cache> to re-enable it.
+=item B<-p>, B<--passengers> I<type>[:I<discounts>,...][B<;>I<type>[:I<discounts>,...]B<;>...]
+
+Use the specified passenger information to request ticket offers and show the
+corresponding price for each connection. I<type> must be adult, junior, or
+senior. I<discounts> can be one or more of bc25, bc50, bc100, bc25-first,
+bc50-first, bc100-first. See also B<--first-class>.
+
+Note that B<dbris> only has access to a single offer per connection. It is
+typically the cheapest, but there is no information about what kind of ticket
+it is. Lack of a listed price either means that ticket offers are not available
+or (for bc100) that the connection does not require a ticket. There is no way
+to distinguish between these two cases. B<dbris> does not guarantee accuracy of
+the provided information and must not be relied upon to determine whether a
+given connection is free or not.
+
=item B<--raw-json>
Print unprocessed API response as JSON and exit.
@@ -547,6 +567,11 @@ Useful for debugging and development purposes.
Request connections on or after I<HH:MM>.
Default: now.
+=item B<-v>, B<--verbose>
+
+Include free-text messages related to delays, platform changes, and other
+quality of service issues or announcements.
+
=item B<-V>, B<--version>
Show version information and exit.
diff --git a/lib/Travel/Routing/DE/DBRIS.pm b/lib/Travel/Routing/DE/DBRIS.pm
index c6f8e25..fceec0f 100644
--- a/lib/Travel/Routing/DE/DBRIS.pm
+++ b/lib/Travel/Routing/DE/DBRIS.pm
@@ -17,7 +17,7 @@ use LWP::UserAgent;
use Travel::Status::DE::DBRIS;
use Travel::Routing::DE::DBRIS::Connection;
-our $VERSION = '0.02';
+our $VERSION = '0.03';
Travel::Routing::DE::DBRIS->mk_ro_accessors(qw(earlier later));
@@ -352,7 +352,7 @@ Travel::Routing::DE::DBRIS - Interface to the bahn.de itinerary service
=head1 VERSION
-version 0.02
+version 0.03
=head1 DESCRIPTION
diff --git a/lib/Travel/Routing/DE/DBRIS/Connection.pm b/lib/Travel/Routing/DE/DBRIS/Connection.pm
index 40bce91..82373a6 100644
--- a/lib/Travel/Routing/DE/DBRIS/Connection.pm
+++ b/lib/Travel/Routing/DE/DBRIS/Connection.pm
@@ -10,7 +10,7 @@ use parent 'Class::Accessor';
use DateTime::Duration;
use Travel::Routing::DE::DBRIS::Connection::Segment;
-our $VERSION = '0.02';
+our $VERSION = '0.03';
Travel::Routing::DE::DBRIS::Connection->mk_ro_accessors(
qw(changes feasibility is_cancelled is_unscheduled is_unlikely
diff --git a/lib/Travel/Routing/DE/DBRIS/Connection/Segment.pm b/lib/Travel/Routing/DE/DBRIS/Connection/Segment.pm
index 1f6e598..11e0bf5 100644
--- a/lib/Travel/Routing/DE/DBRIS/Connection/Segment.pm
+++ b/lib/Travel/Routing/DE/DBRIS/Connection/Segment.pm
@@ -9,7 +9,7 @@ use parent 'Class::Accessor';
use DateTime::Duration;
use Travel::Status::DE::DBRIS::Location;
-our $VERSION = '0.02';
+our $VERSION = '0.03';
Travel::Routing::DE::DBRIS::Connection::Segment->mk_ro_accessors(
qw(
@@ -43,6 +43,7 @@ sub new {
direction => $json->{verkehrsmittel}{richtung},
distance_m => $json->{distanz},
feasibility => $json->{anschlussBewertungCode},
+ journey_id => $json->{journeyId},
};
if ( my $ts = $json->{abfahrtsZeitpunkt} ) {
diff --git a/scripts/makedeb-docker-helper b/scripts/makedeb-docker-helper
index 33ea5c3..1863cd7 100755
--- a/scripts/makedeb-docker-helper
+++ b/scripts/makedeb-docker-helper
@@ -15,8 +15,8 @@ apt-get -y install \
libtest-compile-perl libtest-pod-perl \
libtest-simple-perl
-wget https://lib.finalrewind.org/deb/libtravel-status-de-dbris-perl_0.02-1_all.deb
-dpkg -i libtravel-status-de-dbris-perl_0.02-1_all.deb
+wget https://lib.finalrewind.org/deb/libtravel-status-de-dbris-perl_0.04-1_all.deb
+dpkg -i libtravel-status-de-dbris-perl_0.04-1_all.deb
apt-file update
apt-cache dumpavail | dpkg --merge-avail