Changeset 27757
- Timestamp:
- 2013-07-04T17:09:30+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/pdftohtml.pl
r24600 r27757 39 39 use parsargv; 40 40 use util; 41 use FileUtils; 41 42 use Cwd; 42 43 use File::Basename; … … 108 109 109 110 # formulate the command 110 my $cmd = & util::filename_cat($ENV{'GSDLHOME'}, "bin", $ENV{'GSDLOS'}, "pdftohtml");111 my $cmd = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'}, "bin", $ENV{'GSDLOS'}, "pdftohtml"); 111 112 112 113 # don't include path on windows (to avoid having to play about … … 127 128 print STDERR "pdftohtml error for $input_filename $!\n"; 128 129 # leave these for gsConvert.pl... 129 #& util::rm("$output_filestem.text") if (-e "$output_filestem.text");130 #& util::rm("$output_filestem.err") if (-e "$output_filestem.err");130 #&FileUtils::removeFiles("$output_filestem.text") if (-e "$output_filestem.text"); 131 #&FileUtils::removeFiles("$output_filestem.err") if (-e "$output_filestem.err"); 131 132 return 1; 132 133 } … … 139 140 # words, screwing up indexing and searching. 140 141 # At the same time, check that our .html file has some textual content. 141 & util::mv("$output_filestem.html","$output_filestem.html.tmp");142 &FileUtils::moveFiles("$output_filestem.html","$output_filestem.html.tmp"); 142 143 $!=0; 143 144 open INFILE, "$output_filestem.html.tmp" || … … 203 204 close INFILE; 204 205 close OUTFILE; 205 & util::rm("$output_filestem.html.tmp");206 &FileUtils::removeFiles("$output_filestem.html.tmp"); 206 207 207 208 # Need to convert images from PPM format to PNG format … … 217 218 } 218 219 close IMAGES; 219 & util::rm("${directory}image.log") if (-e "${directory}image.log");220 &FileUtils::removeFiles("${directory}image.log") if (-e "${directory}image.log"); 220 221 221 222 } … … 227 228 for $image (@images) { 228 229 chomp($image); 229 & util::rm("${directory}$image");230 &FileUtils::removeFiles("${directory}$image"); 230 231 } 231 232 return 1; … … 257 258 } 258 259 } 259 & util::rm($image);260 &FileUtils::removeFiles($image); 260 261 } 261 262
Note:
See TracChangeset
for help on using the changeset viewer.