Changeset 6987


Ignore:
Timestamp:
2004-03-09T15:25:31+13:00 (20 years ago)
Author:
mdewsnip
Message:

Missed changing some print()s to gsprintf()s.

Location:
trunk/gsdl/perllib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/classify/BasClas.pm

    r6968 r6987  
    111111    return if (!defined($classifieroptions));
    112112
    113     print STDERR "<ClassInfo>\n";
    114     print STDERR "  <Name>$classifieroptions->{'name'}</Name>\n";
    115     print STDERR "  <Desc>$classifieroptions->{'desc'}</Desc>\n";
    116     print STDERR "  <Abstract>$classifieroptions->{'abstract'}</Abstract>\n";
    117     print STDERR "  <Inherits>$classifieroptions->{'inherits'}</Inherits>\n";
    118     print STDERR "  <Arguments>\n";
     113    &gsprintf(STDERR, "<ClassInfo>\n");
     114    &gsprintf(STDERR, "  <Name>$classifieroptions->{'name'}</Name>\n");
     115    &gsprintf(STDERR, "  <Desc>$classifieroptions->{'desc'}</Desc>\n");
     116    &gsprintf(STDERR, "  <Abstract>$classifieroptions->{'abstract'}</Abstract>\n");
     117    &gsprintf(STDERR, "  <Inherits>$classifieroptions->{'inherits'}</Inherits>\n");
     118    &gsprintf(STDERR, "  <Arguments>\n");
    119119    if (defined($classifieroptions->{'args'})) {
    120120    &PrintUsage::print_options_xml($classifieroptions->{'args'});
     
    124124    $self->print_xml();
    125125
    126     print STDERR "  </Arguments>\n";
    127     print STDERR "</ClassInfo>\n";
     126    &gsprintf(STDERR, "  </Arguments>\n");
     127    &gsprintf(STDERR, "</ClassInfo>\n");
    128128}
    129129
  • trunk/gsdl/perllib/plugins/BasPlug.pm

    r6945 r6987  
    173173    return if (!defined($pluginoptions));
    174174
    175     print STDERR "<PlugInfo>\n";
    176     print STDERR "  <Name>$pluginoptions->{'name'}</Name>\n";
    177     print STDERR "  <Desc>$pluginoptions->{'desc'}</Desc>\n";
    178     print STDERR "  <Abstract>$pluginoptions->{'abstract'}</Abstract>\n";
    179     print STDERR "  <Inherits>$pluginoptions->{'inherits'}</Inherits>\n";
    180     print STDERR "  <Arguments>\n";
     175    &gsprintf(STDERR, "<PlugInfo>\n");
     176    &gsprintf(STDERR, "  <Name>$pluginoptions->{'name'}</Name>\n");
     177    &gsprintf(STDERR, "  <Desc>$pluginoptions->{'desc'}</Desc>\n");
     178    &gsprintf(STDERR, "  <Abstract>$pluginoptions->{'abstract'}</Abstract>\n");
     179    &gsprintf(STDERR, "  <Inherits>$pluginoptions->{'inherits'}</Inherits>\n");
     180    &gsprintf(STDERR, "  <Arguments>\n");
    181181    if (defined($pluginoptions->{'args'})) {
    182182    &PrintUsage::print_options_xml($pluginoptions->{'args'});
     
    186186    $self->print_xml();
    187187
    188     print STDERR "  </Arguments>\n";
    189     print STDERR "</PlugInfo>\n";
     188    &gsprintf(STDERR, "  </Arguments>\n");
     189    &gsprintf(STDERR, "</PlugInfo>\n");
    190190}
    191191
     
    271271}
    272272
    273 
    274 #  sub print_general_usage {
    275 #      my ($plugin_name) = @_;
    276 
    277 #      print STDERR "\n  usage: plugin $plugin_name [options]\n\n";
    278 
    279 #      print STDERR "   -process_exp      A perl regular expression to match against filenames.\n";
    280 #      print STDERR "                     Matching filenames will be processed by this plugin.\n";
    281 #      print STDERR "                     Each plugin has its own default process_exp. e.g HTMLPlug\n";
    282 #      print STDERR "                     defaults to '(?i)\.html?\$' i.e. all documents ending in\n";
    283 #      print STDERR "                     .htm or .html (case-insensitive).\n\n";
    284 
    285 #      print STDERR "   -block_exp        Files matching this regular expression will be blocked from\n";
    286 #      print STDERR "                     being passed to any later plugins in the list. This has no\n";
    287 #      print STDERR "                     real effect other than to prevent lots of warning messages\n";
    288 #      print STDERR "                     about input files you don't care about. Each plugin might\n";
    289 #      print STDERR "                     have a default block_exp. e.g. by default HTMLPlug blocks\n";
    290 #      print STDERR "                     any files with .gif, .jpg, .jpeg, .png or .css\n";
    291 #      print STDERR "                     file extensions.\n\n";
    292 
    293 
    294 #      print STDERR "   -input_encoding   The encoding of the source documents. Documents will be\n";
    295 #      print STDERR "                     converted from these encodings and stored internally as\n";
    296 #      print STDERR "                     utf8. The default input_encoding is 'auto'. Accepted values\n";
    297 #      print STDERR "                     are:\n";
    298 
    299 #      print STDERR "                       auto: Use text categorization algorithm to automatically\n";
    300 #      print STDERR "                         identify the encoding of each source document. This\n";
    301 #      print STDERR "                         will be slower than explicitly setting the encoding\n";
    302 #      print STDERR "                         but will work where more than one encoding is used\n";
    303 #      print STDERR "                         within the same collection.\n";
    304 
    305 #      print STDERR "                       ascii: Plain 7 bit ascii. This may be a bit faster than\n";
    306 #      print STDERR "                         using iso_8859_1. Beware of using this on a collection\n";
    307 #      print STDERR "                         of documents that may contain characters outside the\n";
    308 #      print STDERR "                         plain 7 bit ascii set though (e.g. German or French\n";
    309 #      print STDERR "                         documents containing accents), use iso_8859_1 instead.\n";
    310 
    311 #      print STDERR "                       utf8: either utf8 or unicode -- automatically detected\n";
    312 #      print STDERR "                       unicode: just unicode\n";
    313 
    314 #      my $e = $encodings::encodings;
    315 #      foreach my $enc (sort {$e->{$a}->{'name'} cmp $e->{$b}->{'name'}} keys (%$e)) {
    316 #   print STDERR "                       $enc: $e->{$enc}->{'name'}\n";
    317 #      }
    318 #      print STDERR "\n";
    319 #      print STDERR "   -default_encoding Use this encoding if -input_encoding is set to 'auto' and\n";
    320 #      print STDERR "                     the text categorization algorithm fails to extract the\n";
    321 #      print STDERR "                     encoding or extracts an encoding unsupported by Greenstone.\n";
    322 #      print STDERR "                     The default is iso_8859_1.\n\n";
    323 
    324 #      print STDERR "   -extract_language Identify the language of each document and set 'Language'\n";
    325 #      print STDERR "                      metadata. Note that this will be done automatically if\n";
    326 #      print STDERR "                     -input_encoding is 'auto'.\n\n";
    327 #      print STDERR "   -default_language If Greenstone fails to work out what language a document is\n";
    328 #      print STDERR "                     the 'Language' metadata element will be set to this value.\n";
    329 #      print STDERR "                     The default is 'en' (ISO 639 language symbols are used:\n";
    330 #      print STDERR "                     en = English). Note that if -input_encoding is not set to\n";
    331 #      print STDERR "                     'auto' and -extract_language is not set, all documents will\n";
    332 #      print STDERR "                     have their 'Language' metadata set to this value.\n\n";
    333 
    334 #      print STDERR "   -extract_acronyms Extract acronyms from within text and set as metadata\n";
    335 
    336 #      print STDERR "   -markup_acronyms  Add acronym metadata into document text\n\n";
    337 
    338 #      print STDERR "   -first            Comma separated list of first sizes to extract from the\n";
    339 #      print STDERR "                     text into a metadata field. The field is called 'FirstNNN'.\n\n";
    340 
    341 #      print STDERR "   -extract_email    Extract email addresses as metadata\n\n";
    342 
    343 #      print STDERR "   -extract_historical_years Extract time-period information from historical\n";
    344 #      print STDERR "                     documents.  This is stored as metadata with the document.\n";
    345 #      print STDERR "                     There is a search interface for this metadata, which you \n";
    346 #      print STDERR "                     can include in your collection by adding the statement:\n";
    347 #      print STDERR "                           format QueryInterface DateSearch\n";
    348 #      print STDERR "                     to your collection configuration file\n";
    349 #      print STDERR "   -maximum_year     The maximum historical date to be used as metadata (in a\n";
    350 #      print STDERR "                     Common Era date, such as 1950)\n";
    351 #      print STDERR "   -maximum_century  The maximum named century to be extracted as historical\n";
    352 #      print STDERR "                     metadata (e.g. 14 will extract all references up to the\n";
    353 #      print STDERR "                     14th century)\n";
    354 #      print STDERR "   -no_bibliography  Do not try and block bibliographic dates when extracting\n";
    355 #      print STDERR "                     historical dates.\n";
    356 #      print STDERR "   -cover_image      Will look for a prefix.jpg file (where prefix is the same\n";
    357 #      print STDERR "                     prefix as the file being processed) and associate it as a\n";
    358 #      print STDERR "                     cover image\n\n";
    359 #  }
    360 
    361 # sub print_usage {
    362 #     print STDERR "\nThis plugin has no plugin specific options\n\n";
    363 # }
    364273
    365274sub new {
Note: See TracChangeset for help on using the changeset viewer.