slitaz-forge view roadmap/roadmap.cgi @ rev 213

Add roadmap.slitaz.org files
author Christophe Lincoln <pankso@slitaz.org>
date Tue Mar 27 19:28:34 2012 +0200 (2012-03-27)
parents
children d22d92a1d038
line source
1 #!/bin/sh
2 #
3 . /usr/lib/slitaz/httphelper
4 header
6 # Default to next stable release.
7 rel="5.0"
8 [ "$(GET release)" ] && rel="$(GET release)"
9 taskdir="releases/$rel"
11 # Show a task.
12 show_task() {
13 cat << EOT
14 <pre>
15 Task : $TASK
16 People : $PEOPLE
17 EOT
18 if [ "$WIKI" ]; then
19 echo "Wiki page : <a href="$WIKI">$WIKI</a>"
20 fi
21 if [ "$DESC" ]; then
22 cat << EOT
24 Desccription
25 ------------
26 $DESC
27 EOT
28 fi
29 echo '</pre>'
30 }
32 # Usage: list_tasks STATUS
33 list_tasks() {
34 echo "<h3>Tasks List: $1</h3>"
35 count=0
36 for pr in 1 2 3 4
37 do
38 for task in $(fgrep -H "$1" $taskdir/*.conf | cut -d ":" -f 1)
39 do
40 . $task
41 if [ "$PRIORITY" == "$pr" ]; then
42 show_task
43 fi
44 done
45 done
46 [ "$1" == "TODO" ] && [ "$todo" == "0" ] && echo "All done."
47 [ "$1" == "DONE" ] && [ "$done" == "0" ] && echo "Nothing done."
48 }
50 # xHTML header.
51 cat header.html
53 case " $(GET) " in
54 *\ README\ *)
55 echo '<h2>README</h2>'
56 echo '<pre>'
57 cat README
58 echo '</pre>' ;;
59 *)
60 # Get the tasks done and todo
61 tasks=$(ls -1 $taskdir/*.conf | wc -l)
62 done=$(fgrep "DONE" $taskdir/*.conf | wc -l)
63 todo=$(fgrep "TODO" $taskdir/*.conf | wc -l)
64 pct=0
65 [ $tasks -gt 0 ] && pct=$(( ($done * 100) / $tasks ))
66 cat << EOT
67 <h2>Release: $rel</h2>
69 <p>
70 Tasks: $tasks in total - $done finised - $todo todo
71 </p>
72 <div class="pctbar">
73 <div class="pct" style="width: ${pct}%;">${pct}%</div>
74 </div>
75 <p>
76 Tasks lists are order by priority. Please read the <a href="?README">README</a>
77 for more information about SliTaz Roadmap web interface and Hg repo.
78 </p>
79 EOT
80 cat $taskdir/$release/goals.html
81 list_tasks TODO
82 list_tasks DONE ;;
83 esac
85 # Close xHTML page
86 cat << EOT
87 </div>
89 <div id="footer">
90 <a href="http://www.slitaz.org/">SliTaz Website</a> - Roadmap:
91 <a href="?release=4.0">4.0</a>
92 </div>
94 </body>
95 </html>
96 EOT
98 exit 0