Changeset 9951
- Timestamp:
- 2005-05-25T17:06:20+12:00 (19 years ago)
- Location:
- trunk/gsdl/bin/script
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/export.pl
r9854 r9951 143 143 'modegli' => "3" }, 144 144 $saveas_argument, 145 #{ 'name' => "statsfile",146 #'desc' => "{export.statsfile}",147 #'type' => "string",148 #'deft' => "STDERR",149 #'reqd' => "no",150 #'hiddengli' => "yes" },145 { 'name' => "statsfile", 146 'desc' => "{export.statsfile}", 147 'type' => "string", 148 'deft' => "STDERR", 149 'reqd' => "no", 150 'hiddengli' => "yes" }, 151 151 { 'name' => "verbosity", 152 152 'desc' => "{export.verbosity}", … … 175 175 sub main { 176 176 my ($verbosity, $importdir, $archivedir, $keepold, $listall, 177 $removeold, $saveas, $gzip, $groupsize, $OIDtype, $debug, 177 $removeold, $saveas, $version, 178 $gzip, $groupsize, $OIDtype, $debug, 178 179 $maxdocs, $collection, $configfilename, 179 $pluginfo, $sortmeta, $export_info_filename, 180 $pluginfo, $sortmeta, 181 $export_info_filename, $statsfile, 180 182 $export_info, $processor, $out, $faillog, $collectdir, $gli); 181 183 … … 195 197 'keepold', \$keepold, 196 198 'removeold', \$removeold, 197 'saveas/^(DSpace|METS)$/METS', \$saveas, 199 'saveas/^(DSpace|METS|GA)$/METS', \$saveas, 200 'version/.*/', \$version, 198 201 'debug', \$debug, 199 202 'maxdocs/^\-?\d+/', \$maxdocs, 200 203 'collectdir/.*/', \$collectdir, 201 204 'out/.*/STDERR', \$out, 202 #'statsfile/.*/STDERR', \$statsfile,205 'statsfile/.*/STDERR', \$statsfile, 203 206 'faillog/.*/', \$faillog, 204 207 'gli', \$gli, … … 415 418 $processor->set_OIDtype ($OIDtype); 416 419 $processor->set_saveas ($saveas); 420 $processor->set_saveas_version ($version); 417 421 } else { 418 422 $processor = new docprint (); … … 434 438 } 435 439 436 # # write out export stats 437 # my $close_stats = 0; 438 # if ($statsfile !~ /^(STDERR|STDOUT)$/i) { 439 # if (open (STATS, ">$statsfile")) { 440 # $statsfile = 'import::STATS'; 441 # $close_stats = 1; 442 # } else { 443 # &gsprintf($out, "{import.cannot_open_stats_file}", $statsfile); 444 # &gsprintf($out, "{import.stats_backup}\n"); 445 # $statsfile = 'STDERR'; 446 # } 447 # } 440 # write out export stats 441 my $close_stats = 0; 442 if ($statsfile !~ /^(STDERR|STDOUT)$/i) { 443 if (open (STATS, ">$statsfile")) { 444 $statsfile = 'import::STATS'; 445 $close_stats = 1; 446 } else { 447 &gsprintf($out, "{import.cannot_open_stats_file}", $statsfile); 448 &gsprintf($out, "{import.stats_backup}\n"); 449 $statsfile = 'STDERR'; 450 } 451 } 452 453 &gsprintf($out, "\n"); 454 &gsprintf($out, "*********************************************\n"); 455 456 &plugin::write_stats($pluginfo, $statsfile, $faillogname, $gli); 457 if ($close_stats) { 458 close STATS; 459 } 460 461 &gsprintf($out, "*********************************************\n"); 462 463 close OUT if $close_out; 464 448 465 close FAILLOG; 449 466 }; 467 468 if ($@) { 469 print STDERR $@; 470 } 450 471 451 472 ## $ENV{'GSDLCOLLECTION'} = undef; … … 457 478 &gsprintf($out, "\n"); 458 479 &gsprintf($out, "*********************************************\n"); 459 &gsprintf($out, "{export.complete}\n"); 460 &gsprintf($out, "*********************************************\n"); 461 462 # &plugin::write_stats($pluginfo, $statsfile, $faillogname, $gli); 463 # if ($close_stats) { 464 # close STATS; 465 # } 466 467 close OUT if $close_out; 468 480 &gsprintf($out, "* {export.complete}\n"); 481 &gsprintf($out, "*********************************************\n"); 469 482 470 483 } -
trunk/gsdl/bin/script/import.pl
r9854 r9951 201 201 sub main { 202 202 my ($verbosity, $importdir, $archivedir, $keepold, 203 $removeold, $saveas, $gzip, $groupsize, $OIDtype, $debug, 203 $removeold, $saveas, $version, 204 $gzip, $groupsize, $OIDtype, $debug, 204 205 $maxdocs, $collection, $configfilename, $collectcfg, 205 206 $pluginfo, $sortmeta, $removeprefix, $removesuffix, … … 221 222 'keepold', \$keepold, 222 223 'removeold', \$removeold, 223 'saveas/^(GA|METS)$/', \$saveas, 224 'saveas/^(GA|METS|DSpace)$/GA', \$saveas, 225 'version/.*/', \$version, 224 226 'gzip', \$gzip, 225 227 'groupsize/\d+/1', \$groupsize, … … 433 435 $processor->set_OIDtype ($OIDtype); 434 436 $processor->set_saveas ($saveas); 437 $processor->set_saveas_version ($version); 438 435 439 } else { 436 440 $processor = new docprint ();
Note:
See TracChangeset
for help on using the changeset viewer.