Ignore:
Timestamp:
2004-09-15T16:18:06+12:00 (20 years ago)
Author:
chi
Message:

Add the "FileFormat" metadata to each of the Plugins.

File:
1 edited

Legend:

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

    r7570 r8121  
    363363    $doc_obj->associate_file($filename, "doc.$doc_ext", undef, $cursection);
    364364
     365    my $file_type;
     366
     367    if ($doc_ext eq "doc") {
     368        $file_type = "Word";
     369    } elsif ($doc_ext eq "xls") {
     370    $file_type = "Excel";
     371    } elsif ($doc_ext eq "ppt") {
     372    $file_type = "PPT";
     373    } elsif ($doc_ext eq "pdf") {
     374    $file_type = "PDF";
     375    } elsif ($doc_ext eq "rtf") {
     376    $file_type = "RTF";
     377    }
     378
     379    my $file_format = $file_type || "unknown";
     380   
     381    $doc_obj->add_metadata($cursection, "FileFormat", $file_format);
     382
    365383    my $doclink = "<a href=\"_httpcollection_/index/assoc/[archivedir]/doc.$doc_ext\">";
    366384    $doc_obj->add_utf8_metadata ($cursection, "srclink",  $doclink);
Note: See TracChangeset for help on using the changeset viewer.