emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Todo balance motivation


From: Karl Voit
Subject: [O] Todo balance motivation
Date: Mon, 7 Nov 2011 17:57:46 +0100
User-agent: slrn/0.9.9 (Linux)

Hi!

I am using a shell script to generate a simple todo overview
showing these information:

,----[ results of today and yesterday ]
| address@hidden ~all/org-mode (git)-[master] % ./vkorgtaskratio.sh
| 2011-11-07:   3 created  -  7 done  =  -4  sum
| Congratulations!  More solved than generated!
| address@hidden ~all/org-mode (git)-[master] % ./vkorgtaskratio.sh 2011-11-06
| 2011-11-06:   4 created  -  0 done  =  4  sum
| Sorry, you still have to solve 4 issues to get even!
| address@hidden ~all/org-mode (git)-[master] %
`----

My general goal ist to close more issues than open new one per day.

Is this kind of functionality available in Org-mode somewhere or
should I stick to my script?


To all those who want to use my script:

,----[ vkorgbalance.sh ]
| #!/bin/sh
|
| FILEPATTERN="*org *archive"         ## which files to search in
| ORGMODEDIR="~/share/all/org-mode/"  ## where org-mode files life
|
| if [ "${1}x" = "x" ]; then
|     ## set day to today
|     DAY=`date +%Y-%m-%d`
| else
|     ## using $1 as daystamp
|     DAY="${1}"
|     ## FIXXME: add check, if $1 is a valid daystamp
| fi
|
| cd "${ORGMODEDIR}"
| created=`egrep ":CREATED: .${DAY}" ${FILEPATTERN}|wc -l`
| closed=`egrep "CLOSED: .${DAY}" ${FILEPATTERN}|wc -l`
| sum=$(($created-$closed))
|
| echo "${DAY}:   ${created} created  -  ${closed} done  =  ${sum}  sum"
|
| ## generating the motivation messages
| if [ "${sum}" -lt 0 ]; then
|     echo "Congratulations!  More solved than generated!"
| else
|     echo "Sorry, you still have to solve ${sum} issues to get even!"
| fi
|
| #end
`----

-- 
Karl Voit




reply via email to

[Prev in Thread] Current Thread [Next in Thread]