]> git.donarmstrong.com Git - bugscan.git/blob - dohtml
remove sparc and s390 from architecture listing
[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 <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>: wheezy-ignore or jessie-ignore</li>
55 </ul>
56
57 <p>
58 The second set of tags indicate what releases a bug applies to:
59 O for oldstable (squeeze), S for stable (wheezy), T for testing (jessie),
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-release.png" alt="Graph of RC bugs"></div>
99
100 <p>Other graphs:
101   <ul>
102     <li><a href="graph-month.png">Graph for the last month</a></li>
103     <li><a href="graph.png">Graph with all the history</a></li>
104   </ul>
105 </p>
106
107 <p>The red line graphs all bugs with release-critical severities; the green
108 line graphs the number of bugs that are actually a concern for the next
109 release (excluding ignored bugs, bugs on packages not in testing, and bugs
110 whose tags and/or versioning information indicate that they don't apply to
111 testing), and the blue line graphs the number of bugs that are a concern
112 for the <em>current</em> stable release.</p>
113
114 <h2>Recent changes</h2>
115 EOF
116
117         ./bugdiff -Hncs status-old status
118
119         cat <<EOF
120
121 <h2>Detailed lists of RC bug reports:</h2>
122
123 <ul>
124   <li> <a href="debian/all.html">All</a>
125   <li> <a href="debian/main.html">main</a>
126   <li> <a href="debian/source.html">source</a> 
127   <li> <a href="debian/contrib.html">contrib</a>
128   <li> <a href="debian/non-free.html">non-free</a>
129   <li><a href="other/pseudo.html">pseudo-packages</a>
130        <a href="http://www.debian.org/Bugs/pseudo-packages">(?)</a>
131   <li><a href="other/all.html">Everything in one page</a>
132     <br>
133      + <a href="other/stable.html">Only bugs relevant to stable</a>
134     <br>
135      + <a href="other/testing.html">Only bugs relevant to testing</a>
136 </ul>
137 <p clear=both>
138 <hr>
139 This page is automatically generated.<br>
140 Please contact
141 <a href="mailto:owner@bugs.debian.org">owner@bugs.debian.org</a> for comments.
142 To receive all mails sent to release-critical bugs, subscribe to the
143 <a href="http://lists.debian.org/debian-bugs-rc/">debian-bugs-rc</a>
144 mailing list.
145
146 EOF
147 }
148
149 makepage() {
150         if [ ! -d "`dirname $3`" ]; then mkdir -p "`dirname $3`"; fi
151         realmakepage "$1" "$2" "$4" "$5" > $3.new
152         mv -f $3.new $3
153 }
154
155 time=$(date -u -d '@'$(($(stat -c '%Y' status) / 3600 * 3600)))
156 oldtime=$(date -u -d '@'$(($(stat -c '%Y' status-old) / 3600 * 3600)))
157 title="Release-critical bugs status"
158
159 makepage "debian" "$title" "$htmldir/debian/all.html" "$time"
160 makepage "debian/main" "$title" $htmldir/debian/main.html "$time"
161 makepage "debian/contrib" "$title" $htmldir/debian/contrib.html "$time"
162 makepage "debian/non-free" "$title" $htmldir/debian/non-free.html "$time"
163 makepage "debian/source" "$title" $htmldir/debian/source.html "$time"
164
165 makepage "" "$title" $htmldir/other/all.html "$time"
166 makepage "" "$title" "$htmldir/other/stable.html" "$time" "-b"
167 makepage "" "$title" "$htmldir/other/testing.html" "$time" "-t"
168 makepage "" "$title" "$htmldir/other/pseudo.html" "$time" "pseudo"
169
170 makemainpage > $htmldir/index.html.new
171 mv -f $htmldir/index.html.new $htmldir/index.html
172