Downloads


Mirrors finalrewind Chaosdorf GitHub
See Also CPAN GitHub Issues Docker Image
hafas-m ist ein CLI-Client für HAFAS-basierte Ankunfts-/Abfahrtstafeln. Abhängig von Ort und ausgewähltem HAFAS-Service kann es Fahrten des Regional-/Fernverkehrs oder auch das lokale Nahverkehrsangebot mit Echtzeitdaten anzeigen. Hinweise zur Installation und eine Liste unterstützter Backends finden sich im Travel::Status::DE::DeutscheBahn README.
hafas-m is a comamndline client for HAFAS-based arrival/departure monitors. It shows arrivals or departures of trains as well as local transit services. The level of detail depends on the selected HAFAS service. See the Travel::Status::DE::DeutscheBahn README for installation instructions and supported services.
Beispielausgabe / Example Output:
> hafas-m 'Dortmund Universität'
15:11 Schw-B HB2 Campus Süd, Dortmund
15:13 +1 S 1 Dortmund Hbf 2
15:15 Schw-B HB1 Technologiezentrum, Dortmund
15:15 Schw-B HB1 Eichlinghofen H-Bahn, Dortmund
15:16 Schw-B HB2 Campus Süd, Dortmund
15:18 +1 S 1 Essen Hbf 1
15:18 Bus 447 Bandelstraße, Dortmund
15:20 Bus 447 Hacheney, Dortmund
Travel::Status::DE::DeutscheBahn v5.01
Travel-Status-DE-DeutscheBahn-5.01.tar.gz (signature)
- Fix incorrect handling of HIM messages (introduced in 4.19)
- hafas-m: Declutter station board output: sort by real-time data and show all messages at the end
- Journey: Support construction from JSON that does not provide a date
attribute (i.e., add
date
parameter to constructor) - Stop: Add
messages
accessor
Travel::Status::DE::DeutscheBahn v5.00
Travel-Status-DE-DeutscheBahn-5.00.tar.gz (signature)
hafas-m
: Add--raw-json
option (useful for HAFAS client development)hafas-m
: Add train search support, e.g. "hafas-m '!EC 6'"HAFAS->new
,HAFAS->new_p
: AddjourneyMatch
flag- Add
Travel::Status::DE::HAFAS::Location
module HAFAS::Stop
: Fix some documented accessors not being provided by the moduleHAFAS::Stop
: Add "loc" accessor that returns the corresponding Location instanceHAFAS::Stop
: Breaking change: The "eva", "name", "lat", "lon", "distance_m", and "weight" accessors are no longer supported. Use the (identically named) Location accessors instead, i.e.,$stop->loc->name
instead of$stop->name
, etc.
Travel::Status::DE::DeutscheBahn v4.19
Travel-Status-DE-DeutscheBahn-4.19.tar.gz (signature)
- hafas-m: Fall back to locationSearch if StopFinder is unavailable
- Message: Expose message type; document
->code
and->type
accessors
Travel::Status::DE::DeutscheBahn v4.18
Travel-Status-DE-DeutscheBahn-4.18.tar.gz (signature)
- Allow HAFAS and hafas-m users to specify the backend language
- Update services list to include known language specifiers
hafas-m
: Add-l
/--language
optionHAFAS->new
,->new_p
: Add language option
Travel::Status::DE::DeutscheBahn v4.16
Travel-Status-DE-DeutscheBahn-4.16.tar.gz (signature)
- Journey: Fix date parser for cross-midnight journeys that start on the 1st through 9th day of a month.
Travel::Status::DE::DeutscheBahn v4.17
Travel-Status-DE-DeutscheBahn-4.17.tar.gz (signature)
- Journey: handle empty / undefined nameS fields
Travel::Status::DE::DeutscheBahn v4.14
Travel-Status-DE-DeutscheBahn-4.14.tar.gz (signature)
- Journey: Correctly calculate datetimes when requesting a cross-midnight journey after midnight. Previously, those were off by 24 hours.
Travel::Status::DE::DeutscheBahn v4.15
Travel-Status-DE-DeutscheBahn-4.15.tar.gz (signature)
- HAFAS: Add
similar_stops_p
function
Travel::Status::DE::DeutscheBahn v4.13
Travel-Status-DE-DeutscheBahn-4.13.tar.gz (signature)
new_p
: Return a Travel::Status::DE::HAFAS instance in addition to the error message when rejecting a promise after receiving a HAFAS reply
Travel::Status::DE::DeutscheBahn v4.12
Travel-Status-DE-DeutscheBahn-4.12.tar.gz (signature)
- Fix
Journey->route
and HAFAS geoSearch / locationSearch returning incorrect geocoordinates (latitude and longitude were mixed up)
Travel::Status::DE::DeutscheBahn v4.11
Travel-Status-DE-DeutscheBahn-4.11.tar.gz (signature)
- hafas-m: Add
--json
option
Travel::Status::DE::DeutscheBahn v4.10
Travel-Status-DE-DeutscheBahn-4.10.tar.gz (signature)
HAFAS->new
,->new_p
: Add locationSearch option (search stops by name)Journey->route
,->route_interesting
: Return Travel::Status::DE::HAFAS::Stop instances
Travel::Status::DE::DeutscheBahn v4.09
Travel-Status-DE-DeutscheBahn-4.09.tar.gz (signature)
HAFAS->new
: Add geoSearch option (search stops by coordinates)
Travel::Status::DE::DeutscheBahn v4.08
Travel-Status-DE-DeutscheBahn-4.08.tar.gz (signature)
Journey
: Correctly reportroute_end
/origin
in arrivals modeJourney->route
: Addplatform
,sched_platform
,rt_platform
, andis_changed_platform
accessors
Travel::Status::DE::DeutscheBahn v4.07
Travel-Status-DE-DeutscheBahn-4.07.tar.gz (signature)
- hafas-m: Fix uninitialized value warnings in "--list" output
- Improve support for non-DB HAFAS instances
- Fix day change handling in departure board mode. Previously, journeys arriving / departing after midnight had wrong timestamps in some cases.
Travel::Status::DE::DeutscheBahn v4.06
Travel-Status-DE-DeutscheBahn-4.06.tar.gz (signature)
HAFAS->station
: rename "uic" to "eva"; add "names" and "evas" keys- Rename
Journey->station_uic
toJourney->station_eva
Travel::Status::DE::DeutscheBahn v4.05
Travel-Status-DE-DeutscheBahn-4.05.tar.gz (signature)
- StopFinder: add
new_p
constructor for async requests via promises
Travel::Status::DE::DeutscheBahn v4.04
Travel-Status-DE-DeutscheBahn-4.04.tar.gz (signature)
Journey->is_cancelled
: correctly report cancellations in station board mode
Travel::Status::DE::DeutscheBahn v4.03
Travel-Status-DE-DeutscheBahn-4.03.tar.gz (signature)
- HAFAS: Add "station" accessor
- Journey: Add
station
,station_uic
andline_no
accessors Journey->line
now returns journey type as well as line numberJourney->line_no
provides the oldJourney->line
behaviour- Journey: Add
route_interesting
accessor
Travel::Status::DE::DeutscheBahn v4.02
Travel-Status-DE-DeutscheBahn-4.02.tar.gz (signature)
HAFAS->new
: Add "results" and "lookahead" options- Build.PL: Specify File::Slurp test dependency
Travel::Status::DE::DeutscheBahn v4.01
Travel-Status-DE-DeutscheBahn-4.01.tar.gz (signature)
- Journey: Add "class" accessor
- Message: Correctly document "short" and "text" accessors
("header" and "lead" were not supported), add
is_him
accessor - Specify List::MoreUtils and List::Util dependencies for bin/hafas-m
Travel::Status::DE::DeutscheBahn v4.00
Travel-Status-DE-DeutscheBahn-4.00.tar.gz (signature)
- Use mgate.exe HAFAS interface instead of stboard.exe/bhftafel.exe. This introduces several breaking changes in hafas-m, Travel::Status::DE::HAFAS, and Travel::StatuS::DE::HAFAS::Result.
- hafas-m: Options
-l
/--lang
,-L
/--ignore-late
, and-u
/--url
are no longer supported - hafas-m now supports journey details by specifying a journey ID instead of a station name.
Travel::Status::DE::HAFAS->new
:date
andtime
keys are no longer supported. Usedatetime
instead.Travel::Status::DE::HAFAS->new
:lang
key is no longer supported.Travel::Status::DE::HAFAS->new
:url
key is no longer supported.Travel::Status::DE::HAFAS->new
:mode
key is no longer supported. Setarrivals
to a true value to request arrivals instead of departures.Travel::Status::DE::HAFAS->new
: add optionalcache
key and support forjourney
requests with optionalwith_polyline
key.Travel::Status::DE::HAFAS
: addnew_p
constructor for async requests via Promises.Travel::Status::DE::HAFAS
: Addresult
andmessages
accessors.- Rename Travel::Status::DE::HAFAS::Result to ...::Journey. The accessors
sched_date
,date
,info
,countdown
,countdown_sec
,raw_e_delay
,raw_delay
,sched_time
,time
,train
,train_no
andline_no
are no longer supported. Introduces several new ones instead. - The module no longer depends on XML::LibXML
- New dependency: Digest::MD5
Travel::Status::DE::DeutscheBahn v3.01
Travel-Status-DE-DeutscheBahn-3.01.tar.gz (signature)
- Fix support for ÖBB and other backends which recently switched from two- to four-digit years
Travel::Status::DE::DeutscheBahn v3.00
Travel-Status-DE-DeutscheBahn-3.00.tar.gz (signature)
- Result: The
date
,datetime
, andtime
accessors now report realtime data if available - Result: Add
sched_date
,sched_datetime
, andsched_time
accessors for schedule data
Travel::Status::DE::DeutscheBahn v2.05
Travel-Status-DE-DeutscheBahn-2.05.tar.gz (signature)
- Document LWP::Protocol::https dependency
- Remove BVG (Berliner Verkehrsgesellschaft) and SBB (Schweizerische Bundesbahnen) services
Travel::Status::DE::DeutscheBahn v2.04
Travel-Status-DE-DeutscheBahn-2.04.tar.gz (signature)
- Handle invalid XML when using the VBB backend
Travel::Status::DE::DeutscheBahn v2.03
Travel-Status-DE-DeutscheBahn-2.03.tar.gz (signature)
- Update DB backend API URL
Travel::Status::DE::DeutscheBahn v2.02
Travel-Status-DE-DeutscheBahn-2.02.tar.gz (signature)
- New dependencies:
DateTime
andDateTime::Format::Strptime
- Result: New accessors
->datetime
,->countdown
and->countdown_sec
Travel::Status::DE::DeutscheBahn v2.01
Travel-Status-DE-DeutscheBahn-2.01.tar.gz (signature)
- Result: Fix
->type
accessor (was not working for all backends) - Result: Add
->train_no
/->line_no
accessor
Travel::Status::DE::DeutscheBahn v2.00
Travel-Status-DE-DeutscheBahn-2.00.tar.gz (signature)
- This release is NOT backwards compatible with 1.xx versions
- It now uses the HAFAS API instead of parsing bahn.de/ris and also supports various other HAFAS installations
- New module dependencies:
JSON
,List::MoreUtils
- Renamed
db-ris
tohafas-m
- New modules:
Travel::Status::DE::HAFAS
andTravel::Status::DE::HAFAS::StopFinder
- Renamed T
ravel::Status::DE::DeutscheBahn::Result
toTravel::Status::DE::HAFAS::Result
db-ris
/hafas-m
: The options-f
/--full-route
and-v
/--via
are no longer supporteddb-ris
/hafas-m
: New options-s
/--service
,-u
/--url
and--list
Travel::Status::DE::DeutscheBahn/HAFAS->new
: The mot parameter is no longer supported. Use the newexcluded_mots
andexclusive_mots
parameters insteadTravel::Status::DE::DeutscheBahn/HAFAS->new
: Addservice
andurl
parametersTravel::Status::DE::DeutscheBahn/HAFAS
: Adderrcode
,similar_stops
andget_active_service
accessorsTravel::Status::DE::DeutscheBahn/HAFAS
: Add static methodsget_services
andget_service
Result
: Removeroute
,route_raw
,route_info
,route_interesting
androute_timetable
accessorsResult
: Addis_changed_platform
andmessages
accessorsResult->info
is now undef instead of an empty string when no information is available
Travel::Status::DE::DeutscheBahn v1.05
Travel-Status-DE-DeutscheBahn-1.05.tar.gz (signature)
Result->route_interesting
: Also consider airports- Result: Add
route_info
accessor - Result: Add
is_cancelled
accessor
Travel::Status::DE::DeutscheBahn v1.04
Travel-Status-DE-DeutscheBahn-1.04.tar.gz (signature)
- Result: Add type accessor
DeutscheBahn->new
: Addlwp_options
parameter to pass options toLWP::UserAgent->new
Travel::Status::DE::DeutscheBahn v1.03
Travel-Status-DE-DeutscheBahn-1.03.tar.gz (signature)
- Add primitive JSON serializer to
Travel::Status::DE::DeutscheBahn::Result
- Fix
$result->delay
(was broken by changes in the RIS output format)
Travel::Status::DE::DeutscheBahn v1.02
Travel-Status-DE-DeutscheBahn-1.02.tar.gz (signature)
- Respect proxy environment variables
- Add -a / --arrivals option to show arrivals instead of departures
- Disable smartmatch warnings on perl ≥ 5.018
Travel::Status::DE::DeutscheBahn v1.01
Travel-Status-DE-DeutscheBahn-1.01.tar.gz (signature)
- Detect ambiguous input errors (available via errstr)
- Add language switch for additional information (german/english)
Travel::Status::DE::DeutscheBahn::Result
- Result: Add line (== train) and date accessors
db-ris
- Add -l / --lang option
Travel::Status::DE::DeutscheBahn v1.00
Travel-Status-DE-DeutscheBahn-1.00.tar.gz (signature)
db-ris
- Add --full-route option
Travel::Status::DE::DeutscheBahn
- Fix bug when receiving no platform numbers from the DB RIS
Travel::Status::DE::DeutscheBahn::Result
- Add route_timetable accessor containing station names and their corresponding arrival times
Travel::Status::DE::DeutscheBahn v0.05
Travel-Status-DE-DeutscheBahn-0.05.tar.gz (signature)
- Fix ->results returning duplicate connections when accessed more than one time
- new: Only die when encountering wrong options, set ->errstr otherwise
- Adds new ->errstr accessor to check for request errors
Travel::Status::DE::DeutscheBahn v0.04
Travel-Status-DE-DeutscheBahn-0.04.tar.gz (signature)
Travel::Status::DE::DeutscheBahn::Result
- The info accessor now strips the mostly useless "k.A." / "pünktlich" (train on time) text parts
- Add (slightly experimental) route_interesting accessor
- Add delay accessor
Travel::Status::DE::DeutscheBahn v0.03
Travel-Status-DE-DeutscheBahn-0.03.tar.gz (signature)
- Clarify derl dependency (we actually need >= 5.10.1)
- Strip leading / trailing whitespace in result fields
Travel::Status::DE::DeutscheBahn v0.02
Travel-Status-DE-DeutscheBahn-0.02.tar.gz (sig)
db-ris
- Only display info when a train is late, not when on time / unknown
- Add --ignore-late option
Travel::Status::DE::DeutscheBahn
- Add route_raw accessor
- Proper HTTP request error handling
- Strip leading whitespace from ::Result info
- Do not include canceled stops in the route
Travel-Status-DE-DeutscheBahn v0.01
Travel-Status-DE-DeutscheBahn-0.01.tar.gz (signature)
- Initial release
- Crawls almost all data available in the web interface