Ignore:
Timestamp:
2000-09-20T14:54:05+12:00 (24 years ago)
Author:
sjboddie
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/niupepa/perllib/plugins/AbstractPlug.pm

    r1551 r1554  
    7373
    7474    # process each issue
    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)
     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)
    8282              /$self->process_issue($1, $2, $seriesnum, $dir)/isgxe;
    8383}
     
    8585sub process_issue {
    8686    my $self = shift @_;
    87     my ($text, $issue, $seriesnum, $dir) = @_;
     87    my ($issue, $text, $seriesnum, $dir) = @_;
    8888
    8989    my $OID = $seriesnum . "_";
     
    108108    }
    109109
    110     # links to page numbers
    111     $text =~ s/(td(?:\s[^>]*)?>\s*\n
    112         <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 
    116110    my $abfile = &util::filename_cat ($dir, "$OID.abstract");
    117111    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    }
    119126    close ABFILE;
    120127}
     
    129136    $$textref =~ s/\s*?(row|col)span=\"1\"//igs; # rowspan|colspan=1 don't seem real useful
    130137    $$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
    131139
    132140    # convert macron characters to _amn_ type macros
Note: See TracChangeset for help on using the changeset viewer.