nikolassv / bartib

A simple timetracker for the command line. It saves a log of all tracked activities as a plaintext file and allows you to create flexible reports.
GNU General Public License v3.0
636 stars 34 forks source link

`export` command or `csv` as a save file format for activities #41

Open simonsan opened 5 months ago

simonsan commented 5 months ago

I discovered bartib a few years ago, but started it using more frequently just recently.

I like the fact, that you can edit your activities with an editor and just add them by hand, if needed. The problem with that is, that statistical evaluation is made harder with it. It would need to either implement a converter or use some custom separator options to parse when e.g. importing to LibreOffice Calc, in this case importing to LibreOffice Calc (|) and deleting some empty columns.

The proposal of this issue is to either implement an export command to export such data to csv (and other formats if required, people could contribute that). Or to actually switch the format of the activity protocol to csv directly, so it can be opened in a text editor and imported to statistical tooling more easily. For this, a one-time conversion to csv of the activity file would be also beneficial for UX reasons.

nikolassv commented 5 months ago

Thank you for bringing this up. When I started bartib, I had indeed considered csv as the standard format as this would make it easier to import the records into other applications. However, I decided against it, as it can be quite easy to mess up a csv file, when you edit it manually.

I still like the idea of beeing able to export activities in other formats. Perhaps the bartib list command could incorporate a --format option that would allow one to specify the desired format like terminal (the default), csv or json. This would not only allow to export all activities into another format, but also to filter the list.