Changeset 3540 for trunk/gsdl/perllib/plugins/ReferPlug.pm
- Timestamp:
- 2002-11-18T17:43:56+13:00 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/ReferPlug.pm
r1676 r3540 25 25 # 26 26 ########################################################################### 27 28 27 29 28 # ReferPlug reads bibliography files in Refer format. … … 62 61 # 63 62 63 # 12/05/02 Added usage datastructure - John Thompson 64 64 65 65 package ReferPlug; 66 66 67 67 use SplitPlug; 68 69 68 70 69 # ReferPlug is a sub-class of BasPlug. … … 73 72 } 74 73 74 my $arguments = [ { 'name' => "process_exp", 75 '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).", 76 'type' => "string", 77 'deft' => q^(?i)\.bib$^, 78 'reqd' => "no" } ]; 79 80 my $options = { 'name' => "ReferPlug", 81 'desc' => "ReferPlug reads bibliography files in Refer format.\nBy Gordon W. Paynter (gwp\@cs.waikato.ac.nz), November 2000\n\nLoosely based on hcibib2Plug by Steve Jones (stevej\@cs.waikato.ac.nz). Which was based on EMAILPlug by Gordon Paynter (gwp\@cs.waikato.ac.nz). Which was based on old versions of HTMLplug and HCIBIBPlugby by Stefan Boddie and others -- it's hard to tell what came from where, now.\n\nReferPlug creates a document object for every reference in the file. It is a subclass of SplitPlug, so if there are multiple records, all are read.\n\nDocument text:\n\tThe document text consists of the reference in Refer format.\nMetadata:\n\t\$Creator \%A Author name\n\t\$Title \%T Title of article of book\n\t\$Journal \%J Title of Journal\n\t\$Booktitle \%B Title of book containing the publication\n\t\$Report \%R Type of Report, paper or thesis\n\t\$Volume \%V Volume Number of Journal\n\t\$Number \%N Number of Journal within Volume\n\t\$Editor \%E Editor name\n\t\$Pages \%P Page Number of article\n\t\$Publisher \%I Name of Publisher\n\t\$Publisheraddr \%C Publisher's address\n\t\$Date \%D Date of publication\n\t\$Keywords \%K Keywords associated with publication\n\t\$Abstract \%X Abstract of publication\n\t\$Copyright\t\%* Copyright information for the article", 82 'inherits' => "yes", 83 'args' => $arguments }; 84 75 85 # This plugin processes files with the suffix ".bib" 76 86 sub get_default_process_exp { … … 83 93 } 84 94 95 sub new { 96 my $class = shift (@_); 97 my $self = new SplitPlug ($class, @_); 98 99 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 100 my $option_list = $self->{'option_list'}; 101 push( @{$option_list}, $options ); 102 103 return bless $self, $class; 104 } 85 105 86 106 # The process function reads a single bibliogrphic record and stores
Note:
See TracChangeset
for help on using the changeset viewer.