add link to udd
[bugscan.git] / dohtml
1 #! /bin/sh
2
3 htmldir=/org/bugs.debian.org/www/bugscan
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 <p align="center">You might also want to check out <a href="http://udd.debian.org/bugs/">UDD</a> instead of this page.</p>
36 <hr>
37
38 <p>
39 EOF
40         ./bugreport -H -s $filter
41         
42         cat <<EOF
43 <p>
44 Explanation for <a href="http://www.debian.org/Bugs/Developer#tags">bug
45 tags</a>:
46
47 <ul>
48    <li><strong>P</strong>: pending</li>
49    <li><strong>+</strong>: patch</li>
50    <li><strong>H</strong>: help</li>
51    <li><strong>M</strong>: moreinfo</li>
52    <li><strong>R</strong>: unreproducible</li>
53    <li><strong>S</strong>: security</li>
54    <li><strong>U</strong>: upstream</li>
55    <li><strong>I</strong>: wheezy-ignore or jessie-ignore</li>
56 </ul>
57
58 <p>
59 The second set of tags indicate what releases a bug applies to:
60 O for oldstable (squeeze), S for stable (wheezy), T for testing (jessie),
61 U for unstable (sid) or E for experimental.
62
63 <p>
64
65 EOF
66         ./bugreport -H -l $filter
67
68         cat <<EOF
69 <hr>
70 This page is automatically generated.<br>
71 Please contact
72 <a href="mailto:owner@bugs.debian.org">owner@bugs.debian.org</a> for comments.
73 </body>
74 </html>
75 EOF
76 }
77
78 makemainpage() {
79         cat <<EOF
80 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
81 <html>
82   <head>
83     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
84     <title>$title, $time</title>
85   </head>
86 <body bgcolor="white">
87 <h1 align="center">$title</h1>
88
89 <h2 align="center">$time</h2>
90
91 <p align="center">
92 EOF
93
94         ./bugreport -Hs
95
96         cat <<EOF
97 </p>
98
99 <div align="center"><img src="graph-release.png" alt="Graph of RC bugs"></div>
100
101 <p>Other graphs:
102   <ul>
103     <li><a href="graph-month.png">Graph for the last month</a></li>
104     <li><a href="graph.png">Graph with all the history</a></li>
105   </ul>
106 </p>
107
108 <p>The red line graphs all bugs with release-critical severities; the green
109 line graphs the number of bugs that are actually a concern for the next
110 release (excluding ignored bugs, bugs on packages not in testing, and bugs
111 whose tags and/or versioning information indicate that they don't apply to
112 testing), and the blue line graphs the number of bugs that are a concern
113 for the <em>current</em> stable release.</p>
114
115 <h2>Recent changes</h2>
116 EOF
117
118         ./bugdiff -Hncs status-old status
119
120         cat <<EOF
121
122 <h2>Detailed lists of RC bug reports:</h2>
123
124 <ul>
125   <li> <a href="debian/all.html">All</a>
126   <li> <a href="debian/main.html">main</a>
127   <li> <a href="debian/source.html">source</a> 
128   <li> <a href="debian/contrib.html">contrib</a>
129   <li> <a href="debian/non-free.html">non-free</a>
130   <li><a href="other/pseudo.html">pseudo-packages</a>
131        <a href="http://www.debian.org/Bugs/pseudo-packages">(?)</a>
132   <li><a href="other/all.html">Everything in one page</a>
133     <br>
134      + <a href="other/stable.html">Only bugs relevant to stable</a>
135     <br>
136      + <a href="other/testing.html">Only bugs relevant to testing</a>
137 </ul>
138 <p clear=both>
139 <hr>
140 This page is automatically generated.<br>
141 Please contact
142 <a href="mailto:owner@bugs.debian.org">owner@bugs.debian.org</a> for comments.
143 To receive all mails sent to release-critical bugs, subscribe to the
144 <a href="http://lists.debian.org/debian-bugs-rc/">debian-bugs-rc</a>
145 mailing list.
146
147 EOF
148 }
149
150 makepage() {
151         if [ ! -d "`dirname $3`" ]; then mkdir -p "`dirname $3`"; fi
152         realmakepage "$1" "$2" "$4" "$5" > $3.new
153         mv -f $3.new $3
154 }
155
156 time=$(date -u -d '@'$(($(stat -c '%Y' status) / 3600 * 3600)))
157 oldtime=$(date -u -d '@'$(($(stat -c '%Y' status-old) / 3600 * 3600)))
158 title="Release-critical bugs status"
159
160 makepage "debian" "$title" "$htmldir/debian/all.html" "$time"
161 makepage "debian/main" "$title" $htmldir/debian/main.html "$time"
162 makepage "debian/contrib" "$title" $htmldir/debian/contrib.html "$time"
163 makepage "debian/non-free" "$title" $htmldir/debian/non-free.html "$time"
164 makepage "debian/source" "$title" $htmldir/debian/source.html "$time"
165
166 makepage "" "$title" $htmldir/other/all.html "$time"
167 makepage "" "$title" "$htmldir/other/stable.html" "$time" "-b"
168 makepage "" "$title" "$htmldir/other/testing.html" "$time" "-t"
169 makepage "" "$title" "$htmldir/other/pseudo.html" "$time" "pseudo"
170
171 makemainpage > $htmldir/index.html.new
172 mv -f $htmldir/index.html.new $htmldir/index.html
173