summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-08-31 21:14:05 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-08-31 21:14:05 +0200
commit554e3c76281502590bc94ede50553f75db2f9c47 (patch)
tree6639da251e6d61d07139c80fb621d1a1f3d2ae1d /bin
parent3d31ca398e83d86189fadb25b3934d016a16034e (diff)
efa: parse_content: Correctly parse Fußweg messages with time
Diffstat (limited to 'bin')
-rwxr-xr-xbin/efa11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/efa b/bin/efa
index aa99fc9..9ececb7 100755
--- a/bin/efa
+++ b/bin/efa
@@ -65,10 +65,13 @@ sub parse_content {
for (my $i = 0; @{$raw->[$offer]} >= (($i+1) * $groupsize) - 1; $i++) {
my $offset = $i * $groupsize;
my @extra;
- if ($raw->[$offer]->[$offset+2] =~ /^(Fußweg | Anschluss \s wird .* abgewartet)/x) {
- # These are generic and lack both the time and the last element
- splice(@{$raw->[$offer]}, $offset, 0, '');
- splice(@{$raw->[$offer]}, $offset+4, 0, '');
+ if (
+ $raw->[$offer]->[$offset+2] =~ /^(Fußweg | Anschluss \s wird .* abgewartet)/x
+ or $raw->[$offer]->[$offset+3] =~ /^Fußweg/
+ ) {
+ # These are generic and usually lack both the time and the last element
+ if ($raw->[$offer]->[$offset ] !~ /\d+:\d+/) {splice(@{$raw->[$offer]}, $offset , 0, '')}
+ if ($raw->[$offer]->[$offset+4] !~ /\d+:\d+/) {splice(@{$raw->[$offer]}, $offset+4, 0, '')}
splice(@{$raw->[$offer]}, $offset+7, 0, '');
}
for my $j (0, 4, 8) {