aardappel / procrastitracker

a Windows time tracking application
http://strlen.com/procrastitracker/
500 stars 53 forks source link

Export CSV #47

Closed gregzaal closed 5 years ago

gregzaal commented 5 years ago

Would be great to be able to do some custom visualization - the timeline view is pretty limited in that it leaves out empty days and has no scale or labels. This is alright when you have the whole tree to explore as well, but not great as a standalone graph to share with others.

I saw you have some concerns about the CSV format being inadequate for tree-structure data. You know more than I do but for my purposes just having the top level in a predictable format would suffice:

Day         App1                       App2                        App3                 ...
2018/10/24  04:63:07 - sublime_text    02:08:56 - google_chrome    01:54:55 - photoshop
2018/10/25  04:25:53 - sublime_text    01:22:56 - photoshop        00:32:12 - slack
2018/10/26  03:23:02 - sublime_text    01:08:56 - google_chrome    00:53:01 - cmd

Lower level data could be represented in the same field with a simple separator, like:

Day         App1                                                 App2                                               ...
2018/10/24  04:63:07 - sublime_text >> C: >> foobar >> etc.py    02:08:56 - google_chrome >> github.com >> Blahblah

This would allow for custom scripts to access the data and create custom visualizations.

Alternatively, is there a way for an external script to access the actual PT database itself?

gregzaal commented 5 years ago

Ah nevermind! Few more minutes of digging always pays off.

aardappel commented 5 years ago

Hah, I was going to say that :)

As an alternative, if parsing binary is inconvenient, there's also HTML export (very simple HTML that should be parsable).

I think we should also add JSON export. Or of course FlatBuffers :)