Changeset 22705
- Timestamp:
- 2010-08-21T23:30:28+12:00 (14 years ago)
- Location:
- main/trunk/greenstone2/perllib/plugins
- Files:
-
- 2 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/AutoloadConverterScripting.pm
r22702 r22705 73 73 74 74 #### 75 # This plugin takes an extra initial parameter in its constructor (compared with76 # the norm). The extra parameter specifies which plugin it should try to77 # dynamically load75 # This plugin takes an extra initial parameter in its constructor (compared 76 # with the norm). The extra parameter specifies which plugin it should 77 # try to dynamically load 78 78 ##### 79 79 … … 87 87 my $autoVar = $dynamic_self->{'_autoVar'}; 88 88 89 # print STDERR "**** autoload NEW autoVar = $dynamic_self->{'_autoVar'}\n"; 90 # print STDERR "**** working ", $dynamic_self->{'scripting_ext_working} , "\n";89 if ($dynamic_self->{'scripting_ext_installed'}) { 90 my ($cpackage,$cfilename,$cline,$csubr,$chas_args,$cwantarray) = caller(0); 91 91 92 if ($dynamic_self->{'scripting_ext_installed'}) { 93 print STDERR "$class: $autoName Extension to Greenstone detected\n"; 92 print STDERR "$class: $autoName Extension to Greenstone detected for $cpackage\n"; 94 93 if ($dynamic_self->{'scripting_ext_working'}) { 95 94 # print STDERR "... and it appears to be working\n"; -
main/trunk/greenstone2/perllib/plugins/BasePlugin.pm
r22663 r22705 655 655 my ($filemeta) = @_; 656 656 657 # analyse filenames without extensions and digits (and trimmed of surrounding 658 # whitespace), so that irrelevant chars don't confuse textcat 657 # analyse filenames without extensions and digits (and trimmed of 658 # surrounding whitespace), so that irrelevant chars don't confuse 659 # textcat 659 660 my $strictfilemeta = $filemeta; 660 661 $strictfilemeta =~ s/\.[^\.]+$//g; … … 1031 1032 my $file_derived_title = $file; 1032 1033 $file_derived_title =~ s/_/ /g; 1033 $file_derived_title =~ s/\. .*?$//;1034 $file_derived_title =~ s/\.[^.]$//; 1034 1035 1035 1036 return $file_derived_title; … … 1042 1043 my ($doc_obj,$section,$file) = @_; 1043 1044 1044 if (!defined $doc_obj->get_metadata_element ($section, "Title") or $doc_obj->get_metadata_element($section, "Title") eq "") { 1045 if (!defined $doc_obj->get_metadata_element ($section, "Title") 1046 or $doc_obj->get_metadata_element($section, "Title") eq "") { 1045 1047 1046 1048 my $file_derived_title = $self->filename_to_utf8_metadata($self->filename_based_title($file)); -
main/trunk/greenstone2/perllib/plugins/ExcelPlugin.pm
r22639 r22705 28 28 package ExcelPlugin; 29 29 30 use OOConvertBinaryFile;31 30 use strict; 32 31 no strict 'refs'; # allow filehandles to be variables and viceversa … … 34 33 use gsprintf 'gsprintf'; 35 34 36 sub BEGIN { 37 @ExcelPlugin::ISA = ('OOConvertBinaryFile'); 38 } 35 use AutoloadConverterScripting; 36 37 @ExcelPlugin::ISA = ('AutoloadConverterScripting'); 38 39 39 40 40 my $arguments = … … 61 61 push(@{$hashArgOptLists->{"OptList"}},$options); 62 62 63 my $self = new OOConvertBinaryFile($pluginlist, $inputargs, $hashArgOptLists);63 my $self = new AutoloadConverterScripting("OpenOfficeConverter",$pluginlist, $inputargs, $hashArgOptLists); 64 64 65 65 if ($self->{'info_only'}) { -
main/trunk/greenstone2/perllib/plugins/PDFPlugin.pm
r22702 r22705 25 25 package PDFPlugin; 26 26 27 use strict; 28 no strict 'refs'; # so we can use a var for filehandles (e.g. STDERR) 29 27 30 use ReadTextFile; 28 31 use unicode; 29 use strict; 30 no strict 'refs'; # so we can use a var for filehandles (e.g. STDERR) 31 32 sub BEGIN { 33 $::autoloadConverterScripting="PDFBoxConverter"; 34 require AutoloadConverterScripting; 35 36 @PDFPlugin::ISA = ('AutoloadConverterScripting', 'ReadTextFile'); 37 } 32 33 use AutoloadConverterScripting; 34 35 @PDFPlugin::ISA = ('AutoloadConverterScripting', 'ReadTextFile'); 36 38 37 39 38 my $convert_to_list = -
main/trunk/greenstone2/perllib/plugins/PowerPointPlugin.pm
r22640 r22705 28 28 package PowerPointPlugin; 29 29 30 use OOConvertBinaryFile;31 32 30 use strict; 33 31 no strict 'refs'; # allow filehandles to be variables and viceversa 34 32 no strict 'subs'; 33 35 34 use gsprintf 'gsprintf'; 36 35 37 sub BEGIN { 38 @PowerPointPlugin::ISA = ('OOConvertBinaryFile'); 39 } 36 use AutoloadConverterScripting; 37 38 @PowerPointPlugin::ISA = ('AutoloadConverterScripting'); 39 40 40 41 41 my $windows_convert_to_list = … … 95 95 96 96 97 my $self = new OOConvertBinaryFile($pluginlist, $inputargs, $hashArgOptLists); 97 my $self 98 = new AutoloadConverterScripting("OpenOfficeConverter", 99 $pluginlist, $inputargs, 100 $hashArgOptLists); 98 101 99 102 if ($self->{'info_only'}) { -
main/trunk/greenstone2/perllib/plugins/WordPlugin.pm
r22702 r22705 31 31 use gsprintf 'gsprintf'; 32 32 33 sub BEGIN { 34 $::autoloadConverterScripting="OpenOfficeConverter"; 35 require AutoloadConverterScripting; 36 37 @WordPlugin::ISA = ('AutoloadConverterScripting'); 38 } 33 use AutoloadConverterScripting; 34 35 @WordPlugin::ISA = ('AutoloadConverterScripting'); 36 39 37 40 38 my $arguments =
Note:
See TracChangeset
for help on using the changeset viewer.