Ignore:
Timestamp:
2008-06-05T09:29:32+12:00 (16 years ago)
Author:
kjdon
Message:

plugin overhaul: plugins renamed to xxPlugin, and in some cases the names are made more sensible. They now use the new base plugins. Hopefully we have better code reuse. Some of the plugins still need work done as I didn't want to spend another month doing this before committing it. Alos, I haven't really tested anything yet...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugins/ExcelPlugin.pm

    r15865 r15872  
    11###########################################################################
    22#
    3 # ExcelPlug.pm -- plugin for importing Microsoft Excel files.
     3# ExcelPlugin.pm -- plugin for importing Microsoft Excel files.
    44#  (currently only versions 95 and 97)
    55#
     
    2626###########################################################################
    2727
    28 package ExcelPlug;
     28package ExcelPlugin;
    2929
    30 use ConvertToPlug;
     30use ConvertBinaryFile;
    3131use strict;
    3232no strict 'refs'; # allow filehandles to be variables and viceversa
    3333
    3434sub BEGIN {
    35     @ExcelPlug::ISA = ('ConvertToPlug');
     35    @ExcelPlugin::ISA = ('ConvertBinaryFile');
    3636}
    3737
    3838my $arguments =
    3939    [ { 'name' => "process_exp",
    40     'desc' => "{BasPlug.process_exp}",
     40    'desc' => "{BasePlugin.process_exp}",
    4141    'type' => "regexp",
    4242    'reqd' => "no",
     
    4444      ];
    4545
    46 my $options = { 'name'     => "ExcelPlug",
    47         'desc'     => "{ExcelPlug.desc}",
     46my $options = { 'name'     => "ExcelPlugin",
     47        'desc'     => "{ExcelPlugin.desc}",
    4848        'abstract' => "no",
    4949        'inherits' => "yes",
     
    5959    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
    6060   
    61     my $self = new ConvertToPlug($pluginlist, $inputargs, $hashArgOptLists);
     61    my $self = new ConvertBinaryFile($pluginlist, $inputargs, $hashArgOptLists);
    6262
    6363    if ($self->{'info_only'}) {
     
    6666    }
    6767
     68    $self->{'filename_extension'} = "xls";
     69    $self->{'file_type'} = "Excel";
     70
    6871    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'} = [];
    7174    }
    72     my $html_options = $secondary_plugin_options->{'HTMLPlug'};
     75    my $html_options = $secondary_plugin_options->{'HTMLPlugin'};
    7376   
    74     #$self->{'input_encoding'} = "utf8";
    75     #$self->{'extract_language'} = 1;
    7677    push(@$html_options, "-input_encoding", "utf8");
    7778    push(@$html_options,"-extract_language") if $self->{'extract_language'};
     
    8283}
    8384
    84 sub convert_post_process
     85sub convert_post_process_old
    8586{
    8687    my $self = shift (@_);
     
    107108}
    108109   
    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 }
    115110
    1161111;
Note: See TracChangeset for help on using the changeset viewer.