Changeset 1287 for trunk/gsdl/bin/script/import.pl
- Timestamp:
- 2000-07-14T12:24:20+12:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/import.pl
r1269 r1287 60 60 print STDERR " -maxdocs number Maximum number of documents to import\n"; 61 61 print STDERR " -groupsize number Number of GML documents to group into one file\n"; 62 print STDERR " -sortmeta metadata Sort documents alphabetically by metadata for\n"; 63 print STDERR " building. This will be disabled if groupsize > 1\n"; 62 64 print STDERR " -debug Print imported text to STDOUT\n\n"; 63 65 } … … 69 71 my ($verbosity, $importdir, $archivedir, $keepold, 70 72 $removeold, $gzip, $groupsize, $debug, $maxdocs, $collection, 71 $configfilename, $collectcfg, $pluginfo, 73 $configfilename, $collectcfg, $pluginfo, $sortmeta, 72 74 $archive_info_filename, $archive_info, $processor); 73 75 if (!parsargv::parse(\@ARGV, … … 79 81 'gzip', \$gzip, 80 82 'groupsize/\d+/1', \$groupsize, 83 'sortmeta/.*/', \$sortmeta, 81 84 'debug', \$debug, 82 85 'maxdocs/^\-?\d+/-1', \$maxdocs)) { … … 92 95 &print_usage(); 93 96 die "\n"; 97 } 98 99 # check sortmeta 100 $sortmeta = undef unless defined $sortmeta && $sortmeta =~ /\S/; 101 if (defined $sortmeta && $groupsize > 1) { 102 print STDERR "WARNING: import.pl cannot sort documents when groupsize > 1\n"; 103 print STDERR " sortmeta option will be ignored\n\n"; 104 $sortmeta = undef; 94 105 } 95 106 … … 160 171 $processor = new docsave ($collection, $archive_info, $verbosity, $gzip, $groupsize); 161 172 $processor->setarchivedir ($archivedir); 173 $processor->set_sortmeta ($sortmeta) if defined $sortmeta; 162 174 } else { 163 175 $processor = new docprint (); … … 173 185 # write out the archive information file 174 186 if (!$debug) { 175 $processor->close_file_output() ;187 $processor->close_file_output() if $groupsize > 1; 176 188 $archive_info->save_info($archive_info_filename); 177 189 }
Note:
See TracChangeset
for help on using the changeset viewer.