Changeset 10725


Ignore:
Timestamp:
2005-10-14T13:39:40+13:00 (19 years ago)
Author:
chi
Message:

For some reasons, to change the date format to "yyymmdd" used "date" and can't recognise "Date". Therefore, adding some code to convert the metadata "Date" to "date" in the early stage.

File:
1 edited

Legend:

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

    r10513 r10725  
    786786
    787787    my $html_header=$1;
     788
    788789    # go through every <meta... tag defined in the html and see if it is
    789790    # one of the tags we want to match.
    790 
     791   
    791792    # special case for title - we want to remember if its been found
    792793    my $found_title = 0;
     
    811812        next;
    812813    }
    813 
     814   
    814815    # don't need to assign this field if it was passed in from a previous
    815816    # (recursive) plugin
     
    819820    $metatag =~ /content\s*=\s*([\"\'])?(.*?)\1/is;
    820821    $value=$2;
     822
    821823    if (! $value) {
    822824        $metatag =~ /(?:name|http-equiv)\s*=\s*([^\s\>]+)/is;
     
    835837        $tag='Creator';
    836838    } elsif (!exists $find_fields{lc($tag)}) {
    837         next; # don't want this tag
     839         next; # don't want this tag
    838840    } else {
    839841        # get the user's preferred capitalisation
     
    845847    print $outhandle " extracted \"$tag\" metadata \"$value\"\n"
    846848        if ($self->{'verbosity'} > 2);
     849    if ($tag =~ /date.*/i){
     850        $tag = lc($tag);
     851    }
    847852    $doc_obj->add_utf8_metadata($section, $tag, $value);
    848853
Note: See TracChangeset for help on using the changeset viewer.