Changeset 2268 for trunk/gsdl/bin/script
- Timestamp:
- 2001-04-03T14:37:44+12:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/import.pl
r1970 r2268 48 48 49 49 sub print_usage { 50 print STDERR "\n"; 51 print STDERR "import.pl: Converts documents in collections -importdir directory into\n"; 52 print STDERR " gml documents which are written to the -archivedir directory.\n\n"; 53 print STDERR " usage: $0 [options] collection-name\n\n"; 50 print STDERR "\n usage: $0 [options] collection-name\n\n"; 54 51 print STDERR " options:\n"; 55 52 print STDERR " -verbosity number 0=none, 3=lots\n"; … … 68 65 print STDERR " building. This will be disabled if groupsize > 1\n"; 69 66 print STDERR " -debug Print imported text to STDOUT\n"; 70 print STDERR " -collectdir directory Collection directory (defaults to " .71 &util::filename_cat ($ENV{'GSDLHOME'}, "collect") . ")\n";72 67 print STDERR " -out Filename or handle to print output status to.\n"; 73 68 print STDERR " The default is STDERR\n\n"; … … 80 75 $removeold, $gzip, $groupsize, $debug, $maxdocs, $collection, 81 76 $configfilename, $collectcfg, $pluginfo, $sortmeta, 82 $archive_info_filename, $archive_info, $processor, 83 $out, $collectdir); 77 $archive_info_filename, $archive_info, $processor, $out); 84 78 if (!parsargv::parse(\@ARGV, 85 79 'verbosity/\d+/2', \$verbosity, … … 93 87 'debug', \$debug, 94 88 'maxdocs/^\-?\d+/-1', \$maxdocs, 95 'collectdir/.*/', \$collectdir,96 89 'out/.*/STDERR', \$out)) { 97 90 &print_usage(); … … 111 104 112 105 # get and check the collection name 113 if (($collection = &util::use_collection(@ARGV , $collectdir)) eq "") {106 if (($collection = &util::use_collection(@ARGV)) eq "") { 114 107 &print_usage(); 115 108 die "\n"; … … 133 126 # get the list of plugins for this collection 134 127 my $plugins = []; 135 $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "etc ", "collect.cfg");128 $configfilename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "etc/collect.cfg"); 136 129 if (-e $configfilename) { 137 130 $collectcfg = &colcfg::read_collect_cfg ($configfilename); … … 159 152 # fill in the default import and archives directories if none 160 153 # were supplied, turn all \ into / and remove trailing / 161 $importdir = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "import")if $importdir eq "";154 $importdir = "$ENV{'GSDLCOLLECTDIR'}/import" if $importdir eq ""; 162 155 $importdir =~ s/[\\\/]+/\//g; 163 156 $importdir =~ s/\/$//; 164 $archivedir = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "archives")if $archivedir eq "";157 $archivedir = "$ENV{'GSDLCOLLECTDIR'}/archives" if $archivedir eq ""; 165 158 $archivedir =~ s/[\\\/]+/\//g; 166 159 $archivedir =~ s/\/$//; … … 200 193 &plugin::read ($pluginfo, $importdir, "", {}, $processor, $maxdocs); 201 194 202 &plugin::end($pluginfo, 195 &plugin::end($pluginfo,$processor); 203 196 204 197 # write out the archive information file
Note:
See TracChangeset
for help on using the changeset viewer.