emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Todo balance motivation
@ 2011-11-07 16:57 Karl Voit
  0 siblings, 0 replies; only message in thread
From: Karl Voit @ 2011-11-07 16:57 UTC (permalink / raw)
  To: emacs-orgmode

Hi!

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

,----[ results of today and yesterday ]
| vk@gary ~all/org-mode (git)-[master] % ./vkorgtaskratio.sh
| 2011-11-07:   3 created  -  7 done  =  -4  sum
| Congratulations!  More solved than generated!
| vk@gary ~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!
| vk@gary ~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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-07 16:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-07 16:57 Todo balance motivation Karl Voit

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).