diff options
-rwxr-xr-x | bin/efa-m | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -19,7 +19,7 @@ my $efa_url; my $efa_encoding; my $use_cache = 1; my $cache; -my $json_output; +my ( $json_output, $raw_json_output ); my ( $date, $time, $input_type, $list_lines, $offset, $relative_times ); my ( $full_routes, $filter_via, $show_jid ); my ( $timeout, $developer_mode ); @@ -60,6 +60,7 @@ GetOptions( 'V|track-via=s' => \$filter_via, 'cache!' => \$use_cache, 'json' => \$json_output, + 'raw-json' => \$raw_json_output, 'devmode' => \$developer_mode, 'version' => \&show_version, @@ -575,6 +576,9 @@ if ($json_output) { say JSON->new->convert_blessed->encode( [ $efa->results ] ); } } +elsif ($raw_json_output) { + say JSON->new->convert_blessed->encode( $efa->{response} ); +} elsif ($coord) { show_coord(); } @@ -778,6 +782,11 @@ availability, delay reasons, and more. Only show departures at I<platforms> (comma-separated list, option may be repeated). Note that the C<< Bstg. >> / C<< Gleis >> prefix must be omitted. +=item B<--raw-json> + +Print unprocessed EFA response as JSON and exit. +Useful for debugging and development purposes. + =item B<-r>, B<--relative> (monitor) Show relative departure times in minutes (i.e. the time difference between |