Changeset 4785
- Timestamp:
- 2003-06-24T14:30:33+12:00 (21 years ago)
- Location:
- trunk/gsdl/perllib/plugins
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/BasPlug.pm
r4778 r4785 330 330 # } 331 331 332 # print_usage should be overridden for any sub-classes having333 # their own plugin specific options334 332 # sub print_usage { 335 333 # print STDERR "\nThis plugin has no plugin specific options\n\n"; -
trunk/gsdl/perllib/plugins/DBPlug.pm
r4744 r4785 61 61 'args' => $arguments }; 62 62 63 sub print_usage {64 print STDERR "\n usage: plugin DBPlug [options]\n\n";65 print STDERR " options:\n";66 print STDERR "\n";67 }63 # sub print_usage { 64 # print STDERR "\n usage: plugin DBPlug [options]\n\n"; 65 # print STDERR " options:\n"; 66 # print STDERR "\n"; 67 # } 68 68 69 69 sub new { … … 78 78 "allow_extra_options")) { 79 79 print STDERR "\nIncorrect options passed to DBPlug, check your collect.cfg configuration file\n"; 80 &print_usage();80 $self->print_txt_usage(); 81 81 die "\n"; 82 82 } -
trunk/gsdl/perllib/plugins/EMAILPlug.pm
r4744 r4785 80 80 } 81 81 82 sub print_usage { 83 print STDERR "\n usage: plugin EMAILPlug [options]\n\n"; 84 print STDERR " options:\n"; 85 print STDERR " -split_exp A perl regular expression used to split files\n"; 86 print STDERR " containing many messages into individual documents.\n\n"; 87 print STDERR " -no_attachments Do not save message attachments.\n\n"; 88 89 } 82 # sub print_usage { 83 # print STDERR "\n usage: plugin EMAILPlug [options]\n\n"; 84 # print STDERR " options:\n"; 85 # print STDERR " -split_exp A perl regular expression used to split files\n"; 86 # print STDERR " containing many messages into individual documents.\n\n"; 87 # print STDERR " -no_attachments Do not save message attachments.\n\n"; 88 # } 90 89 91 90 my $arguments = … … 127 126 print STDERR "\nIncorrect options passed to $class."; 128 127 print STDERR "\nCheck your collect.cfg configuration file\n"; 128 $self->print_txt_usage(); 129 129 die "\n"; 130 130 } -
trunk/gsdl/perllib/plugins/HTMLPlug.pm
r4748 r4785 160 160 161 161 print STDERR "\nIncorrect options passed to HTMLPlug, check your collect.cfg configuration file\n"; 162 &print_usage();162 $self->print_txt_usage(); 163 163 die "\n"; 164 164 } -
trunk/gsdl/perllib/plugins/ImagePlug.pm
r4744 r4785 79 79 80 80 81 sub print_usage {82 my ($plugin_name) = @_;83 84 print STDERR "85 usage: plugin ImagePlug [options]86 87 -noscaleup Don't scale up small images when making thumbnails88 89 -thumbnailsize n Make thumbnails of size nxn90 91 -thumbnailtype s Make thumbnails in format 's'92 93 -screenviewsize n If set, makes an image of size n for screen display94 and sets Screen, ScreenSize, ScrrenWidth and Screeneight95 metadata. By default it is not set.96 97 -screenviewtype s If -screenviewsize is set, this sets the screen display98 image type. Defaults to jpg.99 100 -convertto s Convert main inage to (gif|png|jpg)101 102 -minimumsize n Ignore images smaller than n bytes103 104 "105 }81 # sub print_usage { 82 # my ($plugin_name) = @_; 83 84 # print STDERR " 85 # usage: plugin ImagePlug [options] 86 87 # -noscaleup Don't scale up small images when making thumbnails 88 89 # -thumbnailsize n Make thumbnails of size nxn 90 91 # -thumbnailtype s Make thumbnails in format 's' 92 93 # -screenviewsize n If set, makes an image of size n for screen display 94 # and sets Screen, ScreenSize, ScrrenWidth and Screeneight 95 # metadata. By default it is not set. 96 97 # -screenviewtype s If -screenviewsize is set, this sets the screen display 98 # image type. Defaults to jpg. 99 100 # -convertto s Convert main inage to (gif|png|jpg) 101 102 # -minimumsize n Ignore images smaller than n bytes 103 104 # " 105 # } 106 106 107 107 sub new { … … 127 127 print STDERR "\nImagePlug uses an incorrect option.\n"; 128 128 print STDERR "Check your collect.cfg configuration file.\n"; 129 &print_usage($plugin_name);129 $self->print_txt_usage(); 130 130 die "\n"; 131 131 } -
trunk/gsdl/perllib/plugins/MACROPlug.pm
r4744 r4785 46 46 'args' => $arguments }; 47 47 48 sub print_usage {49 print STDERR "\n usage: plugin MACROPlug [options]\n\n";50 print STDERR " options:\n";51 print STDERR " -title_sub\t Substitution expression to modify string stored as Title.\n";52 print STDERR "\t\t Used by, for example, PSPlug to remove \"Page 1\" etc from\n";53 print STDERR "\t\t text used as the title.\n";54 55 print STDERR "\n";56 }48 # sub print_usage { 49 # print STDERR "\n usage: plugin MACROPlug [options]\n\n"; 50 # print STDERR " options:\n"; 51 # print STDERR " -title_sub\t Substitution expression to modify string stored as Title.\n"; 52 # print STDERR "\t\t Used by, for example, PSPlug to remove \"Page 1\" etc from\n"; 53 # print STDERR "\t\t text used as the title.\n"; 54 55 # print STDERR "\n"; 56 # } 57 57 58 58 -
trunk/gsdl/perllib/plugins/MARCPlug.pm
r4744 r4785 53 53 use MARC::Batch; 54 54 55 sub print_usage {56 print STDERR "\n usage: plugin MARCPlug [options]\n\n";57 print STDERR " options:\n";58 print STDERR59 " -metadata_mapping Name of file that includes mapping details from MARC60 values to Greenstone metadata names. Defaults to61 'marctodc.txt' found in the site's etc directory.\n\n";62 }55 # sub print_usage { 56 # print STDERR "\n usage: plugin MARCPlug [options]\n\n"; 57 # print STDERR " options:\n"; 58 # print STDERR 59 # " -metadata_mapping Name of file that includes mapping details from MARC 60 # values to Greenstone metadata names. Defaults to 61 # 'marctodc.txt' found in the site's etc directory.\n\n"; 62 # } 63 63 64 64 sub new { … … 73 73 74 74 print STDERR "\nIncorrect options passed to MARCPlug, check your collect.cfg configuration file\n"; 75 &print_usage();75 $self->print_txt_usage(); 76 76 die "\n"; 77 77 } -
trunk/gsdl/perllib/plugins/OAIPlug.pm
r4747 r4785 40 40 'inherits' => "yes" }; 41 41 42 sub print_usage {43 print STDERR "\n usage: plugin OAIPlug [options]\n\n";44 print STDERR " currently no options:\n";45 }42 # sub print_usage { 43 # print STDERR "\n usage: plugin OAIPlug [options]\n\n"; 44 # print STDERR " currently no options:\n"; 45 # } 46 46 47 47 sub new { … … 53 53 54 54 print STDERR "\nIncorrect options passed to OAIPlug, check your collect.cfg configuration file\n"; 55 &print_usage();55 $self->print_txt_usage(); 56 56 die "\n"; 57 57 } -
trunk/gsdl/perllib/plugins/PDFPlug.pm
r4744 r4785 78 78 79 79 print STDERR "\nIncorrect options passed to PDFPlug, check your collect.cfg configuration file\n"; 80 &print_usage(); 80 local $self = new ConvertToPlug($class, @_, "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?'); 81 $self->print_txt_usage(); 81 82 die "\n"; 82 83 } … … 118 119 119 120 120 sub print_usage {121 print STDERR "\n usage: plugin PDFPlug [options]\n\n";122 print STDERR " options:\n";123 print STDERR " -convert_to (html|text) Convert to TEXT or HTML (default html)\n";124 print STDERR " -use_sections Create a separate section for each page\n";125 print STDERR " of the PDF file.\n";126 print STDERR " -noimages Don't attempt to extract images from PDF.\n";127 print STDERR " -complex Create more complex output. With this option\n";128 print STDERR " set the output html will look much more like\n";129 print STDERR " the original PDF file. For this to function\n";130 print STDERR " properly you Ghostscript installed (for *nix\n";131 print STDERR " gs should be on your path while for windows\n";132 print STDERR " you must have gswin32c.exe on your path).\n";133 print STDERR " -nohidden Prevent pdftohtml from attempting to extract\n";134 print STDERR " hidden text. This is only useful if the -complex\n";135 print STDERR " option is also set.";136 print STDERR " -zoom The factor by which to zoomthe PDF for output\n";137 print STDERR " (this is only useful if -complex is set).\n\n";138 }121 # sub print_usage { 122 # print STDERR "\n usage: plugin PDFPlug [options]\n\n"; 123 # print STDERR " options:\n"; 124 # print STDERR " -convert_to (html|text) Convert to TEXT or HTML (default html)\n"; 125 # print STDERR " -use_sections Create a separate section for each page\n"; 126 # print STDERR " of the PDF file.\n"; 127 # print STDERR " -noimages Don't attempt to extract images from PDF.\n"; 128 # print STDERR " -complex Create more complex output. With this option\n"; 129 # print STDERR " set the output html will look much more like\n"; 130 # print STDERR " the original PDF file. For this to function\n"; 131 # print STDERR " properly you Ghostscript installed (for *nix\n"; 132 # print STDERR " gs should be on your path while for windows\n"; 133 # print STDERR " you must have gswin32c.exe on your path).\n"; 134 # print STDERR " -nohidden Prevent pdftohtml from attempting to extract\n"; 135 # print STDERR " hidden text. This is only useful if the -complex\n"; 136 # print STDERR " option is also set."; 137 # print STDERR " -zoom The factor by which to zoomthe PDF for output\n"; 138 # print STDERR " (this is only useful if -complex is set).\n\n"; 139 # } 139 140 140 141 -
trunk/gsdl/perllib/plugins/PSPlug.pm
r4744 r4785 77 77 "allow_extra_options")) { 78 78 print STDERR "\nIncorrect options passed to HTMLPlug, check your collect.cfg configuration file\n"; 79 &print_usage();79 $self->print_txt_usage(); 80 80 die "\n"; 81 81 } … … 84 84 } 85 85 86 sub print_usage {87 print STDERR "\n usage: plugin PSPlug [options]\n\n";88 print STDERR " options:\n";89 print STDERR " -extract_date Extract date from PS header\n";90 print STDERR " -extract_pages Extract pages from PS header\n";91 print STDERR " -extract_title Extract title from PS header\n";92 print STDERR "\n\nNote! This is a \"poor man's\" ps to text converter. If you are serious, consider\n";93 print STDERR "using the PRESCRIPT package, which is available for download at\n http://www.nzdl.org/html/software.html\n\n";94 }86 # sub print_usage { 87 # print STDERR "\n usage: plugin PSPlug [options]\n\n"; 88 # print STDERR " options:\n"; 89 # print STDERR " -extract_date Extract date from PS header\n"; 90 # print STDERR " -extract_pages Extract pages from PS header\n"; 91 # print STDERR " -extract_title Extract title from PS header\n"; 92 # print STDERR "\n\nNote! This is a \"poor man's\" ps to text converter. If you are serious, consider\n"; 93 # print STDERR "using the PRESCRIPT package, which is available for download at\n http://www.nzdl.org/html/software.html\n\n"; 94 # } 95 95 96 96 sub get_default_block_exp { -
trunk/gsdl/perllib/plugins/RecPlug.pm
r4744 r4785 122 122 'args' => $arguments }; 123 123 124 sub print_usage {125 my ($plugin_name) = @_;126 127 print STDERR "128 usage: plugin RecPlug [options]129 130 -use_metadata_files Read metadata from metadata XML files.131 132 "133 }124 # sub print_usage { 125 # my ($plugin_name) = @_; 126 127 # print STDERR " 128 # usage: plugin RecPlug [options] 129 130 # -use_metadata_files Read metadata from metadata XML files. 131 132 # " 133 # } 134 134 135 135 my ($self); … … 149 149 print STDERR "\nRecPlug uses an incorrect option.\n"; 150 150 print STDERR "Check your collect.cfg configuration file.\n\n"; 151 &print_usage("RecPlug");151 $self->print_txt_usage(); 152 152 die "\n"; 153 153 } -
trunk/gsdl/perllib/plugins/SRCPlug.pm
r4744 r4785 68 68 'args' => $arguments }; 69 69 70 sub print_usage {71 print STDERR "\n usage: plugin SRCPlug [options]\n";72 print STDERR "Try to import C and C++ source code. Adds \"class\"";73 print STDERR " metadata.\n\n";74 print STDERR " options:\n";75 print STDERR " -remove_prefix <pattern> Remove this leading pattern from the filename\n";76 print STDERR " (eg -remove_prefix /tmp/XX/src/). The default is to\n";77 print STDERR " remove the whole path from the filename.\n";78 print STDERR "\n";79 }70 # sub print_usage { 71 # print STDERR "\n usage: plugin SRCPlug [options]\n"; 72 # print STDERR "Try to import C and C++ source code. Adds \"class\""; 73 # print STDERR " metadata.\n\n"; 74 # print STDERR " options:\n"; 75 # print STDERR " -remove_prefix <pattern> Remove this leading pattern from the filename\n"; 76 # print STDERR " (eg -remove_prefix /tmp/XX/src/). The default is to\n"; 77 # print STDERR " remove the whole path from the filename.\n"; 78 # print STDERR "\n"; 79 # } 80 80 81 81 sub new { … … 94 94 print STDERR "\nIncorrect options passed to SRCPlug, "; 95 95 print STDERR "check your collect.cfg configuration file\n"; 96 &print_usage();96 $self->print_txt_usage(); 97 97 die "\n"; 98 98 } -
trunk/gsdl/perllib/plugins/TEXTPlug.pm
r4744 r4785 56 56 'args' => $arguments }; 57 57 58 sub print_usage {59 print STDERR "\n usage: plugin TEXTPlug [options]\n\n";60 print STDERR " options:\n";61 print STDERR " -title_sub\t Substitution expression to modify string stored as Title.\n";62 print STDERR "\t\t Used by, for example, PSPlug to remove \"Page 1\" etc from\n";63 print STDERR "\t\t text used as the title.\n";58 # sub print_usage { 59 # print STDERR "\n usage: plugin TEXTPlug [options]\n\n"; 60 # print STDERR " options:\n"; 61 # print STDERR " -title_sub\t Substitution expression to modify string stored as Title.\n"; 62 # print STDERR "\t\t Used by, for example, PSPlug to remove \"Page 1\" etc from\n"; 63 # print STDERR "\t\t text used as the title.\n"; 64 64 65 print STDERR "\n";66 }65 # print STDERR "\n"; 66 # } 67 67 68 68 sub new { … … 78 78 "allow_extra_options")) { 79 79 print STDERR "\nIncorrect options passed to TEXTPlug, check your collect.cfg configuration file\n"; 80 &print_usage();80 $self->print_txt_usage(); 81 81 die "\n"; 82 82 } -
trunk/gsdl/perllib/plugins/UnknownPlug.pm
r4744 r4785 81 81 'args' => $arguments }; 82 82 83 sub print_usage {84 print STDERR "\n usage: plugin UnknownPlug [options]\n\n";85 print STDERR " options:\n";86 print STDERR " -assoc_field\t Name of the metadata field that will hold\n";87 print STDERR "\t\t the associated file's name.\n";88 print STDERR "\n";89 print STDERR " -file_type\t Mime type of the file (e.g. image/gif)\n";90 print STDERR "\n";91 }83 # sub print_usage { 84 # print STDERR "\n usage: plugin UnknownPlug [options]\n\n"; 85 # print STDERR " options:\n"; 86 # print STDERR " -assoc_field\t Name of the metadata field that will hold\n"; 87 # print STDERR "\t\t the associated file's name.\n"; 88 # print STDERR "\n"; 89 # print STDERR " -file_type\t Mime type of the file (e.g. image/gif)\n"; 90 # print STDERR "\n"; 91 # } 92 92 93 93 sub new { … … 104 104 "allow_extra_options")) { 105 105 print STDERR "\nIncorrect options passed to UnknownPlug, check your collect.cfg configuration file\n"; 106 &print_usage();106 $self->print_txt_usage(); 107 107 die "\n"; 108 108 } -
trunk/gsdl/perllib/plugins/W3ImgPlug.pm
r4744 r4785 225 225 226 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 }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 # } 274 274 275 275 sub new { … … 301 301 302 302 print STDERR "\nIncorrect options passed to W3ImgPlug, check your collect.cfg configuration file\n"; 303 &print_usage();303 $self->print_txt_usage(); 304 304 die "\n"; 305 305 }
Note:
See TracChangeset
for help on using the changeset viewer.