Changeset 1047


Ignore:
Timestamp:
2000-03-31T14:32:13+12:00 (21 years ago)
Author:
nzdl
Message:

add multiple facsimiles as separate metadata elements rather than
comma separated list

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cstr/perllib/plugins/PrePlug.pm

    r891 r1047  
    214214        $value =~ s/\s+$//;
    215215        my @facsimiles = split /\s+/, $value;
    216         $value = join ",", @facsimiles;
    217216        foreach $facsimile (@facsimiles) {
    218217            # assume images are in the same directory
     
    221220            my ($imagetype) = $facsimile =~ /\.([^\.]*)$/;
    222221            $doc_obj->associate_file($imagefile, $facsimile, "image/" . $imagetype);
     222            # add metadata for each facsimile
     223            $doc_obj->add_metadata ($doc_obj->get_top_section(), $key, $facsimile);
    223224            } else {
    224225            print STDERR "PrePlug: Warning - facsimile file $imagefile doesn't exist\n";
    225             next;
    226226            }
    227227        }
     228        # we've already added facsimile metadata
     229        next;
     230
    228231        } elsif ($key =~ /^figures$/i) {
    229232        $value =~ s/^\s+//;
Note: See TracChangeset for help on using the changeset viewer.