Changeset 2816 for trunk/gsdl
- Timestamp:
- 2001-11-05T16:29:23+13:00 (22 years ago)
- Location:
- trunk/gsdl/perllib/plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/BasPlug.pm
r2811 r2816 119 119 print STDERR " 14th century)\n"; 120 120 print STDERR " -no_bibliography Do not try and block bibliographic dates when extracting\n"; 121 print STDERR " historical dates.\n\n"; 121 print STDERR " historical dates.\n"; 122 print STDERR " -cover_image Will look for a prefix.jpg file (where prefix is the same\n"; 123 print STDERR " prefix as the file being processed) and associate it as a\n"; 124 print STDERR " cover image\n\n"; 122 125 } 123 126 … … 165 168 q^no_bibliography^, \$self->{'no_biblio'}, 166 169 qq^maximum_century/-?\\d{1,2}( ?B\\.C\\.E\\.)?/-1^, \$self->{'max_century'}, 170 q^cover_image^, \$self->{'cover_image'}, 167 171 "allow_extra_options")) { 168 172 … … 284 288 my ($filemeta) = $file =~ /([^\\\/]+)$/; 285 289 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Source", &ghtml::dmsafe($filemeta)); 290 if ($self->{'cover_image'}) { 291 $self->associate_cover_image($doc_obj, $filename); 292 } 286 293 287 294 # read in file ($text will be in utf8) … … 707 714 } 708 715 716 sub associate_cover_image { 717 my $self = shift(@_); 718 my ($doc_obj, $filename) = @_; 719 720 $filename =~ s/\.[^\\\/\.]+$/\.jpg/; 721 if (-e $filename) { 722 $doc_obj->associate_file($filename, "cover.jpg", "image/jpeg"); 723 } 724 } 725 709 726 1; -
trunk/gsdl/perllib/plugins/ConvertToPlug.pm
r2811 r2816 272 272 my ($filemeta) = $file =~ /([^\\\/]+)$/; 273 273 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Source", &ghtml::dmsafe($filemeta)); 274 if ($self->{'cover_image'}) { 275 $self->associate_cover_image($doc_obj, $filename); 276 } 274 277 275 278 # include any metadata passed in from previous plugins
Note:
See TracChangeset
for help on using the changeset viewer.