diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-11-19 21:50:23 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-11-19 21:50:23 +0100 |
commit | 48f6dcd45adec36b6e48c1913e03eb6ed8f9e133 (patch) | |
tree | d44348a951502ad1b983740c4e95fca48ca47a6e /share/json2json | |
parent | 33ce867b1bd4abb8fc9dde049507937182b9c6e3 (diff) |
Rename UIC to EVA. EVA IDs are often (but not always!) UIC IDs
Diffstat (limited to 'share/json2json')
-rwxr-xr-x | share/json2json | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/share/json2json b/share/json2json index 189ee2c..ca67fe6 100755 --- a/share/json2json +++ b/share/json2json @@ -14,7 +14,7 @@ my $stations = JSON->new->utf8->decode($json_str); my $have_duplicates = 0; my @names = map { $_->{name} } @{$stations}; my @ds100 = map { $_->{ds100} } sort { $a->{ds100} cmp $b->{ds100} } @{$stations}; -my @uic_ids = map { $_->{uic} } sort { $a->{uic} <=> $b->{uic} } @{$stations}; +my @eva_ids = map { $_->{eva} } sort { $a->{eva} <=> $b->{eva} } @{$stations}; for my $i ( 1 .. $#names ) { if ( $names[ $i - 1 ] eq $names[$i] ) { @@ -28,9 +28,9 @@ for my $i ( 1 .. $#ds100 ) { $have_duplicates = 1; } } -for my $i ( 1 .. $#uic_ids ) { - if ( $uic_ids[ $i - 1 ] == $uic_ids[$i] ) { - say "Duplicate UIC ID: $uic_ids[$i]"; +for my $i ( 1 .. $#eva_ids ) { + if ( $eva_ids[ $i - 1 ] == $eva_ids[$i] ) { + say "Duplicate EVA ID: $eva_ids[$i]"; $have_duplicates = 1; } } |