emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Clocking time from git log
@ 2009-06-20  3:29 Jeff Kowalczyk
  0 siblings, 0 replies; only message in thread
From: Jeff Kowalczyk @ 2009-06-20  3:29 UTC (permalink / raw)
  To: emacs-orgmode

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

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

only message in thread, other threads:[~2009-06-20  3:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-20  3:29 Clocking time from git log Jeff Kowalczyk

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).