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

Missing sub-commands #11

Open davinellulinvega opened 2 years ago

davinellulinvega commented 2 years ago

Hello everyone,

First of all thank you very much for making such a nice and simple time tracker. I only discovered bartib two days ago and have been loving it ever since. Although, it is overall quite a robust piece of software, I find myself missing two sub-commands. The first one would be an add command allowing the user to add a time entry by specifying a start and stop time. The second one is an export feature which outputs the activity log in either JSON format or CSV format. Thank you very much in advance and keep up the awesome work.

nikolassv commented 2 years ago

Thank you for your feedback and your nice words concerning bartib!

I have not implemented an add subcommand as I never had the need to append additional tasks. But if more people like to see such a feature, I would not mind adding it. Until then it is fairly easy to add tasks by editing the bartib file. The format is quite self explanatory. It is a plaintext format with a line for each activity. The format for each line is:

START - END | Project | Description

START and END are in iso format (yyyy-mm-dd hh:mm). You could add lines where ever you want.

I would not add an export feature to bartib itself as I do not think this should be part of its core concerns. But as simple as the format is, such a feature could be quite easily written as a simple bash script with the help of tools like awk.

davinellulinvega commented 2 years ago

Hello @nikolassv,

I do agree that the file format makes it really easy to add entries you've forgotten to log, or weren't in front of your computer when starting them. However, in my point of view I find it more "user friendly" to use the bartib command line to add a time entry, rather than manipulate the log file directly. Furthermore, it would mean that I can take advantage of the date parsing capabilities of bartib rather than enter the full iso formatted string. At this point, I do understand that it might be nitpicking, but I thought I would at least open the discussion to get your point of view on the matter. I will leave it up to you to close this issue or leave it open it you want other users to chime in and express their interest in an add sub-command.

Again thank you very much for your answer and for implementing such a nice time tracker.