Comments (26)
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.
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.
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.
@dominikbraun I would be happy to implement a first proposal if that's ok.
from timetrace.
Yes, that should work if I'm not missing something 😄
from timetrace.
Ok I will experiment a little 😄
from timetrace.
@maniowy Thanks for your suggestions! They both make sense and I created two issues for them: #140 and #141.
from timetrace.
just opened a PR closing #141
from timetrace.
- Reports should be exportable as JSON.
from timetrace.
- There should be a
--billable
flag to generate reports only for billable records.
from timetrace.
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.
I'd suggest that timetrace report
prints a table as usual, and a --output
option accepts json
and csv
as values.
from timetrace.
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.
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.
Since
timetrace
provides an interface to its config one other option could be to let the user change the lets sayreport-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.
@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 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 wouldreport
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.
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.
@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.
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.
@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 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.
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.
also create a PR for filter by module, closing #140
from timetrace.
will tags be/optionally be output with the report as well?
from timetrace.
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)
- Remove exclamation mark (`!`) from error messages HOT 1
- Make help for `timetrace create record` sensitive for `use12hours` HOT 1
- Migrate from CircleCI to Github Actions HOT 3
- Runtime Error when using timetrace start HOT 3
- Tags don't show up in `timetrace report`
- Check record collisions when editing a record HOT 5
- Update brew formula HOT 1
- Feature Request: Add description field in records
- [feature request] list records by specified range HOT 2
- bad CPU type in executable (Apple M2 Max) HOT 1
- Time recording stops at midnight
- Please bump golang.org/x/sys dependency HOT 1
- Should ignore extraneous files in the `.timetrace` directory
- Idea: Implement a feature to flag records as "billed" with an automatic marking function during report creation
- BUG: failed to edit project: fork/exec /usr/bin/nano: no such file or directory
- Maintained? HOT 1
- `create record` only works when I create the folder manually
- [enhancement request] add autocomplete for project names to the bash autocomplete function
- [bug] Cannot edit a record that had its initial timestamp edited
- Allow billable value to be set globally, by project, and by record
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from timetrace.