- Timestamp:
- 1999-12-13T17:34:19+13:00 (24 years ago)
- Location:
- trunk/gsdl/bin/script
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/import.pl
r814 r843 55 55 print STDERR " directory -- use with care\n"; 56 56 print STDERR " -gzip Use gzip to compress resulting gml documents\n"; 57 print STDERR " -debug Print imported text to STDOUT\n"; 58 print STDERR " -maxdocs number Maximum number of documents to import\n\n"; 57 print STDERR " -maxdocs number Maximum number of documents to import\n"; 58 print STDERR " -groupsize number Number of GML documents to group into one file\n"; 59 print STDERR " -debug Print imported text to STDOUT\n\n"; 59 60 } 60 61 … … 72 73 'removeold', \$removeold, 73 74 'gzip', \$gzip, 75 'groupsize/\d+/1', \$groupsize, 74 76 'debug', \$debug, 75 77 'maxdocs/^\-?\d+/-1', \$maxdocs)) { … … 86 88 die "\n"; 87 89 } 90 91 # dynamically load 'docsave' module so it can pick up on a collection 92 # specific docsave.pm is specified. 93 94 unshift (@INC, "$ENV{'GSDLCOLLECTDIR'}/perllib"); 95 require docsave; 96 88 97 89 98 # get the list of plugins for this collection … … 128 137 die "\n"; 129 138 } 130 139 131 140 # remove the old contents of the archives directory if needed 132 141 if ($removeold && -e $archivedir) { … … 136 145 &util::rm_r ($archivedir); 137 146 } 138 147 139 148 # read the archive information file 140 149 if (!$debug) { … … 144 153 145 154 # create a docsave object to process the documents 146 $processor = new docsave ($collection, $archive_info, $verbosity, $gzip );155 $processor = new docsave ($collection, $archive_info, $verbosity, $gzip, $groupsize); 147 156 $processor->setarchivedir ($archivedir); 148 157 } else { … … 150 159 } 151 160 161 &plugin::begin($pluginfo, $importdir, $processor, $maxdocs); 162 152 163 # process the import directory 153 &plugin::read ($pluginfo, $importdir, 154 "", {}, $processor, $maxdocs); 164 &plugin::read ($pluginfo, $importdir, "", {}, $processor, $maxdocs); 155 165 166 &plugin::end($pluginfo); 167 168 $processor->close_file_output(); 169 156 170 # write out the archive information file 157 171 if (!$debug) { … … 159 173 } 160 174 } 175 176 177 178 179 -
trunk/gsdl/bin/script/mkcol.pl
r797 r843 47 47 # print STDERR " -index type The indexes which should be made\n"; 48 48 # print STDERR " -indextext name The index description\n"; 49 # print STDERR " -defaultindex type The index to use if no others are supplied\n\n"; 49 # print STDERR " -defaultindex type The index to use if no others are supplied\n"; 50 51 print STDERR " -title text The title for the collection\n"; 52 print STDERR " -about text The about text for the collection\n"; 53 print STDERR " -plugins list Space separated list of perl plugin modules to use\n"; 54 print STDERR " -refine list Space separated list of perl plugin modules to use\n"; 55 56 50 57 } 51 58 … … 56 63 57 64 if (!(-e $coldir)) { 58 if (!mkdir ($coldir, 0775)) { 65 66 my $store_umask = umask(0002); 67 my $mkdir_ok = mkdir ($coldir, 0777); 68 umask($store_umask); 69 70 if (!$mkdir_ok) 71 { 59 72 die "$!"; 60 73 } … … 91 104 $line =~ s/\*\*indexestext\*\*/$indexestextstr/g; 92 105 $line =~ s/\*\*defaultindex\*\*/$defaultindex/g; 106 $line =~ s/\*\*title\*\*/$title/g; 107 $line =~ s/\*\*about\*\*/$about/g; 108 $line =~ s/\*\*plugins\*\*/$plugins/g; 109 $line =~ s/\*\*refine\*\*/$refine/g; 93 110 94 111 print OUTFILE $line; … … 112 129 'index/.*/document:all', \@indexes, 113 130 'indextext/\.*/Terms must appear within the same document', \@indexestext, 114 'defaultindex/.*/document:all', \$defaultindex 131 'defaultindex/.*/document:all', \$defaultindex, 132 'title/.+/', \$title, 133 'about/.+/', \$about, 134 'plugins/.+/GMLPlug TEXTPlug ArcPlug RecPlug/', \$plugins, 135 'refine/.+/', \$refine 115 136 )) { 116 137 &print_usage(); … … 157 178 $beta = "true" unless defined $beta; 158 179 180 181 if (!defined($title) || $title eq "") { 182 $title = $collection; 183 } 184 159 185 # get capitalised version of the collection 160 186 $capcollection = $collection; … … 186 212 print STDERR "\n\nThe new collection is in $ENV{'GSDLHOME'}/collect/$collection.\n\n"; 187 213 214
Note:
See TracChangeset
for help on using the changeset viewer.