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

more verbose json output #25

Open
chmanie opened this issue Apr 17, 2015 · 5 comments
Open

more verbose json output #25

chmanie opened this issue Apr 17, 2015 · 5 comments

Comments

@chmanie
Copy link

chmanie commented Apr 17, 2015

#22 added csv output, which is great! additionally we have the data option which outputs json, but this is squashed to days to be compatible with invoicer.

I'd like to have the verbose list / csv output formatted as json.

To simplify the api I'd propose a flag for the list command either like this
clocker list --output=json / --output=csv, (or --json / --csv) because right now the csv command basically just reformats the list output. Maybe we could alias the csv command to not break the api?

I'd also happily start working on a PR for that. Let me know what you think.

@fnogatz
Copy link
Owner

fnogatz commented Apr 18, 2015

Yeah, refactoring the different output formats is definitely a good thing to work on. I suggest the following interface:

  • clocker list: same as today
  • clocker list --aggregate day: aggregate by day
  • clocker list --aggregate month: aggregate by month (and maybe other times)
  • clocker list --csv: same as clocker csv today
  • clocker list --json --aggrate day: similar to clocker data today
  • All existing output commands are aliases to clocker list.

What do you think?

@yoshuawuyts
Copy link
Contributor

@fnogatz lgtm!

@fnogatz
Copy link
Owner

fnogatz commented Apr 25, 2015

RFC @substack

@chmanie
Copy link
Author

chmanie commented Apr 25, 2015

I am working on some pinning tests to support the refactoring. I could share them with you soon.

@fnogatz
Copy link
Owner

fnogatz commented May 5, 2015

Thanks for working on some tests at chmanie/clocker, @chmanie! My favorite approach would be:

  1. Write tests to document current expected behavior
  2. Create v2 branch
  3. Rewrite the current features in a /lib, so one could also require('clocker').stop() etc.
  4. Rewrite the current CLI to use the lib
  5. Publish v2 :)

@fnogatz fnogatz added this to the 2.0 milestone Jun 27, 2015
@fnogatz fnogatz mentioned this issue Jun 27, 2015
9 tasks
@fnogatz fnogatz removed this from the 2.0 milestone May 29, 2019
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

3 participants