Ignore:
Timestamp:
2002-11-18T17:43:56+13:00 (22 years ago)
Author:
kjdon
Message:

added John T's changes into CVS - added info to enable retrieval of usage info in xml

File:
1 edited

Legend:

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

    r1676 r3540  
    2525#
    2626###########################################################################
    27 
    2827
    2928# ReferPlug reads bibliography files in Refer format.
     
    6261#
    6362
     63# 12/05/02 Added usage datastructure - John Thompson
    6464
    6565package ReferPlug;
    6666
    6767use SplitPlug;
    68 
    6968
    7069# ReferPlug is a sub-class of BasPlug.
     
    7372}
    7473
     74my $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
     80my $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
    7585# This plugin processes files with the suffix ".bib"
    7686sub get_default_process_exp {
     
    8393}
    8494
     95sub 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}
    85105
    86106# The process function reads a single bibliogrphic record and stores
Note: See TracChangeset for help on using the changeset viewer.