Re: [O] Timesheet from clocking data

2011-04-22 Thread Aankhen
Hi Bernt,

On Fri, Apr 22, 2011 at 03:25, Bernt Hansen be...@norang.ca wrote:
 Aankhen aank...@gmail.com writes:

 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:
 `

 [snip]

 Hi Aankhen,

 There is no functionality that produces the table in your timesheet
 example that I am aware of.  Personally I use the agenda view with log
 mode enabled for clock lines and limited to some interesting tags and a
 summary report with C-u R.  I then manually transfer the data to another
 system for timesheet reporting.  I just visit each day in the timesheet
 range to get the details I want.

 You can generate daily reports with something like this

 #+BEGIN: clocktable :maxlevel 2 :scope agenda :fileskip0 t :step day :block 
 thisweek
 #+END:

 which gives a separate table per day but it doesn't include the time
 details.

I see, thank you for the answer.  I might end up using a second system
for this too, this time.  Maybe I’ll try writing something to produce
these tables in a few days, by hacking together bits from the clock
table.

Aankhen



[O] Timesheet from clocking data

2011-04-21 Thread Aankhen
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



Re: [O] Timesheet from clocking data

2011-04-21 Thread Bernt Hansen
Aankhen aank...@gmail.com writes:

 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!

Hi Aankhen,

There is no functionality that produces the table in your timesheet
example that I am aware of.  Personally I use the agenda view with log
mode enabled for clock lines and limited to some interesting tags and a
summary report with C-u R.  I then manually transfer the data to another
system for timesheet reporting.  I just visit each day in the timesheet
range to get the details I want.

You can generate daily reports with something like this

#+BEGIN: clocktable :maxlevel 2 :scope agenda :fileskip0 t :step day :block 
thisweek
#+END:

which gives a separate table per day but it doesn't include the time
details.

Regards,
Bernt