Skip to content

Latest commit

 

History

History
466 lines (355 loc) · 8.64 KB

commands.md

File metadata and controls

466 lines (355 loc) · 8.64 KB

RTW Commands

Created by gh-md-toc

Start New Activity

Start tracking an activity now

Example:

rtw start write doc

Example output:

Tracking write doc
Started  2019-12-25T19:43:00

Start tracking an activity 4 minutes ago

Example:

rtw start 4 min ago write doc

Example output:

Tracking write doc
Started  2019-12-25T19:39:00

Start tracking an activity at a specific time

Example:

rtw start 2019-12-24T19:43:00 write doc

Example output:

Tracking write doc
Started  2019-12-24T19:43:00

Stop Current Activity

Stop current activity now

Example:

rtw stop

Example output:

Recorded write doc
Started 2019-12-25T19:43:00
Ended   2019-12-25T19:50:00
Total   00:07:00

Stop current activity 4 minutes ago

Example:

rtw stop 4m ago

Example output:

Recorded write doc
Started 2019-12-25T19:43:00
Ended   2019-12-25T19:46:00
Total   00:03:00

Stop current activity at a specific time

Example:

rtw stop 2019-12-25T19:45:00

Example output:

Recorded write doc
Started 2019-12-25T19:43:00
Ended   2019-12-25T19:45:00
Total   00:02:00

Cancel current activity

Example:

rtw cancel

Example output:

Cancelled write doc
Started   2019-12-24T19:43:00
Total     00:20:05

Display Summary

Display finished activities summary for today

Example:

rtw summary

Example output:

write doc    2019-12-25T19:43:00 2019-12-25T19:45:00 00:03:000

Display finished activities summary for yesterday

Example:

rtw summary --yesterday

Example output:

write doc    2019-12-24T19:43:00 2019-12-24T19:45:00 00:03:000

Display finished activities summary for last week

Example:

rtw summary --lastweek

Example output:

write doc    2019-12-17T19:43:00 2019-12-17T19:45:00 00:03:000

Display finished activities summary for range

Example:

rtw summary 19:00 - 20:00

Example output:

write doc    2019-12-17T19:43:00 2019-12-17T19:45:00 00:03:000

Display finished activities id

Example:

rtw summary --id

Example output:

 2 foo          2019-12-25T17:43:00 2019-12-25T17:44:00 00:01:00
 1 another foo  2019-12-25T18:43:00 2019-12-25T18:44:00 00:01:00
 0 bar          2019-12-25T19:43:00 2019-12-25T19:44:00 00:01:00

id 0 = last finished activity

Display a report (sum same activities)

Example:

rtw track 8 - 9 foo
rtw track 9 - 10 foo
rtw track 10 - 11 bar
rtw summary --report

Example output:

foo 02:00:00 (2 segments)
bar 01:00:00 (1 segments)

Display a timeline

For the day

rtw day

Example output (YMMV):

timeline

For the week

rtw week

For a time range

rtw timeline last monday - now

Export Finished Activities to iCalendar

For today

Example:

rtw dump

Example output:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:ICALENDAR-RS
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTAMP:20200616T184116Z
DTEND:20200616T203000
DTSTART:20200616T160000
SUMMARY:build a spaceship
UID:3bc8b3b6-d17b-4e1d-8323-2f55bfb14792
END:VEVENT
END:VCALENDAR

Dump to ics file: rtw dump > today.ics

For last week

Example:

rtw dump lastweek

Dump to ics file: rtw dump --lastweek > lastweek.ics

For a given date range

Example:

rtw dump last monday - now

Dump to ics file: rtw dump last monday - now > lastweek.ics

Continue Activity

Continue last finished activity

Example:

rtw continue

Example output:

Tracking write doc

Continue finished activity with id

Example:

rtw continue 2

Example output:

Tracking read twir

Delete Activity

Delete Activity with id

Example:

rtw delete 1

Example output:

Deleted write doc
Started 2019-12-25T19:43:00
Ended   2019-12-25T19:45:00
Total   00:02:00

Track a finished activity

Track a finished activity with dates

Example:

rtw track 2019-12-25T19:43:00 - 2019-12-25T19:45:00 write doc

please note the - separator

Example output

Recorded write doc
Started 2019-12-25T19:43:00
Ended   2019-12-25T19:45:00
Total   00:02:00

Track a finished activity the same day

Example:

rtw track 09:00 - 10:00 write doc

please note the - separator

Example output

Recorded write doc
Started 2020-03-14T09:00:00
Ended   2020-03-14T10:00:00
Total   01:00:00

Track an activity and provide a long description

Example:

rtw track 9 - 10 breakfast -d "I ate delicious pancakes"
rtw summary -d

output:

breakfast 2020-07-11T09:00:00 2020-07-11T10:00:00 01:00:00
I ate delicious pancakes

Display current status (for usage in scripts/status bars/prompts...)

Example:

rtw start foo
rtw status --format "{id} {ongoing} {start} {human_duration} {duration}"

output:

0 foo 2021-04-20T19:31:09 2 hours ago 02:20:53

For multitasking people

Requires deny_overlapping: false in rtw_config.json

Start (overlapping) activities

Example:

rtw start work
rtw start child question -d "answer how fish can breath under water"
rtw

Output:

./target/debug/rtw                                                                                                                                       PicoJr
Tracking work
Total    00:03:03
Id       0
Tracking child question
Total    00:01:25
Id       1

Stop ongoing activity

--id is only required when ongoing activities > 1.

Example:

rtw stop --id 1

Output:

Recorded child question
Started 2020-07-14T10:54:36
Ended   2020-07-14T10:57:23
Total   00:02:47

stop the other remaining ongoing activity:

rtw stop

Output:

Recorded work
Started 2020-07-14T10:52:58
Ended   2020-07-14T11:00:17
Total   00:07:18