Changeset 15872 for gsdl/trunk/perllib/plugins/ExcelPlugin.pm
- Timestamp:
- 2008-06-05T09:29:32+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/ExcelPlugin.pm
r15865 r15872 1 1 ########################################################################### 2 2 # 3 # ExcelPlug .pm -- plugin for importing Microsoft Excel files.3 # ExcelPlugin.pm -- plugin for importing Microsoft Excel files. 4 4 # (currently only versions 95 and 97) 5 5 # … … 26 26 ########################################################################### 27 27 28 package ExcelPlug ;28 package ExcelPlugin; 29 29 30 use Convert ToPlug;30 use ConvertBinaryFile; 31 31 use strict; 32 32 no strict 'refs'; # allow filehandles to be variables and viceversa 33 33 34 34 sub BEGIN { 35 @ExcelPlug ::ISA = ('ConvertToPlug');35 @ExcelPlugin::ISA = ('ConvertBinaryFile'); 36 36 } 37 37 38 38 my $arguments = 39 39 [ { 'name' => "process_exp", 40 'desc' => "{Bas Plug.process_exp}",40 'desc' => "{BasePlugin.process_exp}", 41 41 'type' => "regexp", 42 42 'reqd' => "no", … … 44 44 ]; 45 45 46 my $options = { 'name' => "ExcelPlug ",47 'desc' => "{ExcelPlug .desc}",46 my $options = { 'name' => "ExcelPlugin", 47 'desc' => "{ExcelPlugin.desc}", 48 48 'abstract' => "no", 49 49 'inherits' => "yes", … … 59 59 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)}; 60 60 61 my $self = new Convert ToPlug($pluginlist, $inputargs, $hashArgOptLists);61 my $self = new ConvertBinaryFile($pluginlist, $inputargs, $hashArgOptLists); 62 62 63 63 if ($self->{'info_only'}) { … … 66 66 } 67 67 68 $self->{'filename_extension'} = "xls"; 69 $self->{'file_type'} = "Excel"; 70 68 71 my $secondary_plugin_options = $self->{'secondary_plugin_options'}; 69 if (!defined $secondary_plugin_options->{'HTMLPlug '}) {70 $secondary_plugin_options->{'HTMLPlug '} = [];72 if (!defined $secondary_plugin_options->{'HTMLPlugin'}) { 73 $secondary_plugin_options->{'HTMLPlugin'} = []; 71 74 } 72 my $html_options = $secondary_plugin_options->{'HTMLPlug '};75 my $html_options = $secondary_plugin_options->{'HTMLPlugin'}; 73 76 74 #$self->{'input_encoding'} = "utf8";75 #$self->{'extract_language'} = 1;76 77 push(@$html_options, "-input_encoding", "utf8"); 77 78 push(@$html_options,"-extract_language") if $self->{'extract_language'}; … … 82 83 } 83 84 84 sub convert_post_process 85 sub convert_post_process_old 85 86 { 86 87 my $self = shift (@_); … … 107 108 } 108 109 109 sub process {110 my $self = shift (@_);111 my ($textref, $pluginfo, $base_dir, $file, $metadata, $doc_obj, $gli) = @_;112 113 return $self->process_type("xls",$base_dir,$file,$doc_obj);114 }115 110 116 111 1;
Note:
See TracChangeset
for help on using the changeset viewer.