Changeset 12961
- Timestamp:
- 2006-10-01T12:12:31+13:00 (18 years ago)
- Location:
- trunk/gsdl/perllib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/ConvertToPlug.pm
r12741 r12961 62 62 'list' => $convert_to_list, 63 63 'deft' => "auto" }, 64 { 'name' => "keep_original_filename", 65 'desc' => "{ConvertToPlug.keep_original_filename}", 66 'type' => "flag" }, 64 67 { 'name' => "title_sub", 65 68 'desc' => "{HTMLPlug.title_sub}", … … 459 462 my $cursection = $doc_obj->get_top_section(); 460 463 my $filename = &util::filename_cat($base_dir, $file); 461 $doc_obj->associate_file($filename, "doc.$doc_ext", undef, $cursection); 464 my $assocfilename = "doc.$doc_ext"; 465 if ($self->{'keep_original_filename'} == 1) { 466 # this should be the same filename that was used for the Source metadata, as we will use [Source] in the srclink 467 ($assocfilename) = $file =~ /([^\\\/]+)$/; 468 } 469 $doc_obj->associate_file($filename, $assocfilename, undef, $cursection); 462 470 463 471 my $file_type; … … 481 489 # We use set instead of add here because we only want one value 482 490 $doc_obj->set_utf8_metadata_element($cursection, "FileFormat", $file_format); 483 484 491 my $doclink = "<a href=\"_httpprefix_/collect/[collection]/index/assoc/[archivedir]/doc.$doc_ext\">"; 492 if ($self->{'keep_original_filename'} == 1) { 493 $doclink = "<a href=\"_httpprefix_/collect/[collection]/index/assoc/[archivedir]/[Source]\">"; 494 } 485 495 $doc_obj->add_utf8_metadata ($cursection, "srclink", $doclink); 486 496 $doc_obj->add_utf8_metadata ($cursection, "srcicon", "_icon".$doc_ext."_"); -
trunk/gsdl/perllib/strings.properties
r12947 r12961 733 733 734 734 ConvertToPlug.desc:This plugin is inherited by such plugins as WordPlug, PPTPlug, PSPlug, RTFPlug and PDFPlug. It facilitates the conversion of these document types to either HTML, TEXT or a series of images. It works by dynamically loading an appropriate secondary plugin (HTMLPlug, StructuredHTMLPlug, PagedImgPlug or TEXTPlug) based on the plugin argument 'convert_to'. 735 735 ConvertToPlug.keep_original_filename:Keep the original filename for the associated file, rather than converting to doc.pdf, doc.doc etc. 736 736 ConvertToPlug.use_strings:If set, a simple strings function will be called to extract text if the conversion utility fails. 737 737
Note:
See TracChangeset
for help on using the changeset viewer.