From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Dietsche Subject: Re: Date-centric Clocktable Date: Wed, 07 Sep 2011 11:01:22 +0200 Message-ID: <87mxegenfh.fsf@rat.lan> References: <87zkip7oc6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:57966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1E0k-0007ka-My for emacs-orgmode@gnu.org; Wed, 07 Sep 2011 05:01:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1E0j-0004Fm-9P for emacs-orgmode@gnu.org; Wed, 07 Sep 2011 05:01:34 -0400 Received: from www85.your-server.de ([213.133.104.85]:40037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1E0j-0004Fb-4u for emacs-orgmode@gnu.org; Wed, 07 Sep 2011 05:01:33 -0400 In-Reply-To: <87zkip7oc6.fsf@gmail.com> (rasmus@gmx.us's message of "Wed, 31 Aug 2011 14:33:13 +0200") 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: Rasmus Cc: emacs-orgmode@gnu.org Rasmus writes: > Is is possible to have a clocktabke with times in the left-most column? > The people I am doing some work for now prefer it that way for unknown > reasons. > > This is an example > > | date | Headline | total | > |------------------------------------------------+-----------------+-------| > | [2011-08-19 Fri 00:28]--[2011-08-19 Fri 00:51] | Writing mails | 0:23 | > | [2011-06-22 Wed 17:00]--[2011-06-22 Wed 17:45] | Data processing | 0:45 | Why don't you just use a simple (perl/python/...) script to collect your data? Here's a quick hack in perl: ---8<--- cut here --- #! /usr/bin/perl -n use strict; use warnings; our $headline; BEGIN { print "| date | Headline | total |\n"; print "|------------------------------------------------+-----------------+-------|\n"; } # save current headline $headline = $1 if (m/^\s*\*+\s+(.+)/); # dump clock line if (m/^\s*CLOCK:\s+(.+?)\s+=>\s+(.+)/) { print "| $1 | $headline | $2 |\n"; } --- cut here --->8--- Run the script as $ perl -n collect-timestamps.pl /path/to/org/*.org >clocktable.txt You must tweak the formatting and make it more robust, but you get the idea. If you prefer python, there are some python libraries listed at . Regards, Olaf