- Timestamp:
- 2009-12-07T13:15:56+13:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/PharosImageIndexer.pm
r21220 r21283 93 93 } 94 94 95 sub removeold { 96 my $self = shift (@_); 97 my ($pluginfo, $base_dir, $processor, $maxdocs) = @_; 98 99 if (!$self->{'pharos_available'}) { 100 print STDERR "pharos not available, not doing a removeold\n"; 101 } 102 # need to delete everything from the derby database. 103 my $collection = &util::get_current_collection_name(); 104 my $cmd = "perl -S pharos-imageis-delete.pl $collection *.jpg 2>&1"; 105 print STDERR "Running command $cmd\n"; 106 my $result = `$cmd`; 107 my $return_value = $?; 108 my $outhandle = $self->{'outhandle'}; 109 if ($return_value != 0) { 110 print $outhandle "Pharos Indexing failed to clear database for collection $collection\n"; 111 } 112 print $outhandle "$result\n"; 113 114 } 115 95 116 sub pharos_index_image { 96 117 my $self = shift(@_); … … 104 125 my $id = $doc_obj->get_OID(); 105 126 106 #my $result = `pharos-imageis-add.pl $collection $filename_full_path $id 2>&1`; 107 my $result = `imageis-add-jpg-file.sh $collection $filename_full_path 2>&1`; 127 my $cmd = "perl -S pharos-imageis-add.pl $collection $filename_full_path $id 2>&1"; 128 print STDERR "Running command $cmd\n"; 129 my $result = `$cmd`; 130 108 131 my $return_value = $?; 132 my $outhandle = $self->{'outhandle'}; 109 133 if ($return_value != 0) { 110 my $outhandle = $self->{'outhandle'};111 134 print $outhandle "Pharos Indexing failed for $filename_full_path, $id\n"; 112 print $outhandle "$result\n";113 135 } 136 print $outhandle "$result\n"; 137 114 138 } 115 139
Note:
See TracChangeset
for help on using the changeset viewer.