ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/ermyth/doc/lib/PodHTML2.pm
Revision: 1.5
Committed: Tue Aug 28 17:08:06 2007 UTC (19 years, 1 month ago) by pippijn
Branch: MAIN
Changes since 1.4: +4 -4 lines
Log Message:
- changed name
- updated the example config to the new system
- added more documentation
- enhanced documentation generators
- added a link to the pdf to the website
- added an RSS feed generator
- transitioned hooks to c++ callbacks
- did various merges with upstream along the way
- added const where appropriate
- removed the old block allocator
- fixed most memory leaks
- transitioned some dictionaries to std::map
- transitioned some lists to std::vector
- made some free functions members where appropriate
- renamed string to dynstr and added a static string ststr
- use NOW instead of time (NULL) if possible
- completely reworked database backends, crypto handlers and protocol handlers
  to use an object factory
- removed the old module system. ermyth does not do any dynamic loading anymore
- fixed most of the build system
- reworked how protocol commands work

File Contents

# User Rev Content
1 pippijn 1.1 package PodHTML2;
2    
3     use strict;
4     use warnings;
5     use utf8;
6    
7 pippijn 1.5 my $rcsid = '$Id: PodHTML.pm,v 1.4 2007-07-25 01:06:22 pippijn Exp $';
8 pippijn 1.2
9     use base qw/PodHTML/;
10 pippijn 1.1
11     sub view_head1 {
12     my ($self, $item) = @_;
13     $item->title->present ($self), "\n\n",
14     $item->content->present ($self)
15     }
16    
17     sub view_seq_link {
18     my ($self, $item) = @_;
19     my ($title, $link) = split '\|', $item, 2;
20 pippijn 1.2 if ($link) {
21     return "<a href='$link'>$title</a>"
22     } else {
23     return "<a href='$title'>$title</a>"
24     }
25 pippijn 1.1 }
26    
27     sub view_item {
28     my ($self, $item) = @_;
29     my $title;
30     if ($item->title =~ /^L</) {
31     $title = $item->title;
32     $title =~ s/L<(.+)>/- $1/;
33 pippijn 1.5 $self->xmlise (\$title);
34 pippijn 1.1 $title = $self->view_seq_link ($title);
35     } else {
36     $title = $item->title;
37 pippijn 1.5 $self->xmlise (\$title);
38 pippijn 1.1 }
39    
40 pippijn 1.5 '<li>', ($item->title eq '*' ? '<b>( * )</b> ' : '<b>' . $title . '</b> '), $item->content->present ($self), '</li>'
41 pippijn 1.1 }
42    
43 pippijn 1.2 sub view_for {
44     my ($self) = @_;
45     for ($_[1]->format) {
46     /^date/ and return "<b>" . $_[1]->text . "</b>";
47     return $self::SUPER->view_for ($_[1]);
48     }
49     }
50    
51 pippijn 1.3 =head1 AUTHOR
52    
53     Copyright © 2007 Pippijn van Steenhoven
54    
55     =head1 LICENSE
56    
57     This library is free software, you can redistribute it and/or modify
58 pippijn 1.4 it under the terms of the GNU General Public License.
59 pippijn 1.3
60     =cut
61    
62     1