chiark / gitweb /
actually uploads
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Fri, 3 Jul 2009 20:09:09 +0000 (21:09 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Fri, 3 Jul 2009 20:09:09 +0000 (21:09 +0100)
pctb/commod-results-processor

index e3f45d177b190c00ee7451fdf73f66cd99bb8bca..cea64e5190318e437c5ad55ff6368cfe0f8a68ed 100755 (executable)
@@ -491,29 +491,32 @@ sub main__upload () {
     die "@forcerls ?" if grep { $_ ne $forcerl } @forcerls;
 
     my $setisland= {
-       'action' => 'setisland',
-       'filename' => $filename,
-       'forcereload' => $forcerl,
-       'ocean' => $oceanids[0],
-       'island' => $islandid,
     };
 
     print STDERR "Setting ocean and island...\n";
 
-    $resp= $ua->post("${url}IWJTEST", $setisland);
+    my $siurl= ($url . "?action=setisland".
+               "&filename=$filename".
+               "&forcereload=$forcerl".
+               "&ocean=$oceanids[0]".
+               "&island=$islandid");
+    $resp= $ua->get($siurl);
+
     die $resp->status_line unless $resp->is_success;
 
     $resptxt= $resp->content();
     save_upload_html('2', $resptxt);
 
-    
-    
-#
-#http://pctb.ilk.org/upload.php?&ocean=2&island=48&action=setisland&forcereload=1244748679&filename=PFayDW' >v.html 
-#    
-#    print ">$filename|$forcerl|@oceanids|$islandid<\n";
+    die unless $resptxt =~ m/your uploaded data has been processed/i;
+    die unless $resptxt =~ m/your data has been integrated into the database/i;
+
+    $resptxt =~ s/\<a href=\"about:\w+\"\>[^<>]+\<\/a\>//g;
+    save_upload_html('3', $resptxt);
 
-    system 'printenv|grep YPP|sort';
+    print "\n" or die $!;
+    system('w3m -T text/html -dump < \#upload-3#.html');
+    
+    print "\n" or die $!;
 }