chiark / gitweb /
Actually export relevant stuff from CommodsWeb to make it work
[ypp-sc-tools.db-live.git] / yarrg / database-info-fetch
index 2e195c7a01b2d06471b540a3201721a39701aad2..1e789b88fcb389686675f07393e1d0fab7a48ac1 100755 (executable)
@@ -37,7 +37,7 @@ our ($which) = shift @ARGV;
 
 $which =~ s/\W//g;
 
-our ($pctb) = $ENV{'YPPSC_PCTB_PCTB'};
+our ($pctb) = $ENV{'YPPSC_YARRG_PCTB'};
 our ($ua)= LWP::UserAgent->new;
 our $jsonresp;
 
@@ -145,7 +145,7 @@ sub compare_sources_one ($$) {
 sub main__comparesources () {
     my $ocean= get_ocean();
     
-    parse_masters();
+    parse_info_clientside();
     get_arches_islands_pctb($ocean);
     parse_pctb_commodmap() or die;
 
@@ -167,7 +167,7 @@ sub main__comparesources () {
 sub main__island () {
     my $ocean= get_ocean();
     
-    parse_masters();
+    parse_info_clientside();
     get_arches_islands_pctb($ocean);
 
     for_islands($ocean,
@@ -184,6 +184,15 @@ sub main__island () {
                });
 }
 
+sub main__timestamp () {
+    my %o;
+    $o{'requesttimestamp'}= '1';
+    my $respcontent= yarrgpostform($ua, \%o);
+    $respcontent =~ m/^OK ([1-9]\d{1,20})\./ or die "$respcontent ?";
+    print "$1\n";
+    exit(0);
+}
+
 sub main__sunshinewidget () {
     print <<END
 Land {On land} {