Ignore:
Timestamp:
2005-08-05T15:23:22+12:00 (19 years ago)
Author:
chi
Message:

Modification of the way passing argument and option lists for the secondary plugin.

File:
1 edited

Legend:

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

    r10353 r10429  
    7676    push(@$inputargs,'^(Page\s+\d+)?(\s*1\s+)?');
    7777
    78     #foreach my $temp (@$inputargs)
    79     #{
    80     #print STDERR "($temp)\n";
    81     #}
    82 
    8378    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
    8479    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
    85    
     80
     81    my @arg_array = @$inputargs;
    8682    my $self = (defined $hashArgOptLists)? new ConvertToPlug($pluginlist,$inputargs,$hashArgOptLists): new ConvertToPlug($pluginlist,$inputargs);
    8783   
     
    105101        $secondary_plugin_options->{'PagedImgPlug'} = [];
    106102        my $pagedimg_options = $secondary_plugin_options->{'PagedImgPlug'};
    107         push(@$pagedimg_options , "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?')
    108        
     103        push(@$pagedimg_options, "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?');
    109104    }
    110105    }
    111106    my $html_options = $secondary_plugin_options->{'HTMLPlug'};
    112107    my $text_options = $secondary_plugin_options->{'TEXTPlug'};
    113     #my $pagedimg_options = $secondary_plugin_options->{'PagedImgPlug'};
    114 
     108   
    115109    if ($self->{'input_encoding'} eq "auto") {
    116110    # pdftohtml will always produce html files encoded as utf-8
     
    127121    # to extract these metadata fields from the HEAD META fields
    128122    push(@$html_options,"-metadata_fields","Title,GENERATOR,date,author<Creator>");
    129 
     123   
    130124    if ($self->{'use_sections'}) {
    131125    $self->{'description_tags'} = 1;
    132126    push(@$html_options,"-description_tags");
    133127    }
     128
    134129    # following title_sub removes "Page 1" added by pdftohtml, and a leading
    135130    # "1", which is often the page number at the top of the page. Bad Luck
     
    137132    push(@$html_options , "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?');
    138133    push(@$text_options , "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?');
    139     #push(@$pagedimg_options , "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?');
    140 
     134 
    141135    $self = bless $self, $class;
    142     $self->load_secondary_plugins($class,$secondary_plugin_options);
     136    $self->load_secondary_plugins($class,$secondary_plugin_options,$hashArgOptLists);
    143137    return $self;
    144138}
Note: See TracChangeset for help on using the changeset viewer.