Changeset 18406 for gsdl


Ignore:
Timestamp:
01/19/09 18:08:49 (12 years ago)
Author:
ak19
Message:

Modified srcreplaceable plugins (plugins which operate on docs where the source file can be replaced with their converted htmls) to set the file_rename_method to none for secondary plugins (for Text, HTML, and PagedImage plugins) so that the file is not renamed several times.

Location:
gsdl/trunk/perllib/plugins
Files:
7 edited

Legend:

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

    r18328 r18406  
    131131    push(@$pagedimg_options, "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?');
    132132    push(@$pagedimg_options, "-create_thumbnail", "true", "-create_screenview", "true");
    133 
     133    push(@$pagedimg_options, "-file_rename_method", "none");
    134134
    135135    $self = bless $self, $class;
  • gsdl/trunk/perllib/plugins/ExcelPlugin.pm

    r15918 r18406  
    7373    $secondary_plugin_options->{'HTMLPlugin'} = [];
    7474    }
     75    if (!defined $secondary_plugin_options->{'TextPlugin'}) {
     76    $secondary_plugin_options->{'TextPlugin'} = [];
     77    }
    7578    my $html_options = $secondary_plugin_options->{'HTMLPlugin'};
    76    
     79    my $text_options = $secondary_plugin_options->{'TextPlugin'};
     80
    7781    push(@$html_options, "-input_encoding", "utf8");
    7882    push(@$html_options,"-extract_language") if $self->{'extract_language'};
     83    push(@$html_options, "-file_rename_method", "none");
     84   
     85    push(@$text_options, "-input_encoding", "utf8");
     86    push(@$text_options,"-extract_language") if $self->{'extract_language'};
     87    push(@$text_options, "-file_rename_method", "none");
     88
    7989    $self = bless $self, $class;
    8090   
  • gsdl/trunk/perllib/plugins/PDFPlugin.pm

    r18145 r18406  
    186186    push(@$html_options, "-associate_tail_re", $associate_tail_re);
    187187    push(@$text_options, "-associate_tail_re", $associate_tail_re);
    188     push(@$pagedimg_options, "-associate_tail_re", $associate_tail_re);
    189     }
    190 
    191  
     188    push(@$pagedimg_options, "-associate_tail_re", $associate_tail_re) if defined $pagedimg_options;
     189    }
     190
     191    push(@$html_options, "-file_rename_method", "none");
     192    push(@$text_options, "-file_rename_method", "none");
     193    push(@$pagedimg_options, "-file_rename_method", "none") if defined $pagedimg_options;
     194
    192195    $self = bless $self, $class;
    193196    $self->load_secondary_plugins($class,$secondary_plugin_options,$hashArgOptLists);
  • gsdl/trunk/perllib/plugins/PostScriptPlugin.pm

    r17744 r18406  
    112112    }
    113113
     114    if (!defined $secondary_plugin_options->{'HTMLPlugin'}) {
     115    $secondary_plugin_options->{'HTMLPlugin'} = [];
     116    }
     117
    114118    my $text_options = $secondary_plugin_options->{'TextPlugin'};
    115 
    116     if (defined $self->{'convert_to'} && $self->{'convert_to'} =~ /pagedimg.*/i) {
     119    my $html_options = $secondary_plugin_options->{'HTMLPlugin'};
     120
     121    if (defined $self->{'convert_to'} && $self->{'convert_to'} =~ m/(pagedimage|pagedimg).*/i) {
    117122    if (!defined $secondary_plugin_options->{'PagedImagePlugin'}){
    118123        $secondary_plugin_options->{'PagedImagePlugin'} = [];
    119124        my $pagedimg_options = $secondary_plugin_options->{'PagedImagePlugin'};
    120125        push(@$pagedimg_options, "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?');
     126        push(@$pagedimg_options, "-file_rename_method", "none");
    121127    }
    122128    }
     
    130136    push(@$text_options , "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?');
    131137
     138    push(@$text_options, "-file_rename_method", "none");
     139    push(@$html_options, "-file_rename_method", "none");
     140   
    132141    $self = bless $self, $class;
    133142    # used for convert_post_process
  • gsdl/trunk/perllib/plugins/PowerPointPlugin.pm

    r17744 r18406  
    106106    my $secondary_plugin_options = $self->{'secondary_plugin_options'};
    107107
    108     if ($self->{'windows_scripting'} && ($self->{'convert_to'} eq "PagedImg")) {
     108    if ($self->{'windows_scripting'} && ($self->{'convert_to'} =~ m/(pagedimage|pagedimg).*/i)) {
    109109    $secondary_plugin_options->{'PagedImagePlugin'} = [];
    110110    } else {
    111111    $secondary_plugin_options->{'HTMLPlugin'} = [];
     112    $secondary_plugin_options->{'TextPlugin'} = [];
    112113    }
    113114    my $html_options = $secondary_plugin_options->{'HTMLPlugin'};
     115    my $text_options = $secondary_plugin_options->{'TextPlugin'};
    114116    my $pageimg_options = $secondary_plugin_options->{'PagedImagePlugin'};
    115117 
    116     if (defined $secondary_plugin_options->{'HTMLPlugin'}){
     118    if (defined $html_options){
    117119    push(@$html_options,"-input_encoding", "utf8");
    118120    push(@$html_options,"-extract_language") if $self->{'extract_language'};
     121    push(@$html_options,"-file_rename_method", "none");
    119122   
    120123    # Instruct HTMLPlugin (when eventually accessed through read_into_doc_obj)
     
    122125    push(@$html_options,"-metadata_fields","Title,GENERATOR,date,author<Creator>");
    123126    }
    124     if (defined $secondary_plugin_options->{'PagedImagePlugin'}){
     127    if (defined $text_options){
     128    push(@$text_options,"-input_encoding", "utf8");
     129    push(@$text_options,"-extract_language") if $self->{'extract_language'};
     130    push(@$text_options,"-file_rename_method", "none");
     131    }
     132    if (defined $pageimg_options){
    125133    push(@$pageimg_options,"-input_encoding", "utf8");
    126     push(@$pageimg_options,"-extract_language") if $self->{'extract_language'};
     134    push(@$pageimg_options,"-extract_language") if $self->{'extract_language'};
     135    push(@$pageimg_options,"-file_rename_method", "none");
    127136    }
    128137
  • gsdl/trunk/perllib/plugins/RTFPlugin.pm

    r15872 r18406  
    8888    push(@$html_options,"-extract_language") if $self->{'extract_language'};
    8989
     90    push(@$html_options, "-file_rename_method", "none");
     91    push(@$text_options, "-file_rename_method", "none");
     92
    9093    $self = bless $self, $class;
    9194
  • gsdl/trunk/perllib/plugins/WordPlugin.pm

    r15969 r18406  
    131131        # Instruct HTMLPlugin (when eventually accessed through read_into_doc_obj)
    132132        # to extract these metadata fields from the HEAD META fields
    133         push (@$structhtml_options,"-metadata_fields","Title,GENERATOR,date,author<Creator>");
    134         push (@$structhtml_options , "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?');
     133        push (@$structhtml_options, "-metadata_fields","Title,GENERATOR,date,author<Creator>");
     134        push (@$structhtml_options, "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?');
    135135        push (@$structhtml_options, "-description_tags") if $self->{'windows_scripting'};
    136         push(@$structhtml_options,"-extract_language") if $self->{'extract_language'};
     136        push (@$structhtml_options, "-extract_language") if $self->{'extract_language'};
    137137        push (@$structhtml_options, "-delete_toc") if $self->{'delete_toc'};
    138138        push (@$structhtml_options, "-toc_header", $self->{'toc_header'}) if $self->{'toc_header'};
     
    168168    push(@$html_options, "-associate_tail_re", $associate_tail_re);
    169169    push(@$text_options, "-associate_tail_re", $associate_tail_re);
    170     push(@$structhtml_options, "-associate_tail_re", $associate_tail_re);
    171     }
    172        
     170    push(@$structhtml_options, "-associate_tail_re", $associate_tail_re) if defined $structhtml_options;
     171    }
     172
     173    push(@$html_options, "-file_rename_method", "none");
     174    push(@$text_options, "-file_rename_method", "none");
     175    push(@$structhtml_options, "-file_rename_method", "none") if defined $structhtml_options;
     176
    173177    $self = bless $self, $class;
    174178    $self->load_secondary_plugins($class,$secondary_plugin_options,$hashArgOptLists);
Note: See TracChangeset for help on using the changeset viewer.