|
osdir.com mailing list archive F.A.Q. -since 2001! |
|
|
|
Subject: Re: Statistics format? - msg#00007List: misc.workrave.user
by Date: Prev Next Date Index by Thread: Prev Next Thread Index
I hacked it a bit - but never got the total control over it. - I also
wanted to make something bigger - actually, I tried learning C and GTK to implement a statssystem into workrave to tell how much I'm using the computer on a daily basis etc. -- But it just kept segfaulting :p So then I just made a little bash-script, but I soon got tired. Anyway; here you have the script - I've figured out a bit of the format, but not all of it. :p This is the pattern I found, this is the format for these things as I see it: # nr 7 RepPrompt+BrPromt PromtedTaken Natural BrSkipped BrPost BrPromt ----- #!/bin/bash #cat liten | grep "B 0"| cut -d " " --f 4 b=0;t=0 # EDIT THIS TO YOUR WORKRAVE-STAT-FILE-PATH :] fil="/home/odin/.workrave/historystats" echo Odin's Workrave stat-script echo # nr 7 RepPrompt+BrPromt PromtedTaken Natural BrSkipped BrPost BrPromt OverdueSec printf "\t\tRepPrmt\tPrmtTok\tNatural\tBrkSkip\tBrkPstp\tBrkPrmt\tOverdue\n" # lagstat <breaktype(0-2)> <field(4-7)> function lagstat() { t=0 deler=$(grep "B $1" $fil | cut -d " " -f $2) for c in $deler; do t=$(echo "$t+$c"|bc) done; b=$(echo $b+1|bc) echo $t } # Micro Break mc_reppr=$(lagstat 0 4) mc_prtak=$(lagstat 0 5) mc_natur=$(lagstat 0 6) mc_brski=$(lagstat 0 7) mc_brpos=$(lagstat 0 8) mc_brpmt=$(lagstat 0 9) mc_overd=$(lagstat 0 10) let "mc_reppr = mc_reppr - mc_brpmt" let "mc_overd = mc_overd / 60/60" printf "Micro Break\t$mc_reppr\t$mc_prtak\t$mc_natur\t$mc_brski\t$mc_brpos\t$mc_brpmt\t$mc_overd\n" # Rest Break rb_reppr=$(lagstat 1 4) rb_prtak=$(lagstat 1 5) rb_natur=$(lagstat 1 6) rb_brski=$(lagstat 1 7) rb_brpos=$(lagstat 1 8) rb_brpmt=$(lagstat 1 9) rb_overd=$(lagstat 1 10) let "rb_reppr = rb_reppr - rb_brpmt" let "rb_overd = rb_overd / 60/60" printf "Rest Break\t$rb_reppr\t$rb_prtak\t$rb_natur\t$rb_brski\t$rb_brpos\t$rb_brpmt\t$rb_overd\n" # Daily Limit dl_reppr=$(lagstat 2 4) dl_prtak=$(lagstat 2 5) dl_natur=$(lagstat 2 6) dl_brski=$(lagstat 2 7) dl_brpos=$(lagstat 2 8) dl_brpmt=$(lagstat 2 9) dl_overd=$(lagstat 2 10) let "dl_reppr = dl_reppr - dl_brpmt" let "dl_overd = dl_overd / 60/60" printf "Daily Limit\t$dl_reppr\t$dl_prtak\t$dl_natur\t$dl_brski\t$dl_brpos\t$dl_brpmt\t$dl_overd\n" echo $a ----- On Mon, 31 Jan 2005 11:18:56 -0500, Joseph Reagle <reagle@xxxxxxx> wrote: > If I wanted to make a graph of my usage (averaged over a week for the past > two years), how do I read the data format? > > -- > Regards, http://www.mit.edu/~reagle/ > Joseph Reagle E0 D5 B2 05 B6 12 DA 65 BE 4D E3 C1 6A 66 25 4E > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > Workrave-user mailing list > Workrave-user@xxxxxxxxxxxxxxxxxxxxx > https://lists.sourceforge.net/lists/listinfo/workrave-user > -- Mvh, Odin Hørthe Omdal <odin.omdal@xxxxxxxxx> http://www.velmont.net ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl
Thread at a glance:
Previous Message by Date:Statistics format?If I wanted to make a graph of my usage (averaged over a week for the past two years), how do I read the data format? -- Regards, http://www.mit.edu/~reagle/ Joseph Reagle E0 D5 B2 05 B6 12 DA 65 BE 4D E3 C1 6A 66 25 4E ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl Next Message by Date:Re: Statistics format?Joseph Reagle wrote: If I wanted to make a graph of my usage (averaged over a week for the past two years), how do I read the data format? This is how statistics file looks like: | WorkRaveStats 4 Version 4 file | D 28 5 104 18 55 28 5 104 18 58 Start and enddate. In this case 28 June 2004 18:55 til 28 June 2004 18:58. Months start at 0, years at 1900 | B 0 7 1 0 0 0 0 1 117 Already explained by Odin, but still... From left to right B = Break info. 0 = Break id (0 = microbreak, 1 = restbreak, 2 = daily limit) 7 = number of remaining values 1 = number of time prompted to take the break 0 = number of breaks taken 0 = number of natural breaks taken 0 = number of times the break was skipped 0 = number of times the break was postponed 1 = number of unique breaks 117 = totaal amount of time this break was overdue (in seconds) | B 1 7 0 0 0 0 0 0 0 | B 2 7 0 0 0 0 0 0 0 Idem for other breaks. | m 6 163 8421 2687 150 23 403 m = Misc 6 = number of remaining values 163 = total active time (keyboard + mouse) 8421 = mouse movement in meters 2687 = effective mouse movement in meters 150 = amount of time the mouse was moving. 23 = total number of mouse clicks. 403 = total number of key presses. Hope this helps. Groetjes, Rob ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl Previous Message by Thread:Statistics format?If I wanted to make a graph of my usage (averaged over a week for the past two years), how do I read the data format? -- Regards, http://www.mit.edu/~reagle/ Joseph Reagle E0 D5 B2 05 B6 12 DA 65 BE 4D E3 C1 6A 66 25 4E ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl Next Message by Thread:Re: Statistics format?Joseph Reagle wrote: If I wanted to make a graph of my usage (averaged over a week for the past two years), how do I read the data format? This is how statistics file looks like: | WorkRaveStats 4 Version 4 file | D 28 5 104 18 55 28 5 104 18 58 Start and enddate. In this case 28 June 2004 18:55 til 28 June 2004 18:58. Months start at 0, years at 1900 | B 0 7 1 0 0 0 0 1 117 Already explained by Odin, but still... From left to right B = Break info. 0 = Break id (0 = microbreak, 1 = restbreak, 2 = daily limit) 7 = number of remaining values 1 = number of time prompted to take the break 0 = number of breaks taken 0 = number of natural breaks taken 0 = number of times the break was skipped 0 = number of times the break was postponed 1 = number of unique breaks 117 = totaal amount of time this break was overdue (in seconds) | B 1 7 0 0 0 0 0 0 0 | B 2 7 0 0 0 0 0 0 0 Idem for other breaks. | m 6 163 8421 2687 150 23 403 m = Misc 6 = number of remaining values 163 = total active time (keyboard + mouse) 8421 = mouse movement in meters 2687 = effective mouse movement in meters 150 = amount of time the mouse was moving. 23 = total number of mouse clicks. 403 = total number of key presses. Hope this helps. Groetjes, Rob ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl
blog comments powered by Disqus
|
|