emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Aankhen <aankhen@gmail.com>
To: Org mailing list <emacs-orgmode@gnu.org>
Subject: Timesheet from clocking data
Date: Fri, 22 Apr 2011 01:33:48 +0530	[thread overview]
Message-ID: <BANLkTikDFOvXAFWPRbhnV7mPSvsW58JHgg@mail.gmail.com> (raw)

Greetings,

Given an Org file with clocking data, is there a way to generate a
timesheet?  This would complement the clock table by focusing on the
timings rather than the headings.

As I haven’t come across anything like this as yet, I’ll try to give
an example (manually-created) to show what I mean, in case someone
more familiar with Org can tell me something about it:

,----[ Org tree ]
| * Foo
|   :CLOCK:
|   CLOCK: [2011-04-19 Tue 18:50]--[2011-04-19 Tue 20:30] =>  1:40
|   CLOCK: [2011-04-18 Mon 20:15]--[2011-04-18 Mon 21:00] =>  0:45
|   CLOCK: [2011-04-21 Thu 01:03]--[2011-04-21 Thu 02:03] =>  1:00
|   :END:
|   CLOCK: [2011-04-19 Tue 12:30]--[2011-04-19 Tue 18:06] =>  5:36
|
|
| *** Bar
|     :CLOCK:
|     CLOCK: [2011-04-19 Tue 18:06]--[2011-04-19 Tue 18:50] =>  0:44
|     CLOCK: [2011-04-22 Fri 01:00]--[2011-04-22 Fri 01:05] =>  0:05
|     :END:
|
| *** Baz
|     :CLOCK:
|     CLOCK: [2011-04-21 Thu 03:10]--[2011-04-21 Thu 04:00] =>  0:50
|     :END:
`----

(Please ignore the very strange timings.  I just threw together
whatever I could for the sake of the example. :-)

The table:

#+BEGIN: timesheet :group day :scope subtree :block thisweek

Timesheet
| Entry            | Time    |       |
|------------------+---------+-------|
| *2011-40-18 Mon* | *00:45* |       |
|  20:15–21:00     |         | 00:45 |
| *2011-04-19 Tue* | *08:00* |       |
|  12:30–20:30     |         | 08:00 |
| *2011-04-21 Thu* | *01:50* |       |
|  01:03–02:03     |         | 01:00 |
|  03:10–04:00     |         | 00:50 |
| *2011-04-22 Fri* | *01:00* |       |
|  01:00–01:05     |         | 01:05 |
|------------------+---------+-------|
| Total            | 11:35   |       |

#+END:

As you can see, each day with any time clocked gets one entry in the
table.  Underneath that entry are all the non-contiguous blocks of
time clocked in during that day.  Clocked times from subtrees are
summed up and subsumed by their parents, so in the example given,
there is one single contiguous block from 12:30 to 20:30 on Tuesday,
whereas there are two entries for the non-contiguous blocks on
Thursday.

I really have no idea where to begin in order to obtain this sort of
report, if it is even possible.  Any pointers would be most
appreciated!

Thanks,
Aankhen

             reply	other threads:[~2011-04-21 20:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-21 20:03 Aankhen [this message]
2011-04-21 21:55 ` Timesheet from clocking data Bernt Hansen
2011-04-22  8:09   ` Aankhen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTikDFOvXAFWPRbhnV7mPSvsW58JHgg@mail.gmail.com \
    --to=aankhen@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).