X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=pctb%2Fcommod-results-processor;fp=pctb%2Fcommod-results-processor;h=4a70ddf7767376ab8b9db5406750c257460e9c3c;hb=124bfe502b5841d6d05f3f7e9fc825f918d3109d;hp=e391e4749780c1a04e50abfc4f146a4317a3b771;hpb=a08a94640f4f0c02c536f337630dd234e917121f;p=ypp-sc-tools.db-live.git diff --git a/pctb/commod-results-processor b/pctb/commod-results-processor index e391e47..4a70ddf 100755 --- a/pctb/commod-results-processor +++ b/pctb/commod-results-processor @@ -224,7 +224,7 @@ our ($ua)= LWP::UserAgent->new; sub load_commodmap() { undef %commodmap; - my $c= new IO::File "#commodmap#.tsv"; + my $c= new IO::File "_commodmap.tsv"; if (!$c) { $!==&ENOENT or die $!; return; } while (<$c>) { m/^(\S.*\S)\t(\d+)\n$/ or die "$_"; @@ -244,7 +244,7 @@ sub refresh_commodmap() { my $incommodmap=0; my $intag=''; my %got; - my $o= new IO::File "#commodmap#.tsv.tmp",'w' or die $!; + my $o= new IO::File "_commodmap.tsv.tmp",'w' or die $!; undef %commodmap; my $xp= new XML::Parser @@ -292,7 +292,7 @@ sub refresh_commodmap() { # print STDERR "[[[$content]]]\n"; $xp->parse($content); close $o or die $!; - rename "#commodmap#.tsv.tmp","#commodmap#.tsv" or die $!; + rename "_commodmap.tsv.tmp","_commodmap.tsv" or die $!; } our %newcommods; @@ -317,7 +317,7 @@ sub refresh_newcommods() { my $rsync= $ENV{'YPPSC_PCTB_RSYNC'}; $rsync= 'rsync' if !defined $rsync; - my $local= "#master-newcommods#.txt"; + my $local= "_master-newcommods.txt"; my $src= $ENV{'YPPSC_PCTB_DICT_UPDATE'}; if ($src) { my $remote= "$src/master-newcommods.txt"; @@ -325,7 +325,7 @@ sub refresh_newcommods() { die "$? $!" if $! or $?; } read_newcommods($local); - read_newcommods('#local-newcommods#.txt'); + read_newcommods('_local-newcommods.txt'); } our (%stallmap, @stallmap); @@ -430,7 +430,7 @@ sub main__genmarketdata () { sub save_upload_html ($$) { my ($which, $resptxt) = @_; - open R, ">./#upload-$which#.html" or die $!; + open R, ">./_upload-$which.html" or die $!; print R $resptxt or die $!; close R or die $!; } @@ -458,7 +458,7 @@ sub main__upload () { my $resptxt= $resp->content(); save_upload_html('1', $resptxt); - open R, ">./#upload-1#.html" or die $!; + open R, ">./_upload-1.html" or die $!; print R $resptxt or die $!; close R or die $!; @@ -514,7 +514,7 @@ sub main__upload () { save_upload_html('3', $resptxt); print "\n" or die $!; - system('w3m -T text/html -dump < \#upload-3#.html'); + system('w3m -T text/html -dump < _upload-3.html'); print "\n" or die $!; }