X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.web-live.git;a=blobdiff_plain;f=pctb%2Fdatabase-info-fetch;h=2e195c7a01b2d06471b540a3201721a39701aad2;hp=f60c006a6fefef150f9f929a5d23ebbf09c53721;hb=3c3e5dc8eae9b239f2dab871a3bd47222af09538;hpb=38e3d1bf1be975c8edd6a166106ab2729d15249c diff --git a/pctb/database-info-fetch b/pctb/database-info-fetch index f60c006..2e195c7 100755 --- a/pctb/database-info-fetch +++ b/pctb/database-info-fetch @@ -131,16 +131,6 @@ sub for_islands ($$$$) { } } -sub get_commodmap_pctb_local () { - my $f= new IO::File '_commodmap.tsv' or die $!; - while (<$f>) { - m/^(\w[^\t]+\w)\t\d+$/ or die; - $commods{$1} .= 'b'; - } - $f->error and die $!; - close $f or die $!; -} - sub for_commods ($) { my ($forcommod) = @_; foreach my $commod (sort keys %commods) { &$forcommod($commod); } @@ -157,7 +147,7 @@ sub main__comparesources () { parse_masters(); get_arches_islands_pctb($ocean); - get_commodmap_pctb_local(); + parse_pctb_commodmap() or die; for_islands($ocean, sub { }, @@ -194,28 +184,6 @@ sub main__island () { }); } -sub main__allowablecommods ($$) { - my ($ocean,$island) = @_; - parse_masters(); - my $arches= $oceans{$ocean}; - if (!$arches) { print "unknown ocean\n"; exit 1; } - my $found= 0; - foreach my $islands (values %$arches) { - my $sources= $islands->{$island}; - next unless $sources; - die if $found; - $found= $sources; - } - if (!$found) { print "unknown island\n"; exit 1; } - - print "\n"; - foreach my $commod (sort keys %commods) { - print "$commod\n"; - } - STDOUT->error and die $!; - close STDOUT or die $!; -} - sub main__sunshinewidget () { print <