Kristian Grönberg <krist...@gronberg.org> writes:

>> On 20 Nov 2020, at 10:23, Leo Okawa Ericson <l...@relevant-information.com> 
>> wrote:
>>
>> 
>> Some time ago I hacked together a bunch of elisp to create a clock table
>> based on tags. [1] It uses org's dynamic block feature[2] to create a
>> piechart with gnuplot and a simple table that shows percentages of time
>> spent on different tags. I should say that it has basically no
>> documentation at all, but if there is interest I could write something
>> to explain the basic usage at least.
>>
>> [1] https://github.com/Zetagon/dotfiles/blob/master/doom/pichart-property.el
>>
>> [2] https://orgmode.org/manual/Dynamic-Blocks.html
>>
>
> Started to read through the code and yes, a bit more documentation would be 
> great.
>
> Thanks
>

The other thing to consider is writing your own clock table formatter.

The one which is the default in org is somewhat long and looks a bit
challenging. However, that is because of all the options it has to deal
with. If you just consider how it works and can accept a formatter which
does not support the whole range of clock table options - only the ones
you need, it is actually very simple. The data structure passed in by
the clocktable function is just a nested list where each row has the
basic details of the tasks selected by the scope e.g. level, headline
text, tags, timestamp, time and properties associated with the entry.
You can sort, filter and present the data in whatever manner you want.
Using something like pcase-dolist to destructure the data into variables
and it can be quite clean.

HTH

Tim
--
Tim Cross

Reply via email to