web site updates
[mono.git] / web / web / htmlify
1 #!/usr/bin/perl
2 $q = 1;
3
4 while (<>){
5         chop;
6         if (/^\* (.*)$/){
7                 print "<h1>$1</h1>\n";
8         } elsif (/^\*\* (.*)$/) {
9                 print "<h2>$1</h2>\n";
10         } elsif (/^\*\*\* (.*)$/) {
11                 print "<h3>$1</h3>\n";
12         } elsif (/^\*\*\*\* (.*)$/) {
13                 print "<h4>$1</h4>\n";
14         } elsif (/^$/) {
15                 print "<p>\n";
16         } elsif (/^\t\t\* (.*)$/) {
17                 print "<li>$1\n";
18         } elsif (/^Q: (.*)$/){
19                 print "<p><a name=\"q$q\"></a><b>Question $q:</b> $1\n";
20                 $q++;
21         } elsif (/^A: (.*)$/){
22                 print "$1\n";
23         } elsif (/^TODO=(.*),$/){
24                 print "<a name=\"$1\">\n";
25         } else {
26                 print "$_\n";
27         }
28 }