Meta/amlook: look in the text log first
[alt-git.git] / genMaintNotes.perl
blob49fb50ad176bfa667feb7215d50a62a9843491ea
1 #!/usr/bin/perl -w
3 print <<'EOF' ;
4 <html>
5 <head>
6 <style>
7 div.inset {
8 background: #aff;
9 color: #888;
10 margin-left: 10%;
11 margin-top: 2em;
12 margin-bottom: 2em;
13 width: 60%;
14 padding: 1.2em;
16 div.inset {
17 color: #444;
19 div.inset a {
20 color: #444;
22 div.inset a:hover {
23 color: #00f;
25 h2 {
26 text-decoration: underline;
27 color: #888;
29 span.tt {
30 font-family: monospace;
32 img#ohloh-badge, img#git {
33 border: none;
34 float: right;
36 </style>
37 </head>
38 <body>
39 <img src="Kun-Wave.gif" id="git" width="64" height="64" />
40 <h1>A Message from the Git Maintainer</h1>
41 EOF
43 sub show_links {
44 local ($_) = @_;
45 my $br = '';
46 for (split(/\n/, $_)) {
47 s/^\s*//;
48 s/\s*\Z//;
49 my $url = $_;
50 my $comment = $_;
51 $url =~ s/ .*//;
52 if ($url =~ /^http:/) {
53 print "$br<a href=\"$url\"\n>$comment</a>";
54 } else {
55 print "$br$comment";
57 $br = "<br />\n";
59 print "\n";
62 sub show_commands {
63 local ($_) = @_;
64 my $br = '';
65 for (split(/\n/, $_)) {
66 s/^\s*//;
67 s/\s*\Z//;
68 print "$br<span class=\"tt\">$_</span>";
69 $br = "<br />\n";
71 print "\n";
74 my $in_ul;
75 $/ = "";
76 while (<>) {
77 $_ =~ s/\n+$//s;
79 if (/^ - /) {
80 if (!$in_ul) {
81 $in_ul = 1;
82 print "<ul>\n";
84 s/^ - //;
85 print "<li>$_</li>\n";
86 next;
89 if ($in_ul) {
90 $in_ul = undef;
91 print "</ul>\n\n";
94 if (s/^\*\s*//) {
95 print "<h2>$_</h2>\n\n";
96 } elsif (s/^ {4,}//) {
97 print "<div class=\"inset\">\n";
98 if (/^(http|git|nntp):\/\//) {
99 show_links($_);
100 } else {
101 show_commands($_);
103 print "</div>\n\n";
104 } else {
105 print "<p>$_</p>\n\n";
109 print <<'EOF' ;
110 <a href="http://www.ohloh.net/accounts/5439?ref=Detailed">
111 <img height='35' width='191' id='ohloh-badge'
112 src='http://www.ohloh.net/accounts/5439/widgets/account_detailed.gif'
113 alt="ohloh profile for Junio C Hamano" />
114 </a>
115 </body>
116 </html>