Changeset 10405


Ignore:
Timestamp:
2005-08-03T13:29:23+12:00 (19 years ago)
Author:
chi
Message:

Adding structured HTML formating arguments here.

File:
1 edited

Legend:

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

    r10355 r10405  
    3333
    3434sub BEGIN {
    35     @WordPlug::ISA = ('ConvertToPlug','StructuredHTMLPlug');
     35    #@WordPlug::ISA = ('ConvertToPlug','StructuredHTMLPlug');
     36    @WordPlug::ISA = ('ConvertToPlug');
    3637}
    3738
     
    4142    'type' => "regexp",
    4243    'deft' => &get_default_process_exp(),
    43     'reqd' => "no" },
     44    'reqd' => "no" }
    4445      ];
    4546
     
    5657
    5758    if ($ENV{'GSDLOS'} =~ m/^windows$/i) {
    58     my $ws_arg = { 'name' => "windows_scripting",
    59                'desc' => "{WordPlug.windows_scripting}",
    60                'type' => "flag" };
    61     push(@$arguments,$ws_arg);
     59    my $ws_arg = [ { 'name' => "windows_scripting",
     60             'desc' => "{WordPlug.windows_scripting}",
     61             'type' => "flag",
     62                 'reqd' => "no" },
     63               { 'name' => "checkout_toc",
     64             'desc' => "{WordPlug.checkout_toc}",
     65             'type' => "flag",
     66             'reqd' => "no"},
     67               { 'name' => "level1_header",
     68             'desc' => "{WordPlug.level1_header}",
     69             'type' => "regexp",
     70             'reqd' => "no",
     71             'deft' => "" },
     72               { 'name' => "level2_header",
     73             'desc' => "{WordPlug.level2_header}",
     74             'type' => "regexp",
     75             'reqd' => "no",
     76             'deft' => "" },
     77               { 'name' => "level3_header",
     78             'desc' => "{WordPlug.level3_header}",
     79             'type' => "regexp",
     80             'reqd' => "no",
     81             'deft' => "" },
     82               { 'name' => "title_header",
     83             'desc' => "{WordPlug.title_header}",
     84             'type' => "regexp",
     85             'reqd' => "no",
     86             'deft' => "" },
     87               { 'name' => "toc_header",
     88             'desc' => "{WordPlug.toc_header}",
     89             'type' => "regexp",
     90             'reqd' => "no",
     91             'deft' => "" },
     92               { 'name' => "tof_header",
     93             'desc' => "{WordPlug.tof_header}",
     94             'type' => "regexp",
     95             'reqd' => "no",
     96             'deft' => "" }];
     97   
     98    push(@$arguments,@$ws_arg);
    6299    }
    63100
     
    65102    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
    66103
     104    #foreach my $arg (@{$hashArgOptLists->{"ArgList"}})
     105    #{
     106    #   print STDERR "**** Word Argument =$arg->{'name'}\n";
     107    #}
     108   
    67109    my $self = (defined $hashArgOptLists)? new ConvertToPlug($pluginlist,$inputargs,$hashArgOptLists): new ConvertToPlug($pluginlist,$inputargs);
    68110
    69111    #this is passed through to gsConvert.pl by ConvertToPlug.pm
    70112    $self->{'convert_options'} = "-windows_scripting" if $self->{'windows_scripting'};
    71    
     113
    72114    my $secondary_plugin_options = $self->{'secondary_plugin_options'};
    73    
     115    if (defined $self->{'windows_scripting'}) {
     116    if (!defined $secondary_plugin_options->{'StructuredHTMLPlug'}){
     117        $secondary_plugin_options->{'StructuredHTMLPlug'} =[];
     118        my $structhtml_options = $secondary_plugin_options->{'StructuredHTMLPlug'};
     119    }
     120    }
    74121    if (!defined $secondary_plugin_options->{'HTMLPlug'}) {
    75122    $secondary_plugin_options->{'HTMLPlug'} = [];
     
    88135    push(@$html_options,"-input_encoding", "utf8");
    89136    push(@$html_options,"-extract_language");
    90    
     137
    91138    # Instruct HTMLPlug (when eventually accessed through read_into_doc_obj)
    92139    # to extract these metadata fields from the HEAD META fields
     
    96143   
    97144    $self = bless $self, $class;
    98    
    99145    $self->load_secondary_plugins($class,$secondary_plugin_options);
    100146
    101     #return bless $self, $class;
    102147    return bless $self;
    103148}
Note: See TracChangeset for help on using the changeset viewer.