projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add standard gcommit command
[spider.git]
/
perl
/
convkeps.pl
diff --git
a/perl/convkeps.pl
b/perl/convkeps.pl
index b591ca6b446fc9f2bc8428d128254f85ef48a5ec..9fda8e820dcaa6f0b36a2f64f606594ec6610af8 100755
(executable)
--- a/
perl/convkeps.pl
+++ b/
perl/convkeps.pl
@@
-61,6
+61,14
@@
my $ref;
my $line;
my $count = 0;
my $line;
my $count = 0;
+my %lookup = (
+ 'AO-5' => 'AO-05',
+ 'AO-6' => 'AO-06',
+ 'AO-7' => 'AO-07',
+ 'AO-8' => 'AO-08',
+
+);
+
my $f = \*STDIN;
while (@ARGV) {
my $f = \*STDIN;
while (@ARGV) {
@@
-94,10
+102,13
@@
while (<$f>) {
$state = 1;
} elsif ($state == 1) {
last if m{^-};
$state = 1;
} elsif ($state == 1) {
last if m{^-};
+ next if m{^To\s+all}i;
- if (/^[- \w]+$/) {
- s/\s/-/g;
- $name = uc $_;
+ if (/^([- \w]+)(?:\s+\[[-+\w]\])?$/) {
+ my $n = uc $1;
+ $n =~ s/\s/-/g;
+ $name = $lookup{$n};
+ $name ||= $n;
$ref = $keps{$name} = {};
$state = 2;
}
$ref = $keps{$name} = {};
$state = 2;
}
@@
-116,7
+127,7
@@
while (<$f>) {
$state = 3;
} else {
$state = 3;
} else {
-
#
print "out of order on line $line\n";
+
#
print "out of order on line $line\n";
undef $ref;
delete $keps{$name};
$state = 1;
undef $ref;
delete $keps{$name};
$state = 1;
@@
-133,7
+144,7
@@
while (<$f>) {
$ref->{orbit} = $orbit - 0;
$count++;
} else {
$ref->{orbit} = $orbit - 0;
$count++;
} else {
-
#
print "out of order on line $line\n";
+
#
print "out of order on line $line\n";
delete $keps{$name};
}
undef $ref;
delete $keps{$name};
}
undef $ref;