Changeset 12335
- Timestamp:
- 2006-07-28T15:05:10+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/import.pl
r12266 r12335 37 37 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/cpan"); 38 38 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/plugins"); 39 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/plugouts"); 39 40 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/classify"); 40 41 } … … 43 44 use colcfg; 44 45 use plugin; 46 use plugout; 45 47 use docprint; 46 48 use manifest; … … 374 376 } 375 377 } 378 379 376 380 if ($saveas !~ /^(GA|METS)$/) { 377 if (defined $collectcfg->{' saveas'} && $collectcfg->{'saveas'} =~ /^(GA|METS)$/) {378 $saveas = $collectcfg->{' saveas'};381 if (defined $collectcfg->{'plugout'} && $collectcfg->{'plugout'}[0] =~ /^(GAPlugout|METSPlugout)$/) { 382 $saveas = $collectcfg->{'plugout'}[0]; 379 383 } else { 380 $saveas ="GA"; 381 } 382 } 384 $saveas ="GAPlugout"; 385 } 386 } 387 383 388 if (defined $collectcfg->{'sortmeta'} && (!defined $sortmeta || $sortmeta eq "")) { 384 389 $sortmeta = $collectcfg->{'sortmeta'}; … … 464 469 $archive_info->load_info ($archive_info_filename); 465 470 471 <<<<<<< import.pl 472 ####Use Plugout#### 473 my ($plugout_name); 474 if ($saveas !~ /^(GA|METS)Plugout$/ ){ 475 $plugout_name = $saveas."Plugout"; 476 } 477 else{ 478 $plugout_name = $saveas; 479 } 480 481 my $opts=[]; 482 483 push @$opts,("-output_info",$export_info) if (defined $export_info); 484 485 push @$opts,("-verbosity",$verbosity) if (defined $verbosity); 486 push @$opts,("-gzip_output",$gzip) if (defined $gzip); 487 push @$opts,("-group_size",$groupsize) if (defined $groupsize); 488 push @$opts,("-output_handle",$out) if (defined $out); 489 490 #$processor = new docsave ($collection, $archive_info, $verbosity, $gzip, $groupsize, $out, $service, $saveas); 491 $processor = &plugout::load_plugout($plugout_name,$opts); 492 $processor->setoutputdir ($archivedir); 493 $processor->set_sortmeta ($sortmeta, $removeprefix, $removesuffix) if defined $sortmeta; 494 $processor->set_OIDtype ($OIDtype); 495 #$processor->set_saveas ($saveas); 496 #$processor->set_saveas_version ("greenstone"); 497 ======= 466 498 # create a docsave object to process the documents 467 499 $processor = new docsave ($collection, $archive_info, $verbosity, $gzip, $groupsize, $out, $service, $saveas); … … 472 504 $processor->set_saveas_version ("greenstone"); 473 505 506 >>>>>>> 1.78 474 507 } else { 475 508 $processor = new docprint (); … … 503 536 if (!$debug) { 504 537 $processor->close_file_output() if $groupsize > 1; 538 $processor->close_group_output() if $processor->is_group(); 505 539 $archive_info->save_info($archive_info_filename); 506 540 }
Note:
See TracChangeset
for help on using the changeset viewer.