From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Kowalczyk Subject: Clocking time from git log Date: Fri, 19 Jun 2009 23:29:17 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MHrGz-0007FX-Hj for emacs-orgmode@gnu.org; Fri, 19 Jun 2009 23:29:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MHrGv-000790-DO for emacs-orgmode@gnu.org; Fri, 19 Jun 2009 23:29:45 -0400 Received: from [199.232.76.173] (port=43306 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHrGv-00078x-07 for emacs-orgmode@gnu.org; Fri, 19 Jun 2009 23:29:41 -0400 Received: from main.gmane.org ([80.91.229.2]:46399 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MHrGu-0005E9-In for emacs-orgmode@gnu.org; Fri, 19 Jun 2009 23:29:40 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MHrGr-0003wY-8v for emacs-orgmode@gnu.org; Sat, 20 Jun 2009 03:29:37 +0000 Received: from 75-94-107-246.roc.clearwire-dns.net ([75.94.107.246]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 20 Jun 2009 03:29:37 +0000 Received: from jtk by 75-94-107-246.roc.clearwire-dns.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 20 Jun 2009 03:29:37 +0000 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org I would like to clock time in org mode from git commit logs. The simple case I'd like to handle is continuous commit activity on a single branch without merges, formatted as org-mode headings at a fixed level. The following git log format provides a useful starting point for manual editing: $ git log --reverse --format="** %s%n CLOSED: [%ai]%n :LOGBOOK:\ %n :CLOCK: [%P]--[%ai]%n :END:%n :PROPERTIES:\ %n :commit: %H%n :END:%n%b" ** Commit log subject line. CLOSED: [2009-05-14 17:34:18 -0400] :LOGBOOK: :CLOCK: [parentsha1]--[2009-05-14 17:34:18 -0400] :END: :PROPERTIES: :commit: commitsha1 :END: Commit body here. Given the intersection of git and org-mode users here, can anyone recommend methods in either git-log or org that would help with any of: * Getting the author-time of parentsha1, which should also be the CLOSED time of the previous sibling, and/or the CLOSED time of a heading with a known value for property :commit:. * Getting org to parse one of git's available timestamp formats (ISO 8601, RFC 2822) and convert the text to org's default timestamp format. * Prefixing all heading body text with ": " for preformatted text. Thanks for any suggestions, Jeff