Ignore:
Timestamp:
2004-03-22T13:27:17+12:00 (20 years ago)
Author:
kjdon
Message:

removed the old commented out print usage stuff, added gli arg if it didn't have it, if gli arg is set, output strings in utf-8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/import.pl

    r7063 r7101  
    165165}
    166166
    167 
    168 #  sub print_usage {
    169 #      print STDOUT "\n";
    170 #      print STDOUT "import.pl: Converts documents in collections -importdir directory into\n";
    171 #      print STDOUT "           xml documents which are written to the -archivedir directory.\n\n";
    172 #      print STDOUT "  usage: $0 [options] collection-name\n\n";
    173 #      print STDOUT "  options:\n";
    174 #      print STDOUT "   -verbosity number      0=none, 3=lots\n";
    175 #      print STDOUT "   -importdir directory   Where the original material lives\n";
    176 #      print STDOUT "   -archivedir directory  Where the converted material ends up\n";
    177 #      print STDOUT "   -keepold               Will not destroy the current contents of the\n";
    178 #      print STDOUT "                          archives directory (the default)\n";
    179 #      print STDOUT "   -removeold             Will remove the old contents of the archives\n";
    180 #      print STDOUT "                          directory -- use with care\n";
    181 #      print STDOUT "   -gzip                  Use gzip to compress resulting xml documents\n";
    182 #      print STDOUT "                          (don't forget to include ZIPPlug in your plugin\n";
    183 #      print STDOUT "                          list when building from compressed documents)\n";
    184 #      print STDOUT "   -maxdocs number        Maximum number of documents to import\n";
    185 #      print STDOUT "   -groupsize number      Number of import documents to group into one XML file\n";
    186 #      print STDOUT "   -OIDtype hash|incremental The method to use when generating unique\n";
    187 #      print STDOUT "                          identifiers for each document. \"hash\" (the\n";
    188 #      print STDOUT "                          default) hashes the contents of the file and so\n";
    189 #      print STDOUT "                          will be the same every time the collection is\n";
    190 #      print STDOUT "                          imported. \"incremental\" is a simple document\n";
    191 #      print STDOUT "                          count and so will be significantly faster than\n";
    192 #      print STDOUT "                          \"hash\". It is not guaranteed to always assign\n";
    193 #      print STDOUT "                          the same identifier to a given document though\n";
    194 #      print STDOUT "                          and does not allow further documents to be added\n";
    195 #      print STDOUT "                          to existing xml archives\n";
    196 #      print STDOUT "   -sortmeta metadata     Sort documents alphabetically by metadata for\n";
    197 #      print STDOUT "                          building. This will be disabled if groupsize > 1\n";
    198 #      print STDOUT "   -debug                 Print imported text to STDOUT\n";
    199 #      print STDOUT "   -collectdir directory  Collection directory (defaults to " .
    200 #   &util::filename_cat ($ENV{'GSDLHOME'}, "collect") . ")\n";
    201 #      print STDOUT "   -out name              Filename or handle to print output status to.\n";
    202 #      print STDOUT "                          The default is STDERR\n";
    203 #      print STDOUT "   -statsfile name        Filename or handle to print import statistics to.\n";
    204 #      print STDOUT "                          The default is STDERR\n";
    205 #      print STDOUT "   -faillog name          Fail log filename. This log receives the filenames\n";
    206 #      print STDOUT "                          of any files which fail to be processed (defaults\n";
    207 #      print STDOUT "                          to " .
    208 #   &util::filename_cat("<collectdir>", "colname", "etc", "fail.log") . ")\n";
    209 #      print STDOUT "  [Type \"perl -S import.pl | more\" if this help text scrolled off your screen]";
    210 #      print STDOUT "\n" unless $ENV{'GSDLOS'} =~ /^windows$/i;
    211 #  }
    212167
    213168&main();
     
    260215    }
    261216
     217    if ($gli) { # the gli wants strings to be in UTF-8
     218    &gsprintf::output_strings_in_UTF8;
     219    }
    262220    my $close_out = 0;
    263221    if ($out !~ /^(STDERR|STDOUT)$/i) {
Note: See TracChangeset for help on using the changeset viewer.