summaryrefslogtreecommitdiff
path: root/bin/efa-m
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-09-22 19:34:48 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-09-22 19:34:48 +0200
commit8aa394bf04ebc6cd29d1c0cceafa76c7e43e794f (patch)
tree3b936f3dc623c0fc61ec2644f4565f0b8a1ae6b5 /bin/efa-m
parentc8d2e1297dcd160dae4451e53889d920e8fb9804 (diff)
oh look! stopseq support!
(parser is still missing)
Diffstat (limited to 'bin/efa-m')
-rwxr-xr-xbin/efa-m22
1 files changed, 17 insertions, 5 deletions
diff --git a/bin/efa-m b/bin/efa-m
index de8c610..65dc366 100755
--- a/bin/efa-m
+++ b/bin/efa-m
@@ -65,16 +65,26 @@ if ( @ARGV < 1 or @ARGV > 2 ) {
@grep_mots = split( qr{,}, join( q{,}, @grep_mots ) );
@grep_platforms = split( qr{,}, join( q{,}, @grep_platforms ) );
-my ( $place, $input );
+my ( $place, $input, $stopseq );
if ( @ARGV == 1 ) {
- $input = $ARGV[0];
+ if ( $ARGV[0] =~ m{ ^ ! ([^@]*) @ ([^@]*) [(] ([^)]*) [)] (.*) $ }x ) {
+ $stopseq = {
+ stateless => $1,
+ stop_id => $2,
+ date => $3,
+ key => $4
+ };
+ }
+ else {
+ $input = $ARGV[0];
+ }
}
else {
( $place, $input ) = @ARGV;
}
-if ( $input =~ s{ ^ (?<type> address|poi|stop|stopID) : }{}x ) {
+if ( $input and $input =~ s{ ^ (?<type> address|poi|stop|stopID) : }{}x ) {
$input_type = $+{type};
}
@@ -118,6 +128,7 @@ sub new_efa {
full_routes => $full_routes,
place => $place,
name => $input,
+ stopseq => $stopseq,
time => $time,
type => $input_type,
timeout => $timeout,
@@ -354,8 +365,9 @@ sub show_results {
@output_line = ( $dtime, $platform, $line, q{}, $d->destination, $d );
if ($show_jid) {
- $output_line[2]
- .= sprintf( ' %s@%d@%d', $d->stateless, $d->stop_id, $d->key );
+ $output_line[2] .= sprintf( ' %s@%d(%s)%d',
+ $d->stateless, $d->stop_id,
+ $d->sched_datetime->strftime('%Y%m%d'), $d->key );
}
if ( $edata{route} ) {