Web · Wiki · Activities · Blog · Lists · Chat · Meeting · Bugs · Git · Translate · Archive · People · Donate

Commit 225915fc6e991d0aba33c390cd69439c85e60d07

Add script create_stats.sh to do all the process in one script
  
1for LINE in `grep -v ^# ./activities-data.txt`
2do
3 ACTIVITY=`echo $LINE | awk -F '|' '{printf("%s",$1)}'`
4 GIT=`echo $LINE | awk -F '|' '{printf("%s",$5)}'`
5 REPO=`echo $LINE | awk -F '|' '{printf("%s",$2)}'`
6
7 echo $ACTIVITY
8 cd $ACTIVITY
9
10 if [ -d $GIT.git/ ]; then
11 cd $GIT
12 git pull
13 CANT_COMMITS=`git log --oneline --since=05-03-2010 | grep -v Pootle | grep -v "Translation System" | wc -l`
14 echo $CANT_COMMITS $ACTIVITY
15 cd ..
16 echo $CANT_COMMITS > commits_last_year.txt
17 fi
18
19 BSO_COMPONENT=`echo $LINE | awk -F '|' '{printf("%s",$3)}'`
20 DLO_COMPONENT=`echo $LINE | awk -F '|' '{printf("%s",$4)}'`
21 CANT=0
22 if [ -n "$BSO_COMPONENT" ]; then
23 URL_BSO="http://bugs.sugarlabs.org/query?status=accepted&status=assigned&status=new&status=reopened&format=csv&component=$BSO_COMPONENT&order=priority&col=id&col=summary&col=priority&col=status&col=owner&col=type&col=milestone"
24 rm $ACTIVITY-bugs-bso.csv
25 wget -O $ACTIVITY-bugs-bso.csv $URL_BSO
26 CANT_BUGS_BSO=`tail -n +1 $ACTIVITY-bugs-bso.csv | wc -l | awk '{printf("%s", $1)}'`
27 CANT=$CANT_BUGS_BSO
28 fi
29
30 if [ -n "$DLO_COMPONENT" ]; then
31 URL_DLO="http://dev.laptop.org/query?status=assigned&status=new&status=reopened&format=csv&component=$DLO_COMPONENT&order=priority&col=id&col=summary&col=status&col=owner&col=type&col=milestone"
32 rm $ACTIVITY-bugs-dlo.csv
33 wget -O $ACTIVITY-bugs-dlo.csv $URL_DLO
34 CANT_BUGS_DLO=`tail -n +1 $ACTIVITY-bugs-dlo.csv | wc -l | awk '{printf("%s", $1)}'`
35 CANT=`echo "$CANT + $CANT_BUGS_DLO" | bc`
36 fi
37 echo $CANT > total_bugs.txt
38
39 cd ..
40 echo $CANT $CANT_COMMITS $ACTIVITY >> commit-bugs.dat
41done
42
43gnuplot < commit-bugs.gnp