chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.main.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cope with multi-word arches
[ypp-sc-tools.main.git]
/
yarrg
/
yppedia-chart-parser
diff --git
a/yarrg/yppedia-chart-parser
b/yarrg/yppedia-chart-parser
index 4ce6bcecd36195da8061b9ff2cf93d0e7f983f3d..dacf5c354725fd017a8f930c4991693463329f6c 100755
(executable)
--- a/
yarrg/yppedia-chart-parser
+++ b/
yarrg/yppedia-chart-parser
@@
-55,7
+55,11
@@
my @msgkinds= qw(change warning error);
my %msgs;
my %msgprinted;
my %msgkindprinted;
my %msgs;
my %msgprinted;
my %msgkindprinted;
-sub pmsg ($$) { push @{ $msgs{$_[0]} }, "$_[0]: $_[1]\n"; }
+sub pmsg ($$) {
+ my $m= "$_[0]: $_[1]\n";
+ print DEBUG "D $m";
+ push @{ $msgs{$_[0]} }, $m;
+}
sub warning ($) { pmsg("warning",$_[0]); }
sub error ($) { pmsg("error", $_[0]); }
sub change ($) { pmsg("change", $_[0]); }
sub warning ($) { pmsg("warning",$_[0]); }
sub error ($) { pmsg("error", $_[0]); }
sub change ($) { pmsg("change", $_[0]); }
@@
-122,9
+126,13
@@
sub yppedia_chart_parse () {
if (($x,$y,$arch) =
m/^\{\{ chart\ label \|(\d+)\|(\d+)\| .*
if (($x,$y,$arch) =
m/^\{\{ chart\ label \|(\d+)\|(\d+)\| .*
- \'\[\[ [^][\']* \| (\S+)\ archipelago \]\]\'*\}\}$/xi) {
+ (?: \<big\>)? \'+
+ \[\[ [^][\']* \| ([^][\'|]+)\ archipelago \]\]
+ \'+ (?: \<\/big\>)? \}\}$/xi) {
printf DEBUG "%2d,%-2d arch %s\n", $x,$y,$arch;
push @wiarchlabels, [ $x,$y,$arch ];
printf DEBUG "%2d,%-2d arch %s\n", $x,$y,$arch;
push @wiarchlabels, [ $x,$y,$arch ];
+ } elsif (m/^\{\{ chart\ label \|\d+\|\d+\|
+ \<big\> \'+ \[\[ .* \b ocean \]\]/xi) {
} elsif (($x,$y,$island) =
m/^\{\{ chart\ island\ icon \|(\d+)\|(\d+)\|
([^| ][^|]*[^| ]) \| .*\}\}$/xi) {
} elsif (($x,$y,$island) =
m/^\{\{ chart\ island\ icon \|(\d+)\|(\d+)\|
([^| ][^|]*[^| ]) \| .*\}\}$/xi) {