Ignore:
Timestamp:
2003-06-20T14:22:34+12:00 (21 years ago)
Author:
mdewsnip
Message:

Tidied up and structures (representing the options of the plugin) in preparation for removing the print_usage() routines.

File:
1 edited

Legend:

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

    r4724 r4744  
    3232}
    3333
    34 
    35 
    36 my $arguments = [ { 'name' => "process_exp",
    37             'desc' => "A perl regular expression to match against filenames. Matching filenames will be processed by this plugin. Each plugin has its own default process_exp. e.g HTMLPlug defaults to '(?i)\.html?\$' i.e. all documents ending in .htm or .html (case-insensitive).",
    38             'type' => "string",
    39             'deft' => q^(?i)(\.jpe?g|\.gif|\.png|\.bmp|\.xbm|\.tif?f)$^,
    40             'reqd' => "no" },
    41           { 'name' => "noscaleup",
    42             'desc' => "Don't scale up small images when making thumbnails.",
    43             'type' => "flag",
    44             'reqd' => "no" },
    45           { 'name' => "thumbnailsize",
    46             'desc' => "Make thumbnails of size nxn.",
    47             'type' => "int",
    48             'reqd' => "no" },
    49           { 'name' => "thumbnailtype",
    50             'desc' => "Make thumbnails in format 's'.",
    51             'type' => "string",
    52             'reqd' => "no" },
    53           { 'name' => "screenviewsize",
    54             'desc' => "If set, makes an image of size n for screen display and sets Screen, ScreenSize, ScreenWidth and ScreenHeight metadata.  By default it is not set.",
    55             'type' => "int",
    56             'reqd' => "no" },
    57           { 'name' => "screenviewtype",
    58             'desc' => "If -screenviewsize is set, this sets the screen display image type.  Defaults to jpg.",
    59             'type' => "string",
    60             'deft' => "jpg",
    61             'reqd' => "no" },
    62           { 'name' => "convertto",
    63             'desc' => "Convert main image to.",
    64             'type' => "string",
    65             'reqd' => "no" },
    66           { 'name' => "minimumsize",
    67             'desc' => "Ignore images smaller than n bytes.",
    68             'type' => "int",
    69             'reqd' => "no" } ];
     34my $arguments =
     35    [ { 'name' => "process_exp",
     36    'desc' => "A perl regular expression to match against filenames. Matching filenames will be processed by this plugin. For example, using '(?i).html?\$' matches all documents ending in .htm or .html (case-insensitive).",
     37    'type' => "string",
     38    'deft' => &get_default_process_exp(),
     39    'reqd' => "no" },
     40      { 'name' => "noscaleup",
     41    'desc' => "Don't scale up small images when making thumbnails.",
     42    'type' => "flag",
     43    'reqd' => "no" },
     44      { 'name' => "thumbnailsize",
     45    'desc' => "Make thumbnails of size nxn.",
     46    'type' => "int",
     47    'deft' => "100",
     48    'reqd' => "no" },
     49      { 'name' => "thumbnailtype",
     50    'desc' => "Make thumbnails in format 's'.",
     51    'type' => "string",
     52    'deft' => "gif",
     53    'reqd' => "no" },
     54      { 'name' => "screenviewsize",
     55    'desc' => "If set, makes an image of size n for screen display and sets Screen, ScreenSize, ScreenWidth and ScreenHeight metadata.  By default it is not set.",
     56    'type' => "int",
     57    'deft' => "0",
     58    'reqd' => "no" },
     59      { 'name' => "screenviewtype",
     60    'desc' => "If -screenviewsize is set, this sets the screen display image type.",
     61    'type' => "string",
     62    'deft' => "jpg",
     63    'reqd' => "no" },
     64      { 'name' => "converttotype",
     65    'desc' => "Convert main image to.",
     66    'type' => "string",
     67    'deft' => "",
     68    'reqd' => "no" },
     69      { 'name' => "minimumsize",
     70    'desc' => "Ignore images smaller than n bytes.",
     71    'type' => "int",
     72    'deft' => "100",
     73    'reqd' => "no" } ];
    7074
    7175my $options = { 'name'     => "ImagePlug",
Note: See TracChangeset for help on using the changeset viewer.