]> git.donarmstrong.com Git - bugscan.git/blob - dohtml
"I" can stand for both sarge- and etch-ignore.
[bugscan.git] / dohtml
1 #! /bin/sh
2
3 htmldir=/home/sesse/bugscan/www
4
5 realmakepage() {
6         local   filter="$1"     # Distributions to list
7         local   title="$2"      # Title of page
8         local   date="$3"       # Date
9         local   worry="$4"      # Worry about testing only?
10         local   descr           # Description of filter
11
12         if [ -z "$filter" ]; then
13                 descr="all"
14         else
15                 descr="$filter"
16                 filter="-d $filter"
17         fi
18
19         filter="$filter $worry"
20
21         cat <<EOF
22 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
23 <html>
24   <head>
25     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
26     <title>$title, $date</title>
27   </head>
28 <body bgcolor="white">
29 <h1 align="center">$title</h1>
30
31 <h2 align="center">$date</h2>
32
33 <p align="center">for distribution(s): $descr</p>
34
35 <hr>
36
37 <p>
38 EOF
39         ./bugreport -H -s $filter
40         
41         cat <<EOF
42 <p>
43 Explanation for <a href="http://www.debian.org/Bugs/Developer#tags">bug
44 tags</a>:
45
46 <ul>
47    <li><strong>P</strong>: pending</li>
48    <li><strong>+</strong>: patch</li>
49    <li><strong>H</strong>: help</li>
50    <li><strong>M</strong>: moreinfo</li>
51    <li><strong>R</strong>: unreproducible</li>
52    <li><strong>S</strong>: security</li>
53    <li><strong>U</strong>: upstream</li>
54    <li><strong>I</strong>: sarge-ignore or etch-ignore</li>
55 </ul>
56
57 <p>
58 The second set of tags indicate what releases a bug applies to:
59 O for oldstable (woody), S for stable (sarge), T for testing (etch),
60 U for unstable (sid) or E for experimental.
61
62 <p>
63
64 EOF
65         ./bugreport -H -l $filter
66
67         cat <<EOF
68 <hr>
69 This page is automatically generated.<br>
70 Please contact
71 <a href="mailto:owner@bugs.debian.org">owner@bugs.debian.org</a> for comments.
72 </body>
73 </html>
74 EOF
75 }
76
77 makemainpage() {
78         cat <<EOF
79 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
80 <html>
81   <head>
82     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
83     <title>$title, $time</title>
84   </head>
85 <body bgcolor="white">
86 <h1 align="center">$title</h1>
87
88 <h2 align="center">$time</h2>
89
90 <p align="center">
91 EOF
92
93         ./bugreport -Hs
94
95         cat <<EOF
96 </p>
97
98 <div align="center"><img src="graph.png" alt="Graph of RC bugs"></div>
99
100 <p>The red line graphs all bugs with release-critical severities; the green
101 line graphs the number of bugs that are actually a concern for the next
102 release (excluding ignored bugs, bugs on packages not in testing, and bugs
103 whose tags and/or versioning information indicate that they don't apply to
104 testing), and the blue line graphs the number of bugs that are a concern
105 for the <em>current</em> stable release.</p>
106
107 <h2>Recent changes</h2>
108 EOF
109
110         ./bugdiff -Hncs status-old status
111
112         cat <<EOF
113
114 <h2>Detailed lists of RC bug reports:</h2>
115
116 <ul>
117   <li> <a href="debian/all.html">All</a>
118   <li> <a href="debian/main.html">main</a>
119   <li> <a href="debian/source.html">source</a> 
120   <li> <a href="debian/contrib.html">contrib</a>
121   <li> <a href="debian/non-free.html">non-free</a>
122   <li><a href="other/pseudo.html">pseudo-packages</a>
123        <a href="http://www.debian.org/Bugs/pseudo-packages">(?)</a>
124   <li><a href="other/all.html">Everything in one page</a>
125     <br>
126      + <a href="other/testing.html">Only bugs relevant to testing</a>
127 </ul>
128 <p clear=both>
129 <hr>
130 This page is automatically generated.<br>
131 Please contact
132 <a href="mailto:owner@bugs.debian.org">owner@bugs.debian.org</a> for comments.
133 To receive all mails sent to release-critical bugs, subscribe to the
134 <a href="http://lists.debian.org/debian-bugs-rc/">debian-bugs-rc</a>
135 mailing list.
136
137 EOF
138 }
139
140 makepage() {
141         if [ ! -d "`dirname $3`" ]; then mkdir -p "`dirname $3`"; fi
142         realmakepage "$1" "$2" "$4" "$5" > $3.new
143         mv -f $3.new $3
144 }
145
146 time=$(date -u --date="$(ls -Ll status | awk '{print $6, $7}'):00 $(date +%z)")
147 oldtime=$(date -u --date="$(ls -Ll status-old | awk '{print $6, $7}'):00 $(date +%z)")
148 title="Release-critical bugs status"
149
150 makepage "debian" "$title" "$htmldir/debian/all.html" "$time"
151 makepage "debian/main" "$title" $htmldir/debian/main.html "$time"
152 makepage "debian/contrib" "$title" $htmldir/debian/contrib.html "$time"
153 makepage "debian/non-free" "$title" $htmldir/debian/non-free.html "$time"
154 makepage "debian/source" "$title" $htmldir/debian/source.html "$time"
155
156 makepage "" "$title" $htmldir/other/all.html "$time"
157 makepage "" "$title" "$htmldir/other/testing.html" "$time" "-t"
158
159 makemainpage > $htmldir/index.html.new
160 mv -f $htmldir/index.html.new $htmldir/index.html
161