Changeset 6968 for trunk/gsdl/perllib/classify/Collage.pm
- Timestamp:
- 2004-03-08T15:39:43+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/classify/Collage.pm
r6808 r6968 24 24 ########################################################################### 25 25 26 # simple list classifier plugin 27 # options are: 28 # metadata=Metaname -- (optional) all documents with Metaname metadata 29 # will be included in list. if not included all documents 30 # will be included in list. 31 # sort=Meta -- (optional) sort documents in list alphabetically by 32 # Meta. by default it will sort by Metaname, if neither 33 # are set documents will be in build (random) order. 34 # Meta may be Filename to sort by original filename or 35 # nosort to force not to sort 36 # buttonname=Title -- (optional) the title field for this classification. 37 # if not included title field will be Metaname. 38 # if metadata is also not included title will be 'List' 39 40 # 12/05/02 Added usage datastructure - John Thompson 26 package Collage; 41 27 42 28 use BasClas; 43 package Collage;44 45 29 use sorttools; 46 30 … … 51 35 my $arguments = 52 36 [ { 'name' => "buttonname", 53 'desc' => "{ Collage.buttonname}",37 'desc' => "{BasClas.buttonname}", 54 38 'type' => "string", 55 'deft' => " Metadata element specified with -metadata",39 'deft' => "Collage", 56 40 'reqd' => "no" }]; 57 41 … … 61 45 'args' => $arguments }; 62 46 63 # sub print_usage {64 # print STDERR "65 # usage: classify List [options]66 # options:67 68 # -buttonname X (optional) Title field for this classification.69 # if not included title field will be Metaname.70 # ";71 # }72 47 73 48 sub new { … … 75 50 my $self = new BasClas($class, @_); 76 51 77 # 14-05-02 To allow for proper inheritance of arguments - John Thompson78 52 my $option_list = $self->{'option_list'}; 79 53 push( @{$option_list}, $options ); 54 55 if ($self->{'info_only'}) { 56 # created from classinfo.pl - don't need to parse the arguments 57 return bless $self, $class; 58 } 80 59 81 60 my ($title, $list);
Note:
See TracChangeset
for help on using the changeset viewer.