Giter Club home page Giter Club logo

Comments (26)

joshuaherrera avatar joshuaherrera commented on May 30, 2024 2

I like the idea. I'd imagine we could implement different commands / flags to customize the created report.
We could use a --project <key> flag to grab all time logged on a project, or filter the report by time, e.g. a --month <month>, --week <weekNumber> or use a combination of --start and --end flags to get all time tracked for the month or week, or within some time frame, irrespective of project.

Thoughts or concerns?

from timetrace.

KonstantinGasser avatar KonstantinGasser commented on May 30, 2024 1

Since timetrace provides an interface to its config one other option could be to let the user change the lets say report-dir config field to whatever directory. The default could be in for example the ~/.timetrace/reports directory?

from timetrace.

retronav avatar retronav commented on May 30, 2024 1

If timetrace start project has not been stopped yet should this ongoing period be ignored in the report or be included?

I think it would make sense to give an alert about the ongoing tracking and then tell them to stop tracking before creating the report.

from timetrace.

KonstantinGasser avatar KonstantinGasser commented on May 30, 2024 1

@dominikbraun I would be happy to implement a first proposal if that's ok.

from timetrace.

dominikbraun avatar dominikbraun commented on May 30, 2024 1

Yes, that should work if I'm not missing something 😄

from timetrace.

KonstantinGasser avatar KonstantinGasser commented on May 30, 2024 1

Ok I will experiment a little 😄

from timetrace.

dominikbraun avatar dominikbraun commented on May 30, 2024 1

@maniowy Thanks for your suggestions! They both make sense and I created two issues for them: #140 and #141.

from timetrace.

KonstantinGasser avatar KonstantinGasser commented on May 30, 2024 1

just opened a PR closing #141

from timetrace.

dominikbraun avatar dominikbraun commented on May 30, 2024
  • Reports should be exportable as JSON.

from timetrace.

dominikbraun avatar dominikbraun commented on May 30, 2024
  • There should be a --billable flag to generate reports only for billable records.

from timetrace.

KonstantinGasser avatar KonstantinGasser commented on May 30, 2024

Does the report needs to follow a specific structure in order to be import it into some other software? If so, providing CSV output might also be useful in addition to JSON, right?
timetrace report where the default could be JSON and report can have a csv flag?

from timetrace.

dominikbraun avatar dominikbraun commented on May 30, 2024

I'd suggest that timetrace report prints a table as usual, and a --output option accepts json and csv as values.

from timetrace.

KonstantinGasser avatar KonstantinGasser commented on May 30, 2024

Ok I see.
If timetrace start project has not been stopped yet should this ongoing period be ignored in the report or be included?
I guess another question would be whether the user defines the output directorty/file or if the report.json/csv will be stored in a ~/.timetrace directory?

from timetrace.

dominikbraun avatar dominikbraun commented on May 30, 2024

If timetrace start project has not been stopped yet should this ongoing period be ignored in the report or be included?
I guess another question would be whether the user defines the output directorty/file or if the report.json/csv will be stored in a ~/.timetrace directory?

Good questions - especially the latter one should be discussed.

from timetrace.

dominikbraun avatar dominikbraun commented on May 30, 2024

Since timetrace provides an interface to its config one other option could be to let the user change the lets say report-dir config field to whatever directory. The default could be in for example the ~/.timetrace/reports directory?

@KonstantinGasser Yes, we could introduce a config value for that, or an --output/-o flag, or even both.

from timetrace.

KonstantinGasser avatar KonstantinGasser commented on May 30, 2024

@dominikbraun for clarification I have one more question. The generated report is only for one project, right? So the user would call the command with the project name like so report <ProjectKey> and the report would hold all recorded records for this project? Or would report hold a list of all projects with its records?

from timetrace.

dominikbraun avatar dominikbraun commented on May 30, 2024

@dominikbraun for clarification I have one more question. The generated report is only for one project, right? So the user would call the command with the project name like so report <ProjectKey> and the report would hold all recorded records for this project? Or would report hold a list of all projects with its records?

Both use cases would make sense: Generating a report of all projects I've been working on from date X to date Y, as well as generating a report for a particular project.

Maybe it would be sufficient to generate a report for all projects by default and generate a report for a single project using a --project flag?

from timetrace.

KonstantinGasser avatar KonstantinGasser commented on May 30, 2024

Yes I feel this would be intuitive to have the ---project flag and else make a report for all records between the time frame.
When it comes to the json output do you have anything special in mind here or would the following json ok?
For all project: {key_1: [{},{}], key_2:[{},{}]...}
For one project {key: [{},{}]}

from timetrace.

KonstantinGasser avatar KonstantinGasser commented on May 30, 2024

@dominikbraun I am almost done with this issue I just wanted to cross check the results with you and clarify one question.

When it comes the to output table I included a total time for each project. However, I am not sure whether each record-row in the table needs to display its total. Below I have three tables as an example. (for the project timetest I forgot to stop the tracking that's why it shows such a high total time 😄). I prefer the last table version as it looks more organised and structured - easy to understand

All rows with total
+-----------+---------+-------+------------+---------------+
|  PROJECT  |  START  |  END  |  BILLABLE  |     TOTAL     |
+-----------+---------+-------+------------+---------------+
| test      | 00:37   | 00:37 | no         | 0h 0min 9sec  |
| test      | 00:37   | 00:37 | no         | 0h 0min 9sec  |
| test      | ---     | ---   | ---        | 0h 0min 18sec |
| edittest  | 12:35   | 12:41 | no         | 0h 6min       |
| edittest  | 12:35   | 12:41 | no         | 0h 6min       |
| edittest  | 09:10   | 09:10 | no         | 0h 0min 20sec |
| edittest  | ---     | ---   | ---        | 0h 13min      |
| time      | 14:46   | 15:10 | no         | 0h 23min      |
| time      | 14:46   | 15:10 | no         | 0h 23min      |
| time      | ---     | ---   | ---        | 0h 47min      |
| seconly   | 15:10   | 15:11 | no         | 0h 0min 22sec |
| seconly   | 15:15   | 15:49 | no         | 0h 33min      |
| seconly   | 15:10   | 15:11 | no         | 0h 0min 22sec |
| seconly   | 15:15   | 15:49 | no         | 0h 33min      |
| seconly   | ---     | ---   | ---        | 1h 8min       |
| timetest  | 15:52   | 15:53 | no         | 0h 1min       |
| timetest  | 16:00   | 15:55 | no         | 23h 54min     |
| timetest  | 15:52   | 15:53 | no         | 0h 1min       |
| timetest  | 16:00   | 15:55 | no         | 23h 54min     |
| timetest  | ---     | ---   | ---        | 47h 50min     |
+-----------+---------+-------+------------+---------------+
Only project total
+-----------+---------+-------+------------+---------------+
|  PROJECT  |  START  |  END  |  BILLABLE  |     TOTAL     |
+-----------+---------+-------+------------+---------------+
| test      | 00:37   | 00:37 | no         |               |
| test      | 00:37   | 00:37 | no         |               |
| test      | ---     | ---   | ---        | 0h 0min 18sec |
| edittest  | 12:35   | 12:41 | no         |               |
| edittest  | 12:35   | 12:41 | no         |               |
| edittest  | 09:10   | 09:10 | no         |               |
| edittest  | ---     | ---   | ---        | 0h 13min      |
| time      | 14:46   | 15:10 | no         |               |
| time      | 14:46   | 15:10 | no         |               |
| time      | ---     | ---   | ---        | 0h 47min      |
| seconly   | 15:10   | 15:11 | no         |               |
| seconly   | 15:15   | 15:49 | no         |               |
| seconly   | 15:10   | 15:11 | no         |               |
| seconly   | 15:15   | 15:49 | no         |               |
| seconly   | ---     | ---   | ---        | 1h 8min       |
| timetest  | 15:52   | 15:53 | no         |               |
| timetest  | 16:00   | 15:55 | no         |               |
| timetest  | 15:52   | 15:53 | no         |               |
| timetest  | 16:00   | 15:55 | no         |               |
| timetest  | ---     | ---   | ---        | 47h 50min     |
+-----------+---------+-------+------------+---------------+
With blank row between projects
+-----------+---------+-------+------------+---------------+
|  PROJECT  |  START  |  END  |  BILLABLE  |     TOTAL     |
+-----------+---------+-------+------------+---------------+
| test      | 00:37   | 00:37 | no         |               |
| test      | 00:37   | 00:37 | no         |               |
| test      | ---     | ---   | ---        | 0h 0min 18sec |
|           |         |       |            |               |
| edittest  | 12:35   | 12:41 | no         |               |
| edittest  | 12:35   | 12:41 | no         |               |
| edittest  | 09:10   | 09:10 | no         |               |
| edittest  | ---     | ---   | ---        | 0h 13min      |
|           |         |       |            |               |
| time      | 14:46   | 15:10 | no         |               |
| time      | 14:46   | 15:10 | no         |               |
| time      | ---     | ---   | ---        | 0h 47min      |
|           |         |       |            |               |
| seconly   | 15:10   | 15:11 | no         |               |
| seconly   | 15:15   | 15:49 | no         |               |
| seconly   | 15:10   | 15:11 | no         |               |
| seconly   | 15:15   | 15:49 | no         |               |
| seconly   | ---     | ---   | ---        | 1h 8min       |
|           |         |       |            |               |
| timetest  | 15:52   | 15:53 | no         |               |
| timetest  | 16:00   | 15:55 | no         |               |
| timetest  | 15:52   | 15:53 | no         |               |
| timetest  | 16:00   | 15:55 | no         |               |
| timetest  | ---     | ---   | ---        | 47h 50min     |
+-----------+---------+-------+------------+---------------+

from timetrace.

dominikbraun avatar dominikbraun commented on May 30, 2024

Thanks, @KonstantinGasser! I'd also prefer the last one as it is the cleanest and simplest approach.

Tablewriter also supports table footers and cell merging. Maybe there is a way to make use of this for the individual projects or for all projects? In the current state of main, out.Table supports footers.

from timetrace.

KonstantinGasser avatar KonstantinGasser commented on May 30, 2024

@dominikbraun Cool I fetched the latest main and will try it out! Preferable would be to have a cell merging for each project and each project again as a "footer" with its total + a "group" total of all projects at the end, right?

from timetrace.

dominikbraun avatar dominikbraun commented on May 30, 2024

@dominikbraun Cool I fetched the latest main and will try it out! Preferable would be to have a cell merging for each project and each project again as a "footer" with its total + a "group" total of all projects at the end, right?

Yes, something like this. But you're totally free to choose the best looking variant 😎

from timetrace.

panmanio avatar panmanio commented on May 30, 2024

Hi all,

two ideas for timetrace report:

  • can we have a --nonbillable / -B flag for non-billable entries only (the opposite of --billable / -b)?
  • are there plans for --project to include project modules? Currently (v0.11.0) modules are not included when --project is present. Could be done with another flag (--modules / -m).

from timetrace.

KonstantinGasser avatar KonstantinGasser commented on May 30, 2024

also create a PR for filter by module, closing #140

from timetrace.

c-nv-s avatar c-nv-s commented on May 30, 2024

will tags be/optionally be output with the report as well?

from timetrace.

dominikbraun avatar dominikbraun commented on May 30, 2024

will tags be/optionally be output with the report as well?

There's issue #202 for that. If no PR will be opened, I'll implement that myself within the next few days.

from timetrace.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.