Export to human-readable format(s)
Closed this issue · 3 comments
Let's say I want to share my time log with someone. Maybe I'm a freelancer who wants to document my work for a client, maybe I want to show my life coach where I'm wasting all of my time so they can help me be more efficient, whatever.
Nobody wants me to send them a JSON file, and asking them to install rtw to load the JSON file seems like a tall order. Could we export to some format that I could easily send to a layperson so they could see how I spent my time?
We can already do a crappy version of this by running e.g. rtw summary > summary.txt
but I feel we could do a better job of presenting that information to people.
Ideas:
- HTML
- Spreadsheet (.ods ?)
- iCalendar
Apologies if this is outside the scope of the project.
Hello,
Yes it would definitely make sense to be able to export data to an external format.
iCalendar is a great suggestion, there is already a crate for iCalendar: https://github.com/hoodie/icalendar-rs
Apologies if this is outside the scope of the project.
It's perfectly on scope: I use rtw
for keeping track of what I've worked on at my job.
Create an activity:
❯ ./target/debug/rtw track 08:00 - 12:00 "eat cookies"
Recorded eat cookies
Started 2020-06-15T08:00:00
Ended 2020-06-15T12:00:00
Total 04:00:00
Dump current day finished activities as an iCalendar to stdout:
❯ ./target/debug/rtw dump
BEGIN:VCALENDAR
VERSION:2.0
PRODID:ICALENDAR-RS
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTAMP:20200615T193917Z
DTEND:20200615T100000
DTSTART:20200615T060000
SUMMARY:eat cookies
UID:26da67a8-28a5-4bc9-aeb9-fd148f301029
END:VEVENT
END:VCALENDAR
Intended usage:
./target/debug/rtw dump > today.ics
Note: it's still alpha-level feature, I still need to write more tests and document the dump
subcommand properly.
Available in v1.4.0