- Timestamp:
- 2017-06-22T17:41:38+12:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/UnknownConverterPlugin.pm.bak
r31743 r31744 33 33 no strict 'refs'; # allow filehandles to be variables and viceversa 34 34 35 use ConvertBinaryFile; 36 use UnknownPlugin; 35 37 36 38 # TO DO: … … 38 40 # - Have a TEMPDIR placeholder in the command, which, if present, gets replaced with the usual tempdir location 39 41 # of a collection, and in which case we have to clean up intermediate files generated in there at the end? 42 # Add a check that the generated file or files generated in the output dir match the convert_to option selected 43 # before trying to process them 40 44 41 45 sub BEGIN { … … 49 53 'desc' => "{ConvertBinaryFile.convert_to.html}" }, 50 54 { 'name' => "pagedimg_jpg", 51 'desc' => "{ {ConvertBinaryFile.convert_to.pagedimg_jpg}" },55 'desc' => "{ConvertBinaryFile.convert_to.pagedimg_jpg}" }, 52 56 { 'name' => "pagedimg_gif", 53 'desc' => "{ {ConvertBinaryFile.convert_to.pagedimg_gif}" },57 'desc' => "{ConvertBinaryFile.convert_to.pagedimg_gif}" }, 54 58 { 'name' => "pagedimg_png", 55 'desc' => "{ {ConvertBinaryFile.convert_to.pagedimg_png}" }59 'desc' => "{ConvertBinaryFile.convert_to.pagedimg_png}" } 56 60 ]; 57 61 … … 118 122 push(@$specific_options, "-processing_tmp_files"); 119 123 } 124 elsif ($secondary_plugin_name eq "PagedImagePlugin") { 125 push(@$specific_options, "-screenviewsize", "1000"); 126 push(@$specific_options, "-enable_cache"); 127 push(@$specific_options, "-processing_tmp_files"); 128 } 120 129 121 130 # bless again, copied from PDFPlugin, PowerPointPlugin 122 131 $self = bless $self, $class; 123 $self->load_secondary_plugins($class,$secondary_plugin_options,$hashArgOptLists ;)132 $self->load_secondary_plugins($class,$secondary_plugin_options,$hashArgOptLists); 124 133 return $self; 125 134 } … … 175 184 # replace occurrences of '*' placeholder in cmd string with input filename 176 185 my ($tailname, $dir, $suffix) = &File::Basename::fileparse($input_filename, "\\.[^\\.]+\$"); 177 $cmd ~=s/\*/$tailname/g;186 $cmd =~ s/\*/$tailname/g; 178 187 print STDERR "@@@@ $plugin_name: executing conversion cmd $cmd\n"; 179 188 my $status = system($cmd);
Note:
See TracChangeset
for help on using the changeset viewer.