Changeset 8603


Ignore:
Timestamp:
2004-11-19T12:06:43+13:00 (19 years ago)
Author:
chi
Message:

Add the $service option for identifing the import and export functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/import.pl

    r8153 r8603  
    169169    'deft' => "2",
    170170    'reqd' => "no",
    171     'modegli' => "4" } ];
     171    'modegli' => "4" }];
    172172
    173173my $options = { 'name' => "import.pl",
     
    193193    my $xml = 0;
    194194    # ************************************
     195    my $service = "import";
    195196
    196197    # note that no defaults are passed for most options as they're set
     
    219220    die "\n";
    220221    }
    221 
    222222    # If $language has been specified, load the appropriate resource bundle
    223223    # (Otherwise, the default resource bundle will be loaded automatically)
     
    235235    &gsprintf::output_strings_in_UTF8;
    236236    }
     237
    237238    my $close_out = 0;
    238239    if ($out !~ /^(STDERR|STDOUT)$/i) {
     
    258259    open (FAILLOG, ">$faillog") ||
    259260    (&gsprintf(STDERR, "{import.cannot_open_fail_log}\n", $faillog) && die);
     261
    260262    my $faillogname = $faillog;
    261263    $faillog = 'import::FAILLOG';
     
    274276    unshift (@INC, "$ENV{'GSDLCOLLECTDIR'}/perllib");
    275277    require docsave;
    276 
    277278
    278279    # get the list of plugins for this collection and set any options that
     
    343344        $sortmeta = $collectcfg->{'sortmeta'};
    344345    }
     346
    345347    if (defined $collectcfg->{'debug'} && $collectcfg->{'debug'} =~ /^true$/i) {
    346348        $debug = 1;
     
    354356        push @global_opts, "-separate_cjk";
    355357    }
    356    
    357358
    358359    } else {
     
    393394
    394395    # create a docsave object to process the documents
    395     $processor = new docsave ($collection, $archive_info, $verbosity, $gzip, $groupsize, $out);
     396    $processor = new docsave ($collection, $archive_info, $verbosity, $gzip, $groupsize, $out, $service, $saveas);
    396397    $processor->setarchivedir ($archivedir);
    397398    $processor->set_sortmeta ($sortmeta) if defined $sortmeta;
Note: See TracChangeset for help on using the changeset viewer.