Changeset 10978 for trunk


Ignore:
Timestamp:
2005-12-09T10:25:22+13:00 (18 years ago)
Author:
kjdon
Message:

added assoc_field option to NULPlug

Location:
trunk/gsdl/perllib
Files:
2 edited

Legend:

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

    r10254 r10978  
    4646}
    4747
    48 my $arguments = [
    49          ];
     48my $arguments =
     49    [
     50     { 'name' => "assoc_field",
     51       'desc' => "{NULPlug.assoc_field}",
     52       'type' => "string",
     53       'deft' => "",
     54       'reqd' => "no" }
     55     ];
    5056
    5157my $options = { 'name'     => "NULPlug",
    5258        'desc'     => "{NULPlug.desc}",
    5359        'abstract' => "no",
    54         'inherits' => "yes" };
    55     #   'args'     => $arguments };
     60        'inherits' => "yes",
     61                 'args'     => $arguments };
    5662
    5763
     
    108114    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Plugin", "$self->{'plugin_type'}");
    109115    $doc_obj->add_metadata($doc_obj->get_top_section(), "Source", &ghtml::dmsafe($file)); # set the filename as Source metadata to be consistent with other plugins
     116
    110117    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "FileSize", (-s $filename));
    111118
     119    my $assoc_field = $self->{'assoc_field'} || "null_file";
     120    $doc_obj->add_metadata ($doc_obj->get_top_section(), $assoc_field, $file);
     121   
    112122    #create an empty text string so we don't break downstream plugins
    113123    my $text = &gsprintf::lookup_string("{BasPlug.dummy_text}");
  • trunk/gsdl/perllib/strings.rb

    r10664 r10978  
    731731NULPlug.desc:Dummy (.nul) file plugin. Used with the files produced by exploding metadata database files.
    732732
    733 OAIPlug.desc:Basic Open Archives Initiate (OAI) plugin.
     733NULPlug.assoc_field:Name of a metadata field that will be set for each nul file.
     734OAIPlug.desc:Basic Open Archives Initiative (OAI) plugin.
    734735
    735736OggVorbisPlug.add_technical_metadata:Add technical (eg. bitrate) metadata.
Note: See TracChangeset for help on using the changeset viewer.