Changeset 3168 for trunk/protemix/perllib
- Timestamp:
- 2002-06-23T22:58:30+12:00 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/protemix/perllib/plugins/ProtemixPlug.pm
r3162 r3168 75 75 } 76 76 77 # read in directory and process individual files78 77 my $dir = File::Basename::dirname($filename); 79 78 79 # associate article level pdf file 80 my ($pdffile) = $dir =~ /([^\/\\]+)$/; 81 $pdffile = &util::filename_cat($dir, $pdffile); 82 $pdffile .= "-all.pdf"; 83 die "$pdffile does not exist" unless -e $pdffile; 84 $doc_obj->associate_file($pdffile, "article.pdf", undef, $topsection); 85 $doc_obj->add_utf8_metadata ($cursection, "pdf", "article.pdf"); 86 87 # read in directory and process individual files 80 88 opendir(DIR, $dir) || die; 81 89 my @files = readdir DIR; … … 103 111 $self->process_section (\$text, '', $thisfile, $doc_obj, $cursection); 104 112 105 # associate PDF file with doc object113 # associate PDF page level pdf file 106 114 my $pdffile = $thisfile; 107 115 $pdffile =~ s/\.html?$/\.pdf/; 108 116 die "no PDF file for $thisfile" unless -e $pdffile; 109 $doc_obj->associate_file($pdffile, "doc$count.pdf", undef, $cursection); 110 my $doclink = "<a href=\"_httpcollection_/index/assoc/[parent(Top):archivedir]/doc$count.pdf\">"; 111 # $doc_obj->add_utf8_metadata ($cursection, "srclink", $doclink); 117 $doc_obj->associate_file($pdffile, "page$count.pdf", undef, $cursection); 118 $doc_obj->add_utf8_metadata ($cursection, "pdf", "page$count.pdf"); 112 119 $doc_obj->add_utf8_metadata ($cursection, "Title", $count); 113 120 114 121 # add any section level metadata we have for this page (set from within the meta.xml file) 115 #if (defined ($self->{'section_metadata'}->{$filesuf})) {116 #foreach my $key (keys %{$self->{'section_metadata'}->{$filesuf}}) {117 #$doc_obj->add_utf8_metadata ($cursection, $key, $self->{'section_metadata'}->{$filesuf}->{$key});118 #}119 #}122 if (defined ($self->{'section_metadata'}->{$filesuf})) { 123 foreach my $key (keys %{$self->{'section_metadata'}->{$filesuf}}) { 124 $doc_obj->add_utf8_metadata ($cursection, $key, $self->{'section_metadata'}->{$filesuf}->{$key}); 125 } 126 } 120 127 121 128 $count ++;
Note:
See TracChangeset
for help on using the changeset viewer.