Changeset 2599
- Timestamp:
- 2001-06-20T14:32:24+12:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/pdftohtml.pl
r2575 r2599 135 135 } 136 136 137 # post-process to remove </b><b> and </i><i>, as these break up 138 # words, screwing up indexing and searching. 139 &util::mv("$output_filestem.html","$output_filestem.html.tmp"); 140 open INFILE, "$output_filestem.html.tmp" || 141 die "Couldn't open file: $!"; 142 open OUTFILE, ">$output_filestem.html" || 143 die "Couldn't open file for writing: $!"; 144 my $line; 145 while ($line=<INFILE>) { 146 $line =~ s#</b><b>##g; 147 $line =~ s#</i><i>##g; 148 print OUTFILE $line; 149 } 150 close INFILE; 151 close OUTFILE; 152 &util::rm("$output_filestem.html.tmp"); 153 154 137 155 # Need to convert images from PPM format to PNG format 138 156 my @images; … … 154 172 if (system($cmd)!=0) { 155 173 print STDERR "Error executing $cmd\n"; 156 return 0; # not sure about whether to leave this one in or take it out 174 #return 0; # not sure about whether to leave this one in or take it out 175 next; 157 176 } 158 177 } else { … … 165 184 if (system($cmd)!=0) { 166 185 print STDERR "Cannot convert $image into PNG format (tried `pnmtopng' and `convert')...\n"; 167 return 0; # not sure about whether to leave this one in or take it out 186 #return 0; # not sure about whether to leave this one in or take it out 187 next; 168 188 } 169 189 } … … 175 195 } 176 196 177 &main(@ARGV); 197 # indicate our error status 198 if (&main(@ARGV)) {exit 0;} 199 exit 1;
Note:
See TracChangeset
for help on using the changeset viewer.