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/LaTeXPlugin.pm

    r15865 r15872  
    11###########################################################################
    22#
    3 # LaTeXPlug.pm
     3# LaTeXPlugin.pm
    44#
    55# A component of the Greenstone digital library software
     
    2626#  parse/remove tex \if ... macros
    2727
    28 package LaTeXPlug;
     28package LaTeXPlugin;
    2929
    3030# System complains about $arguments if the strict is set
     
    3333
    3434# greenstone packages
    35 use BasPlug;
     35use ReadTextFile;
    3636use unicode;
    3737use util;
     
    3939my $arguments =
    4040    [ { 'name' => "process_exp",
    41     'desc' => "{BasPlug.process_exp}",
     41    'desc' => "{ReadTextFile.process_exp}",
    4242    'type' => "regexp",
    4343    'reqd' => "no",
    4444    'deft' => &get_default_process_exp() } ];
    4545
    46 my $options = { 'name'     => 'LaTeXPlug',
    47         'desc'     => '{LaTeXPlug.desc}',
     46my $options = { 'name'     => 'LaTeXPlugin',
     47        'desc'     => '{LaTeXPlugin.desc}',
    4848        'abstract' => 'no',
    4949        'inherits' => 'yes',
     
    5151
    5252sub BEGIN {
    53     @LaTeXPlug::ISA = ('BasPlug');
    54 }
    55 
    56 sub print_usage {
    57     print STDERR "\n  usage: plugin LaTeXPlug [options]\n\n";
     53    @LaTeXPlugin::ISA = ('ReadTextFile');
    5854}
    5955
     
    6359    push(@$pluginlist, $class);
    6460
    65     if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
    66     if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
    67 
    68     my $self = new BasPlug($pluginlist, $inputargs, $hashArgOptLists);
     61    push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});
     62    push(@{$hashArgOptLists->{"OptList"}},$options);
     63
     64    my $self = new ReadTextFile($pluginlist, $inputargs, $hashArgOptLists);
    6965
    7066    $self->{'aux_files'} = {};
     
    9995    my $outhandle = $self->{'outhandle'};
    10096    if ($gli) {
    101     print STDERR "<Processing n='$file' p='LaTeXPlug'>\n";
     97    print STDERR "<Processing n='$file' p='LaTeXPlugin'>\n";
    10298    } elsif ($self->{'verbosity'} > 1) {
    103     print $outhandle "LaTeXPlug: processing $file\n"
     99    print $outhandle "LaTeXPlugin: processing $file\n"
    104100    }
    105101    my $cursection = $doc_obj->get_top_section();
Note: See TracChangeset for help on using the changeset viewer.