Changeset 1554
- Timestamp:
- 2000-09-20T14:54:05+12:00 (24 years ago)
- Location:
- trunk/niupepa/perllib/plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/niupepa/perllib/plugins/AbstractPlug.pm
r1551 r1554 73 73 74 74 # process each issue 75 $$textref =~ s/ (<p(?:\s[^>]*)?>\s*\n76 77 78 79 80 81 (?:<table[^>]*>.*?<\/table>)?)# the table itself (may not always be defined)75 $$textref =~ s/<p(?:\s[^>]*)?>\s*\n 76 [^\n]+\n # series title line 77 <\/p>\n 78 <p(?:\s[^>]*)?>\s*\n 79 <b>(.*?)<\/b>.*?\n # issue line (i.e. volume, issue number, date) 80 <\/p>\n 81 (<table[^>]*>.*?<\/table>)? # the table itself (may not always be defined) 82 82 /$self->process_issue($1, $2, $seriesnum, $dir)/isgxe; 83 83 } … … 85 85 sub process_issue { 86 86 my $self = shift @_; 87 my ($ text, $issue, $seriesnum, $dir) = @_;87 my ($issue, $text, $seriesnum, $dir) = @_; 88 88 89 89 my $OID = $seriesnum . "_"; … … 108 108 } 109 109 110 # links to page numbers111 $text =~ s/(td(?:\s[^>]*)?>\s*\n112 <p(?:\s[^>]*)?>\s*\n)113 (pp?\s*\.\s*(\d+)(?:-\d+)?)(\s*\n)114 /$1<a href=\"_httpdocument_&cl=_cgiargcl_&d=${OID}\.$3\">$2<\/a>$4/isgx;115 116 110 my $abfile = &util::filename_cat ($dir, "$OID.abstract"); 117 111 open (ABFILE, ">$abfile") || die; 118 print ABFILE $text; 112 113 # links to page numbers 114 if (defined $text) { 115 $text =~ s/(td(?:\s[^>]*)?>\s*\n 116 <p(?:\s[^>]*)?>\s*\n) 117 (pp?\s*\.\s*(\d+)(?:-\d+)?)(\s*\n) 118 /$1<a href=\"_httpdocument_&cl=_cgiargcl_&d=${OID}\.$3&gg=prev\">$2<\/a>$4/isgx; 119 120 print ABFILE $text; 121 } else { 122 # some don't have any abstract information - we'll just use 123 # the issue line to prevent a completely empty page 124 print ABFILE $issue; 125 } 119 126 close ABFILE; 120 127 } … … 129 136 $$textref =~ s/\s*?(row|col)span=\"1\"//igs; # rowspan|colspan=1 don't seem real useful 130 137 $$textref =~ s/\s*?line\-height:[^;]+;//igs; # don't really want hard-coded line heights either 138 $$textref =~ s/(<td)/$1 valign=top/igs; # like to valign tables 131 139 132 140 # convert macron characters to _amn_ type macros -
trunk/niupepa/perllib/plugins/NPPlug.pm
r1043 r1554 198 198 my $doc_obj = new doc ($file, "indexed_doc"); 199 199 my $topsection = $doc_obj->get_top_section(); 200 my $cursection = $topsection;201 200 $self->associate_cover_images ($doc_obj, $dir, $issuekey); 202 201 $doc_obj->set_metadata_element ($topsection, 'Title', $self->get_title_string($file)); … … 216 215 $line =~ s/^\s+//; 217 216 $line =~ s/\s+$//; 218 $cursection = $doc_obj->insert_section($doc_obj->get_end_child($topsection));219 217 my ($pagenum) = $line =~ /(\d+)$/; 220 $doc_obj->set_metadata_element($cursection, 'Title', $pagenum); 221 $self->process_text ($dir, $line, $doc_obj, $cursection); 222 $self->process_images ($dir, $line, $doc_obj, $cursection); 218 $doc_obj->create_named_section($pagenum); 219 $doc_obj->set_metadata_element($pagenum, 'Title', $pagenum); 220 $self->process_text ($dir, $line, $doc_obj, $pagenum); 221 $self->process_images ($dir, $line, $doc_obj, $pagenum); 223 222 } 224 223 } … … 289 288 my $cursection = $doc_obj->get_top_section(); 290 289 $self->associate_cover_images ($doc_obj, $dir, $issuekey); 291 $doc_obj->set_metadata_element ($cursection, 'Title', "_abstract_ " . 292 $self->get_title_string($file)); 290 $doc_obj->set_metadata_element ($cursection, 'Title', $self->get_title_string($file)); 293 291 $self->set_main_metadata ($doc_obj, $dir); 294 292 map { $doc_obj->set_metadata_element ($cursection, $_, $meta->{$_}); } keys %$meta; … … 416 414 $title .= "_vol_ $vol" if defined $vol && $vol =~ /\w/; 417 415 if (defined $num && $num =~ /\w/) { 418 $title .= " :" if defined $vol && $vol =~ /\w/;416 $title .= ", " if defined $vol && $vol =~ /\w/; 419 417 $title .= "_num_ $num"; 420 418 }
Note:
See TracChangeset
for help on using the changeset viewer.