NAME

dbris-m - Interface to bahn.de public transit services

SYNOPSIS

dbris-m [-d DD.MM.YYYY] [-t HH:MM] [-j] station

dbris-m JourneyID

dbris-m ?query|lat:lon

VERSION

version 0.01

DESCRIPTION

dbris-m is an interface to the public transport services available on bahn.de. According to word of mouth, it uses the HAFAS backend that can also be accessed by Travel::Status::DE::HAFAS(3pm)'s DB service. However, the bahn.de entry point is likely more reliable in the long run.

dbris-m can serve as an arrival/departure monitor, request details about a specific trip, and look up public transport stops by name or geolocation. The operating mode depends on the contents of its non-option argument.

Departure Monitor (station)

Show departures at station. station may be given as a station name or station ID. For each departure, dbris-m shows

* estimated departure time,
* delay, if known,
* trip name, number, or line,
* direction / destination, and
* platform, if known.

Trip details (JourneyID)

List intermediate stops of JourneyID (as given by the departure monitor when invoed with -j / --with-jid) with arrival/departure time, delay (if available), occupancy (if available), and stop name. Also includes some generic trip information.

Location Search (?query|lat:lon)

List stations that match query or that are located in the vicinity of lat:lon geocoordinates with station ID and name.

OPTIONS

Values in brackets indicate options that only apply to the corresponding operating mode(s).

-d, --date DD.MM.[YYYY] (departure monitor)

Request departures on the specified date. Default: today.

-j, --with-jid (departure monitor)

Show JourneyID for each listed arrival/departure. These can be used to obtain details on individual trips with subsequent dbris-m invocations.

--json

Print result(s) as JSON and exit. This is a dump of internal data structures and not guaranteed to remain stable between minor versions. Please use the Travel::Status::DE::DBRIS(3pm) module if you need a proper API.

-m, --modes-of-transit mot1[,mot2,...]

Only return results for the specified modes of transit. Use <-m help> to get a list of supported modes of transit.

--no-cache

By default, if the Cache::File module is available, server replies are cached for 90 seconds in ~/.cache/Travel-Status-DE-DBRIS (or a path relative to $XDG_CACHE_HOME, if set). Use this option to disable caching. You can use --cache to re-enable it.

--raw-json

Print unprocessed API response as JSON and exit. Useful for debugging and development purposes.

-t, --date HH:MM (departure monitor)

Request departures on or after the specified time. Default: now.

-V, --version

Show version information and exit.

EXIT STATUS

0 upon success, 1 upon internal error, 2 upon backend error.

CONFIGURATION

None.

DEPENDENCIES

* Class::Accessor(3pm)
* DateTime(3pm)
* LWP::UserAgent(3pm)

BUGS AND LIMITATIONS

* This module is very much work-in-progress

AUTHOR

Copyright (C) 2024-2025 Birte Kristina Friesel <derf@finalrewind.org>

LICENSE

This program is licensed under the same terms as Perl itself.