/[wait]/cvs-head/lib/WAIT/Parse/Ora.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /cvs-head/lib/WAIT/Parse/Ora.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 64 by ulpfr, Fri Jan 4 15:11:26 2002 UTC revision 65 by laperla, Wed Jan 23 12:22:54 2002 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl  #!/usr/bin/perl
2  #                              -*- Mode: Perl -*-  #                              -*- Mode: Perl -*-
3  # $Basename: HTML.pm $  # $Basename: HTML.pm $
4  # $Revision: 1.3 $  # $Revision: 1.4 $
5  # Author          : Ulrich Pfeifer with Andreas König  # Author          : Ulrich Pfeifer with Andreas König
6  # Created On      : Sat Nov 1 1997  # Created On      : Sat Nov 1 1997
7  # Last Modified By: Ulrich Pfeifer  # Last Modified By: Ulrich Pfeifer
# Line 68  sub handle_text { Line 68  sub handle_text {
68    
69  sub split {  sub split {
70    my ($self, $doc) = @_;    my ($self, $doc) = @_;
71    my %doc = ( isbn => '', author => '', about => '' );    my %doc = ( isbn => '', author => '', about => '', colophon => '' );
72    my $desc = $doc->{desc};    my $desc = $doc->{desc};
73    my $auth = $doc->{author};    my $auth = $doc->{author};
74      my $colophon = $doc->{colophon};
75    
76    if ($doc->{author}) {    if ($doc->{author}) {
77      %result = ();      %result = ();
# Line 79  sub split { Line 80  sub split {
80      $p->parse($doc->{author});      $p->parse($doc->{author});
81      $p->eof;      $p->eof;
82      $doc{author} = $result{title};      $doc{author} = $result{title};
83        $doc{author} =~ s/^By\s+//;
84      $doc{about}  = $result{text};      $doc{about}  = $result{text};
85    }    }
86    if ($doc->{index}) {    if ($doc->{index}) {
87      $doc->{index} =~ /ISBN\s*([-\d]+)/ and $doc{isbn} = $1;      $doc->{index} =~ /ISBN\s*([^<]+)/ and $doc{isbn} = $1;
88      }
89      if ($doc->{colophon}) {
90        %result = ();
91        $text = '';
92        $open = 0;
93        $p->parse($doc->{colophon});
94        $p->eof;
95        $doc{colophon} = $result{text};
96    }    }
97    %result = ();    %result = ();
98    $text = '';    $text = '';

Legend:
Removed from v.64  
changed lines
  Added in v.65

  ViewVC Help
Powered by ViewVC 1.1.26