Parent Directory | Revision Log
format rcs2log output to html
1 | dpavlin | 1.1 | #!/usr/bin/perl -w |
2 | |||
3 | use strict; | ||
4 | |||
5 | my $rcs2log = "rcs2log ".join(" ",@ARGV); | ||
6 | my $have_ul = 0; | ||
7 | |||
8 | open(RCS2LOG, "$rcs2log |") || die "$rcs2log: $!"; | ||
9 | while(<RCS2LOG>) { | ||
10 | chomp; | ||
11 | next if (/^$/); | ||
12 | if (/^(\d\d\d\d-\d+-\d+)\s+(.+)\s(<.+>)$/) { | ||
13 | my ($date,$who,$email) = ($1,$2,$3); | ||
14 | if ($have_ul) { | ||
15 | print "</ul>\n"; | ||
16 | $have_ul = 0; | ||
17 | } | ||
18 | $email =~ s/</</g; | ||
19 | $email =~ s/>/>/g; | ||
20 | $email =~ s/@/(at)/g; | ||
21 | $email =~ s/\./(dot)/g; | ||
22 | print "<tt>$date</tt> $who <tt>$email</tt>\n"; | ||
23 | } elsif (/^\t\* ([^:]+):(\s*.*)$/) { | ||
24 | if (! $have_ul) { | ||
25 | print "<ul>\n"; | ||
26 | $have_ul = 1; | ||
27 | } | ||
28 | print "<li> <tt>$1</tt>:$2\n"; | ||
29 | } elsif (/^\t([-]\s.*)$/) { | ||
30 | print "<br>$1\n"; | ||
31 | } else { | ||
32 | print "$_\n"; | ||
33 | } | ||
34 | } | ||
35 |
ViewVC Help | |
Powered by ViewVC 1.1.26 |