From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Voit Subject: Todo balance motivation Date: Mon, 7 Nov 2011 17:57:46 +0100 Message-ID: <2011-11-07T17-50-56@devnull.Karl-Voit.at> Reply-To: news1142@Karl-Voit.at Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:60604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNSWM-0007BI-Tv for emacs-orgmode@gnu.org; Mon, 07 Nov 2011 11:58:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RNSWL-0005me-Vk for emacs-orgmode@gnu.org; Mon, 07 Nov 2011 11:58:06 -0500 Received: from lo.gmane.org ([80.91.229.12]:46592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNSWL-0005mZ-LU for emacs-orgmode@gnu.org; Mon, 07 Nov 2011 11:58:05 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RNSWH-0002bv-Ch for emacs-orgmode@gnu.org; Mon, 07 Nov 2011 17:58:01 +0100 Received: from mail.michael-prokop.at ([88.198.6.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Nov 2011 17:58:01 +0100 Received: from news1142 by mail.michael-prokop.at with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Nov 2011 17:58:01 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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