- Timestamp:
- 2007-06-13T16:24:36+12:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/PagedImgPlug.pm
r14174 r14176 371 371 # add NoText metadata which can be used to suppress the dummy text 372 372 $doc_obj->add_metadata ($section, "NoText", "1"); 373 374 373 375 374 if ($type eq "unknown" && $image_type) { 376 375 $type = $image_type; … … 685 684 { 686 685 my $self = shift (@_); 687 my ($pluginfo, $base_dir, $file, $metadata, $processor, $maxdocs, $total_count, $gli) = @_; 688 689 my ($process_status,$doc_obj) = $self->read_into_doc_obj(@_); 686 my ($pluginfo, $base_dir, $file, $metadata, $processor, $maxdocs, $total_count, $gli) = @_; my ($process_status,$doc_obj) = $self->read_into_doc_obj(@_); 690 687 691 688 if ((defined $process_status) && ($process_status == 1)) { … … 744 741 if (defined($txtfile)&& $txtfile ne "") { 745 742 $self->process_text ($self->{'base_dir'}.$txtfile, $txtfile, $doc_obj, $self->{'current_section'}); 743 $doc_obj->set_metadata_element($self->{'current_section'},"NoText","0"); 746 744 } else { 747 745 # otherwise add in some dummy text … … 749 747 my $text = &gsprintf::lookup_string("{BasPlug.dummy_text}",1); 750 748 $doc_obj->add_utf8_text($self->{'current_section'}, $text); 749 $doc_obj->add_metadata($self->{'current_section'},"NoText","1"); 751 750 } 752 751 } elsif ($element eq "Metadata") { … … 851 850 852 851 $doc_obj->add_metadata ($topsection, "Source", $file); 853 854 852 855 853 open (ITEMFILE, $filename) || die "couldn't open $filename\n"; … … 874 872 # the page number becomes the Title 875 873 $doc_obj->set_utf8_metadata_element($cursection, 'Title', $pagenum); 876 # add NoText metadata which can be used to suppress the dummy text 877 $doc_obj->add_metadata($cursection, "NoText", "1"); 878 874 879 875 # process the image for this page if there is one 880 876 if (defined $imgname && $imgname ne "") { … … 889 885 if (defined $txtname && $txtname ne "") { 890 886 my $result2 = $self->process_text ($dir.$txtname, $txtname, $doc_obj, $cursection); 887 891 888 if (!defined $result2) { 892 889 print "PagedImgPlug: couldn't process text file \"$dir.$txtname\" for item \"$filename\"\n"; 890 } 891 else{ 892 $doc_obj->set_metadata_element($cursection, "NoText", "0"); 893 893 } 894 894 } else { 895 895 # otherwise add in some dummy text 896 896 $doc_obj->add_text($cursection, &gsprintf::lookup_string("{BasPlug.dummy_text}")); 897 } 897 # add NoText metadata which can be used to suppress the dummy text 898 } 898 899 } 899 900 }
Note:
See TracChangeset
for help on using the changeset viewer.