/[Search-Estraier]/trunk/scripts/estcp.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/scripts/estcp.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 85 by dpavlin, Tue Jan 17 15:00:50 2006 UTC revision 133 by dpavlin, Mon May 8 21:34:00 2006 UTC
# Line 24  my $from_n = new Search::Estraier::Node( Line 24  my $from_n = new Search::Estraier::Node(
24          url => $from,          url => $from,
25          croak_on_error => 1,          croak_on_error => 1,
26          debug => $debug,          debug => $debug,
27            user => 'admin',
28            passwd => 'admin',
29  );  );
30  my $to_n = new Search::Estraier::Node(  my $to_n = new Search::Estraier::Node(
31          url => $to,          url => $to,
32          croak_on_error => 1,          croak_on_error => 1,
33          debug => $debug,          debug => $debug,
34            user => 'admin',
35            passwd => 'admin',
36  );  );
37    
38  unless(eval{ $to_n->name }) {  unless(eval{ $to_n->name }) {
39          if ($to =~ m#^(http://.+)/node/(\w+)$#) {          if ($to =~ m#^(http://.+)/node/([^/]+)$#) {
40                  my ($url,$name) = ($1,$2);                  my ($url,$name) = ($1,$2);
41                  print "Creating '$name' on $url\n";                  print "Creating '$name' on $url\n";
42                  $to_n->shuttle_url( $url . '/master?action=nodeadd',                  $to_n->shuttle_url( $url . '/master?action=nodeadd',
# Line 76  while($more) { Line 80  while($more) {
80    
81                  $i++;                  $i++;
82          }          }
83          warn "$prev\n";          warn "$prev\n" if ($debug);
84    
85          my $rate = ( $i / (time() - $t) );          my $rate = ( $i / (time() - $t) );
86          printf("%d records, %1.2f%% [%1.2f rec/s] estimated finish: %s\n",          printf("%d records, %1.2f%% [%1.2f rec/s] estimated finish: %s\n",

Legend:
Removed from v.85  
changed lines
  Added in v.133

  ViewVC Help
Powered by ViewVC 1.1.26