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

Implement timetrace edit record command #19

Closed
dominikbraun opened this issue May 16, 2021 · 4 comments
Closed

Implement timetrace edit record command #19

dominikbraun opened this issue May 16, 2021 · 4 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed

Comments

@dominikbraun
Copy link
Owner

Just as projects are editable via timetrace edit project, records should be editable using timetrace edit record. The command syntax should look just like the syntax of timetrace get record:

timetrace edit record [options] <YYYY-MM-DD-HH-MM>
  • Running edit without any options should open the default editor to directly edit the record file (see edit project).
  • Running edit with options should load the record internally, apply the option values and save the record. The supported options are explained below.

Command options

Flag Short Type Description Example
--plus -p String Adds the given duration to the end time of the record. --add 10m
--minus -m String Substracts the given duration of the end time of the record. --minus 10m

Those options probably aren't too hard to implement if the durations can be parsed as time.Duration. In that case, calling something like record.End.Add(plus) should be sufficient.

@dominikbraun dominikbraun added enhancement New feature or request help wanted Extra attention is needed labels May 16, 2021
@dominikbraun
Copy link
Owner Author

An open question would be how --plus operations are handled if the calculated end time lies within the timespan of another record.

@FelixTheodor
Copy link
Contributor

Hello, I would like to work on this issue :)

@dominikbraun
Copy link
Owner Author

An open question would be how --plus operations are handled if the calculated end time lies within the timespan of another record.

@aligator PTAL

@dominikbraun
Copy link
Owner Author

Resolved by #51.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants