X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=blobdiff_plain;f=yarrg%2Fyppedia-chart-parser;h=e6e22b5799374754bcfdd060d381110afaf95a5b;hp=a093a0cec965dba77827a3641af83f9563295ec5;hb=5f3c445b5b9eda482c8098c115a9b5282e55f001;hpb=9f77f36acb520531a53fe18db16fae9292f4d09a diff --git a/yarrg/yppedia-chart-parser b/yarrg/yppedia-chart-parser index a093a0c..e6e22b5 100755 --- a/yarrg/yppedia-chart-parser +++ b/yarrg/yppedia-chart-parser @@ -118,7 +118,7 @@ sub yppedia_chart_parse () { s/\<--.*--\>//g; s/^\s*//; chomp; s/\s+$//; s/\s+/ /g; s/\<\/?(?:b|em)\>//g; - s/\{\{Chart\ style\|[^{}]*\}\}//g; + s/\{\{chart\ style\|[^{}]*\}\}//gi; next unless m/\{\{/; # only interested in chart template stuff my ($x,$y, $arch,$island,$solid,$dirn); @@ -126,9 +126,11 @@ sub yppedia_chart_parse () { if (($x,$y,$arch) = m/^\{\{ chart\ label \|(\d+)\|(\d+)\| .* - (?: \)? \'+ - \[\[ [^][\']* \| ([^][\'|]+)\ archipelago \]\] - \'+ (?: \<\/big\>)? \}\}$/xi) { + (?: \<(?: big|center )\>)* \'+ + (?: \[\[ | \{\{ ) + [^][\']* \| ([^][\'|]+)\ archipelago + (?: \]\] | \}\} ) + \'+ (?: \<\/(?: big|center )\>)* \}\}$/xi) { printf DEBUG "%2d,%-2d arch %s\n", $x,$y,$arch; push @wiarchlabels, [ $x,$y,$arch ]; } elsif (m/^\{\{ chart\ label \|\d+\|\d+\| @@ -770,6 +772,7 @@ for (;;) { print STDERR "*** --stdin-chart, aborting!\n"; exit 1; } + progress("checking database"); db_check_referential_integrity(); progress("committing database"); $dbh->commit(); progress("committing _ocean-*.txt"); localtopo_commit(); exit 0;