Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export to ledger #13

Open
MatthiasKauer opened this issue Jun 4, 2015 · 1 comment
Open

Export to ledger #13

MatthiasKauer opened this issue Jun 4, 2015 · 1 comment

Comments

@MatthiasKauer
Copy link

Hi,
I'm wondering how feasible it would be to export to ledger time format. Ledger is a CLI accounting tool that could then take care of filtering and aggregating issues. It has many ports; the original and hledger (Haskell) claim to have this time log functionality.
See: http://hledger.org/manual.html#timelog The format is as follows (C&P from there):

i 2015/03/30 09:00:00 some:account name  optional description after two spaces
o 2015/03/30 09:20:00
i 2015/03/31 22:21:45 another account
o 2015/04/01 02:00:34

I have taken a look at the json file ti creates and on first glance it seems like the conversion would be straightforward to implement. Now I read a bit more here, for instance about interrupts and I'm not so sure anymore. Are interruptions handled before we even write to the json store? Or only when log aggregates? In other words can I produce such a file by parsing straight through the json file or will there be some traps waiting for me?

Ok, I'm looking at how interrupts are actually logged now. I'd have to remove the color coding and parse to the original account so they're not mixed. It appears that ti log has the same issue however. I get the following unexpected/non-aggregated output:

interrupt: work:thesis         ∙∙  19 seconds
work:thesis                              ∙∙  6 seconds

Best regards,
Matthias

@MattHulse
Copy link
Contributor

I don't like having the interrupt in the task name. I think it is unnecessary and it causes problems like this. The color coding shouldn't ever be stored in the JSON. I think that is a bug in the way interrupts are being added.

MattHulse pushed a commit to MattHulse/ti that referenced this issue Jun 17, 2015
Fixed bug where interrupt creation was passing a colorized name into action_on,
which in turn was storing color codes in the JSON store.
Referenced by sharat87#13.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants