From 3ece24832da57c70c4ca1c745d6dd79227447322 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 29 Mar 2010 23:20:04 +0100 Subject: [PATCH] chart scraper: cope with ocean difficulty annotations --- yarrg/CommodsScrape.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarrg/CommodsScrape.pm b/yarrg/CommodsScrape.pm index 3e6f1c6..2b1d4a9 100644 --- a/yarrg/CommodsScrape.pm +++ b/yarrg/CommodsScrape.pm @@ -54,7 +54,7 @@ sub yppedia_chart_parse ($$ $$$$ $) { s/\<--.*--\>//g; s/^\s*//; chomp; s/\s+$//; s/\s+/ /g; s/\<\/?(?:b|em)\>//g; - s/\{\{chart\ style\|[^{}]*\}\}//gi; + s/\{\{(?:chart\ style|Chart league difficulty)\|[^{}]*\}\}//gi; next unless m/\{\{/; # only interested in chart template stuff if (($x,$y,$arch) = @@ -76,7 +76,7 @@ sub yppedia_chart_parse ($$ $$$$ $) { $on_island->($n, $island); } elsif (($solid,$x,$y,$dirn) = m/^\{\{ chart\ league((?:\ solid)?) \|(\d+)\|(\d+)\| - ([-\/\\o]) \| .*\}\}$/xi) { + \.?([-\/\\o])\.? \| .*\}\}$/xi) { next if $dirn eq 'o'; printf $debugfh "%2d,%-2d league %-6s %s\n", $x,$y, @@ -86,7 +86,7 @@ sub yppedia_chart_parse ($$ $$$$ $) { if ($dirn eq '-') { $bx+=2; } elsif ($dirn eq '\\') { $bx++; $by++; } elsif ($dirn eq '/') { $x++; $by++; } - else { die; } + else { die "$dirn ?"; } my $na= $nn->(); my $nb= $conv_nxy->($bx,$by); -- 2.30.2