Changeset 28704

Show
Ignore:
Timestamp:
28.11.2013 14:55:13 (6 years ago)
Author:
kjdon
Message:

got rid of all plugout specific options - these are now all specified in -saveas_options, which gets passed directly to the plugout. added GreenstoneXML format to list of saveas options. added an option include_auxiliary_database_files - if set, export will generate the archivesinf databases, otherwise you'll only get the document files. args can set their defaults in the data structure - we now use default_argname variable to test whether value was set by the user or parse function. can put saveas_options into collect.cfg

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/export.pl

    r28639 r28704  
    7474# what format to export as 
    7575my $saveas_list =  
    76     [ { 'name' => "GreenstoneMETS", 
     76    [ { 'name' => "GreenstoneXML", 
     77    'desc' => "{export.saveas.GreenstoneXML}"}, 
     78      { 'name' => "GreenstoneMETS", 
    7779        'desc' => "{export.saveas.GreenstoneMETS}"}, 
    7880      { 'name' => "FedoraMETS", 
     
    110112    'type' => "string", 
    111113    'reqd' => "no" }, 
     114      { 'name' => "include_auxiliary_database_files", 
     115    'desc' => "{export.include_auxiliary_database_files}", 
     116    'type' => "flag", 
     117    'reqd' => "no" }, 
    112118      { 'name' => "exportdir", 
    113119    'desc' => "{export.exportdir}", 
    114120    'type' => "string", 
    115121    'reqd' => "no", 
     122    'deft' => "export", 
    116123        'hiddengli' => "yes" }, 
    117124      @$inexport::directory_arguments, 
     
    121128    'reqd' => "no", 
    122129        'hiddengli' => "yes" }, 
    123       { 'name' => "xslt_txt", 
    124     'desc' => "{METSPlugout.xslt_txt}", 
    125     'type' => "string", 
    126     'reqd' => "no", 
    127         'hiddengli' => "no" }, 
    128       { 'name' => "xslt_mets", 
    129     'desc' => "{METSPlugout.xslt_mets}", 
    130     'type' => "string", 
    131     'reqd' => "no", 
    132         'hiddengli' => "no" }, 
    133       { 'name' => "fedora_namespace", 
    134     'desc' => "{FedoraMETSPlugout.fedora_namespace} (-saveas FedoraMETS)", 
    135     'type' => "string", 
    136     'deft' => "greenstone", 
    137     'reqd' => "no", 
    138         'hiddengli' => "no" }, 
    139       { 'name' => "mapping_file", 
    140     'desc' => "{MARCXMLPlugout.mapping_file} (-saveas MARCXML)", 
    141     'type' => "string", 
    142     'reqd' => "no", 
    143         'hiddengli' => "no" }, 
    144       { 'name' => "group_marc", 
    145     'desc' => "{MARCXMLPlugout.group} (-saveas MARCXML)", 
    146     'type' => "flag", 
    147     'reqd' => "no", 
    148         'hiddengli' => "no" }, 
    149       { 'name' => "metadata_prefix", 
    150     'desc' => "{DSpacePlugout.metadata_prefix} (-saveas DSpace)}", 
    151     'type' => "string", 
    152     'reqd' => "no", 
    153         'hiddengli' => "no" }, 
    154130      { 'name' => "listall", 
    155131    'desc' => "{export.listall}", 
     
    193169    my ($inexport, $collectcfg) = @_; 
    194170 
    195     if (!defined $inexport->{'saveas'}) { 
     171    if (defined $inexport->{'default_saveas'}) { 
     172    # we had set the value from the arg default, not from the user 
    196173    if (defined $collectcfg->{'saveas'}  
    197         && $collectcfg->{'saveas'} =~ /^(GreenstoneMETS|FedoraMETS|MARCXML|DSPace)$/) { 
     174        && $collectcfg->{'saveas'} =~ /^(GreenstoneXML|GreenstoneMETS|FedoraMETS|MARCXML|DSPace)$/) { 
    198175        $inexport->{'saveas'} = $collectcfg->{'saveas'}; 
    199176    } else { 
     
    202179    } 
    203180 
    204     if (!defined $inexport->{'saveas_options'}) { 
     181    if (!defined $inexport->{'saveas_options'} || $inexport->{'saveas_options'} eq "") { 
    205182    if (defined $collectcfg->{'saveas_options'} ){ 
    206         $inexport->{'saveas'} = $collectcfg->{'saveas_options'}; 
     183        $inexport->{'saveas_options'} = $collectcfg->{'saveas_options'}; 
    207184    } 
    208185    }