/[Search-Estraier]/trunk/scripts/est-spider
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/est-spider

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

revision 119 by dpavlin, Mon Apr 17 10:31:11 2006 UTC revision 178 by dpavlin, Tue Aug 15 16:38:06 2006 UTC
# Line 89  find({ wanted => \&file, Line 89  find({ wanted => \&file,
89  my $dur = (time() - $start_t) || 1;  my $dur = (time() - $start_t) || 1;
90  printf STDERR "%d documents in %.2fs [%.2f docs/s]\n", $docs, $dur, ($docs / $dur);  printf STDERR "%d documents in %.2fs [%.2f docs/s]\n", $docs, $dur, ($docs / $dur);
91    
92    $db->master(
93            action => 'sync'
94    );
95    
96    
97  exit;  exit;
98    
99  sub dump_contents {  sub dump_contents {
# Line 136  sub dump_contents { Line 141  sub dump_contents {
141          # boost title          # boost title
142          $doc->add_hidden_text($title);          $doc->add_hidden_text($title);
143    
144          print $doc->dump_draft if ($verbose);          print $doc->dump_draft if ($debug);
145    
146          # register the document object to the database          # register the document object to the database
147          $db->put_doc($doc);          $db->put_doc($doc);
# Line 195  sub file { Line 200  sub file {
200          my $contents;          my $contents;
201    
202          return if (! $force && -l $path || $path =~ m#/.svn# || $path =~ m/(~|.bak|.gif)$/);          return if (! $force && -l $path || $path =~ m#/.svn# || $path =~ m/(~|.bak|.gif)$/);
203            return if (! $all && -d $path);
204    
205          my $mtime = (stat($path))[9] || -1;          my $mtime = (stat($path))[9] || -1;
206          my $mtime_db = eval { $db->get_doc_attr_by_uri("file:///$path", '@mtime') };          my $mtime_db = eval { $db->get_doc_attr_by_uri("file:///$path", '@mtime') };

Legend:
Removed from v.119  
changed lines
  Added in v.178

  ViewVC Help
Powered by ViewVC 1.1.26