Changeset 7353


Ignore:
Timestamp:
2004-05-20T09:25:16+12:00 (20 years ago)
Author:
kjdon
Message:

removed all the old print_usage functions - they may be misleading as options change but these dont

Location:
trunk/gsdl/perllib/plugins
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/ConvertToPlug.pm

    r7243 r7353  
    7373        'args'     => $arguments };
    7474
    75 
    76 sub print_usage {
    77     my ($plugin_name) = @_;
    78    
    79     # for when this function is called directly by pluginfo.pl
    80     if (ref ($plugin_name)) {
    81     $plugin_name = ref ($plugin_name);
    82     }
    83 
    84     print STDERR "\n  usage: plugin $plugin_name [options]\n\n";
    85     print STDERR "  options:\n";
    86     print STDERR "   -convert_to (html|text) plugin converts to TEXT or HTML\n";
    87     print STDERR "                           (default html)\n";
    88     print STDERR "   -use_strings            if set a simple strings function\n";
    89     print STDERR "                           will be called to extract text\n";
    90     print STDERR "                           if the conversion utility fails\n";
    91 }
    92 
    9375sub parse_args
    9476{
     
    11092    print STDERR "\nIncorrect options passed to $plugin_name, ";
    11193    print STDERR "check your collect.cfg configuration file\n";
    112     &print_usage($plugin_name);
     94    $self->print_txt_usage("");  # Use default resource bundle
    11395    die "\n";
    11496    }
  • trunk/gsdl/perllib/plugins/ConvertToRogPlug.pm

    r7243 r7353  
    4141        'inherits' => "yes" };
    4242
    43 sub print_usage {
    44     my ($plugin_name) = @_;
    45    
    46     # for when this function is called directly by pluginfo.pl
    47     if (ref ($plugin_name)) {
    48     $plugin_name = ref ($plugin_name);
    49     }
    50 
    51     print STDERR "\n  usage: plugin $plugin_name [options]\n\n";
    52     print STDERR "  options:\n";
    53     print STDERR "   [none at present]\n";
    54 }
    5543
    5644sub parse_args
     
    6755    print STDERR "\nIncorrect options passed to $plugin_name, ";
    6856    print STDERR "check your collect.cfg configuration file\n";
    69     &print_usage($plugin_name);
     57    $self->print_txt_usage("");  # Use default resource bundle
    7058    die "\n";
    7159    }
  • trunk/gsdl/perllib/plugins/ImagePlug.pm

    r6408 r7353  
    8080
    8181
    82 #  sub print_usage {
    83 #      my ($plugin_name) = @_;
    84 
    85 #      print STDERR "
    86 #    usage: plugin ImagePlug [options]
    87 
    88 #     -noscaleup         Don't scale up small images when making thumbnails
    89 
    90 #     -thumbnailsize n   Make thumbnails of size nxn
    91 
    92 #     -thumbnailtype s   Make thumbnails in format 's'
    93 
    94 #     -screenviewsize n  If set, makes an image of size n for screen display
    95 #                        and sets Screen, ScreenSize, ScrrenWidth and Screeneight
    96 #                        metadata.  By default it is not set.
    97 
    98 #     -screenviewtype s  If -screenviewsize is set, this sets the screen display
    99 #                        image type.  Defaults to jpg.
    100 
    101 #     -convertto s       Convert main inage to (gif|png|jpg)
    102 
    103 #     -minimumsize n     Ignore images smaller than n bytes
    104 
    105 #  "
    106 #  }
    10782
    10883sub new {
  • trunk/gsdl/perllib/plugins/MACROPlug.pm

    r6408 r7353  
    4747        'args'     => $arguments };
    4848
    49 #  sub print_usage {
    50 #      print STDERR "\n  usage: plugin MACROPlug [options]\n\n";
    51 #      print STDERR "  options:\n";
    52 #      print STDERR "   -title_sub\t     Substitution expression to modify string stored as Title.\n";
    53 #      print STDERR "\t\t     Used by, for example, PSPlug to remove \"Page 1\" etc from\n";
    54 #      print STDERR "\t\t     text used as the title.\n";
    55 
    56 #      print STDERR "\n";
    57 #  }
    58 
    5949
    6050sub load_language_table
  • trunk/gsdl/perllib/plugins/MARCPlug.pm

    r6408 r7353  
    6767#use MARC::Batch;
    6868
    69 #  sub print_usage {
    70 #      print STDERR "\n  usage: plugin MARCPlug [options]\n\n";
    71 #      print STDERR "  options:\n";
    72 #      print STDERR
    73 #  "   -metadata_mapping  Name of file that includes mapping details from MARC
    74 #                        values to Greenstone metadata names. Defaults to
    75 #                        'marctodc.txt' found in the site's etc directory.\n\n";
    76 #  }
    7769
    7870sub new {
  • trunk/gsdl/perllib/plugins/OAIPlug.pm

    r6408 r7353  
    4949        'inherits' => "yes",
    5050        'args'     => $arguments };
    51 
    52 #  sub print_usage {
    53 #      print STDERR "\n  usage: plugin OAIPlug [options]\n\n";
    54 #      print STDERR "  currently no options:\n";
    55 #  }
    5651
    5752sub new {
  • trunk/gsdl/perllib/plugins/PDFPlug.pm

    r7287 r7353  
    122122}
    123123
    124 
    125 #  sub print_usage {
    126 #      print STDERR "\n  usage: plugin PDFPlug [options]\n\n";
    127 #      print STDERR "  options:\n";
    128 #      print STDERR "   -convert_to (html|text) Convert to TEXT or HTML (default html)\n";
    129 #      print STDERR "   -use_sections     Create a separate section for each page\n";
    130 #      print STDERR "                     of the PDF file.\n";
    131 #      print STDERR "   -noimages         Don't attempt to extract images from PDF.\n";
    132 #      print STDERR "   -complex          Create more complex output. With this option\n";
    133 #      print STDERR "                     set the output html will look much more like\n";
    134 #      print STDERR "                     the original PDF file. For this to function\n";
    135 #      print STDERR "                     properly you Ghostscript installed (for *nix\n";
    136 #      print STDERR "                     gs should be on your path while for windows\n";
    137 #      print STDERR "                     you must have gswin32c.exe on your path).\n";
    138 #      print STDERR "   -nohidden         Prevent pdftohtml from attempting to extract\n";
    139 #      print STDERR "                     hidden text. This is only useful if the -complex\n";
    140 #      print STDERR "                     option is also set.";
    141 #      print STDERR "   -zoom             The factor by which to zoomthe PDF for output\n";
    142 #      print STDERR "                     (this is only useful if -complex is set).\n\n";
    143 #  }
    144 
    145 
    146 
    147124sub get_default_process_exp {
    148125    my $self = shift (@_);
  • trunk/gsdl/perllib/plugins/PSPlug.pm

    r6408 r7353  
    8585}
    8686
    87 #  sub print_usage {
    88 #      print STDERR "\n  usage: plugin PSPlug [options]\n\n";
    89 #      print STDERR "  options:\n";
    90 #      print STDERR "   -extract_date               Extract date from PS header\n";
    91 #      print STDERR "   -extract_pages              Extract pages from PS header\n";
    92 #      print STDERR "   -extract_title              Extract title from PS header\n";
    93 #      print STDERR "\n\nNote! This is a \"poor man's\" ps to text converter. If you are serious, consider\n";
    94 #      print STDERR "using the PRESCRIPT package, which is available for download at\n   http://www.nzdl.org/html/software.html\n\n";
    95 #  }
    9687
    9788sub get_default_block_exp {
  • trunk/gsdl/perllib/plugins/RecPlug.pm

    r6408 r7353  
    123123        'args'     => $arguments };
    124124
    125 #  sub print_usage {
    126 #      my ($plugin_name) = @_;
    127 
    128 #      print STDERR "
    129 #    usage: plugin RecPlug [options]
    130 
    131 #     -use_metadata_files  Read metadata from metadata XML files.
    132 
    133 #  "
    134 #  }
    135125
    136126my ($self);
  • trunk/gsdl/perllib/plugins/SRCPlug.pm

    r6408 r7353  
    6969        'args'     => $arguments };
    7070
    71 #  sub print_usage {
    72 #      print STDERR "\n  usage: plugin SRCPlug [options]\n";
    73 #      print STDERR "Try to import C and C++ source code. Adds \"class\"";
    74 #      print STDERR " metadata.\n\n";
    75 #      print STDERR "  options:\n";
    76 #      print STDERR "  -remove_prefix <pattern>   Remove this leading pattern from the filename\n";
    77 #      print STDERR "                             (eg -remove_prefix /tmp/XX/src/). The default is to\n";
    78 #      print STDERR "                             remove the whole path from the filename.\n";
    79 #      print STDERR "\n";
    80 #  }
    8171
    8272sub new {
  • trunk/gsdl/perllib/plugins/TEXTPlug.pm

    r6408 r7353  
    5757        'args'     => $arguments };
    5858
    59 #  sub print_usage {
    60 #      print STDERR "\n  usage: plugin TEXTPlug [options]\n\n";
    61 #      print STDERR "  options:\n";
    62 #      print STDERR "   -title_sub\t     Substitution expression to modify string stored as Title.\n";
    63 #      print STDERR "\t\t     Used by, for example, PSPlug to remove \"Page 1\" etc from\n";
    64 #      print STDERR "\t\t     text used as the title.\n";
    65 
    66 #      print STDERR "\n";
    67 #  }
    6859
    6960sub new {
  • trunk/gsdl/perllib/plugins/UnknownPlug.pm

    r7304 r7353  
    8282        'args'     => $arguments };
    8383
    84 #  sub print_usage {
    85 #      print STDERR "\n  usage: plugin UnknownPlug [options]\n\n";
    86 #      print STDERR "  options:\n";
    87 #      print STDERR "   -assoc_field\t     Name of the metadata field that will hold\n";
    88 #      print STDERR "\t\t     the associated file's name.\n";
    89 #      print STDERR "\n";
    90 #      print STDERR "   -file_type\t     Mime type of the file (e.g. image/gif)\n";
    91 #      print STDERR "\n";
    92 #  }
    9384
    9485sub new {
  • trunk/gsdl/perllib/plugins/W3ImgPlug.pm

    r6408 r7353  
    223223        'inherits' => "yes",
    224224        'args'     => $arguments };
    225 
    226 
    227 #  sub print_usage {
    228 #      print STDERR "\nUsage: plugin W3ImgPlug [options]\n\n";
    229 #      print STDERR "  options:\n";
    230 #      print STDERR "   -aggressiveness     Range of related text extraction techniques to use [4]\n";
    231 #      print STDERR "                        1: Filename, path, ALT text only\n";
    232 #      print STDERR "                        2: All of 1, plus caption where available\n";
    233 #      print STDERR "                        3: All of 2, plus near paragraphs where available\n";
    234 #      print STDERR "                        4: All of 3, plus previous headers (<h1>, <h2>...)\n";
    235 #      print STDERR "                           where available\n";
    236 #      print STDERR "                        5: All of 4, plus textual references where available\n";
    237 #      print STDERR "                        6: All of 4, plus page metatags (title, keywords, etc)\n";
    238 #      print STDERR "                        7: All of 6, 5 and 4 combined\n";
    239 #      print STDERR "                        8: All of 7, plus repeat caption, filename, etc (raise \n";
    240 #      print STDERR "                           ranking of more relevant results)\n";
    241 #      print STDERR "                        10: All of 1, plus full text of source page\n";
    242 #      print STDERR "\n";
    243 #      print STDERR "   -no_cache_images    Don't cache images (point to URL of original)\n";
    244 #      print STDERR "   -index_pages        Index the pages along with the images.\n";
    245 #      print STDERR "                       Otherwise reference the pages at the source URL\n";
    246 #      print STDERR "   -min_size           Bytes. Skip images smaller than this [2000]\n";
    247 #      print STDERR "   -min_width          Pixels. Skip images narrower than this [50 pixels]\n";
    248 #      print STDERR "   -min_height         Pixels. Skip images shorter than this [50 pixels]\n";
    249 #      print STDERR "   -thumb_size         Max thumbnail size. Both width and height [100 pixels]\n";
    250 #      print STDERR "   -convert_params     Additional parameters for ImageMagicK convert on\n";
    251 #      print STDERR "                       thumbnail creation. For example, '-raise' will give\n";
    252 #      print STDERR "                       a three dimensional effect to thumbnail images.\n";
    253 #      print STDERR "   -document_text      Add image text as document:text (otherwise IndexedText\n";
    254 #      print STDERR "                       metadata field)\n";
    255 #      print STDERR "\n";
    256 #      print STDERR " Advanced Options (applicability depends on aggressiveness level)\n";
    257 #      print STDERR "   -smallpage_threshold Images on pages smaller than this (bytes) will have\n";
    258 #      print STDERR "                        the page (title, keywords, etc) meta-data added [2048]\n";
    259 #      print STDERR "   -textrefs_threshold  Threshold for textual references. Lower values mean\n";
    260 #      print STDERR "                        the algorithm is less strict [2]\n";
    261 #      print STDERR "   -caption_length      Maximum length of captions (in characters) [100]\n";
    262 #      print STDERR "   -neartext_length     Target length of near text (in characters) [300]\n";
    263 #      print STDERR "   -max_near_text       Maximum characters near images to extract [400]\n";
    264 #      print STDERR "   -min_near_text       Minimum characters of near text or caption to extract [10]\n";
    265 #      print STDERR "\n";
    266 #      print STDERR " Tag set configuration file (XML format):\n";
    267 #      print STDERR "   <collectionpath>/etc/W3ImgPlug.cfg \n";
    268 #      print STDERR "\n";
    269 #      print STDERR "\n";
    270 #      print STDERR "W3ImgPlug inherits all of HTMLPlug's functionality and options:\n";
    271 #      HTMLPlug::print_usage();
    272 #      print STDERR "\n";
    273 #  }
    274225
    275226sub new {
Note: See TracChangeset for help on using the changeset viewer.