diff options
| author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-12-24 13:40:01 +0100 | 
|---|---|---|
| committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-12-24 13:40:36 +0100 | 
| commit | 7b80fa622f9499cf4988fee23b3c65c63f489c20 (patch) | |
| tree | 4fa311926dbb7fe84e09c4c56b814a3c89e4abc1 /bin | |
| parent | e6f66424fac95f997cda6bafa591f1d46c2bf52d (diff) | |
efa-m: add --raw-json
Diffstat (limited to 'bin')
| -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  | 
