v.0.0.5 released

Homebrew and other amazing improvements

Hi, Luca here 👋

Trak version 0.0.5 is out!

It’s a big release this time too.

This time I’ve focused on UX and bug fixing. Three was many little—and not so little—things that weren’t comfortable or curated. So if v0.0.4 introduced a lot of new concepts, here I’ve refined them.

The Homebrew install method, the pickers and the start end insert moved the bar high regarding the UX of the project.

Talking about the future, v0.0.6 will be smaller. I want to focus on the works feature. It works, sure, but UI and UI aren’t really the best since it was just a sort of version 1. I already have a good list of enhancements.

I hope that all the changes will help you like they are helping me. If you have any feedback you can write them here.

Best,
Luca

🆕 Homebrew 🍺

Finally! 🎉

Now you can install trak using brew install lcfd/trak/trak with Homebrew.

Thanks a lot Patrick and Marco for the support 💚

🆕 A dedicated documentation website

I felt the need of a place where to give more detailed information about the project. I thought that this website wasn’t the best place for that purpose and keep it more as communication and educational channel.

This new website explores the deeps of this tool. Commands, options and some tip about them.

There will be for sure some overlaps of content, for example with guides and informational articles. But the docs will be more about doing things with trak and this website more about the principles and knowledge. I imagine many links between the two websites in the future.

Give it a look!

🆕 Add --start and --end to create session

The GitHub pull request.

I call it the “start end method”. Now you can create a session in a precise way, without doing the math.

trak create session --start [%Y-%m-%dT%H:%M] --end [%Y-%m-%dT%H:%M]

Note: Those flags will be incompatible with —hours and —minutes.

This feature has allowed me to insert a lot of past sessions by knowing the day in combination with the start and end time.

By chaining the commands it can be done in a single time:

trak create session --start 2024-04-20T09:00 --end 2024-04-20T10:20 && \
trak create session --start 2024-04-20T13:10 --end 2024-04-20T14:00 && \
trak create session --start 2024-04-20T20:30 --end 2024-04-20T22:40

✨ Add suggestions for start if project_id isn’t provided

Correlated GitHub pull requests:

Now you can omit the project_id from commands and pick it from a list of suggestions. I felt it as a need when I started having a good number of projects and remember each ID was problematic. Also, the IDs were hard to remember since they are codes with arbitrary conventions.

So, why not help my memory?

Here’s an example:

 trak report project
? Select a project: (Use arrow keys)
  pokemon
    digimon
    personal
    job-1
    all
  Answer: pokemon

✨ Improve the current session search in stop command

Correlated GitHub pull requests:

After some usage of the tool I figured out that the order of the sessions in the database wasn’t a good source of truth. For example, users may modify the database manually while a session is running.

No trak looks for the sessions without value in the end field. If there are more than one a picker list will be shown.

🐛 In report command you can use a wrong project ID

Before this improvement, entering a wrong ID would trigger an error. Now it will gracefully show a message that shows also all the available IDs.

🆕 A faster way to create a session

The GitHub pull request.

I felt the need for a truly faster way to create sessions. Mostly when I just finished one, and I need to insert it in trak (and I forgot to use trak start).

Now you can use what I call the subtract method:

  • trak create session prj-1 -m 45 or
  • trak create session prj-1 -m 45 or
  • trak create session prj-1 -h 2 -m 45

I call it this way because it takes your current time and subtract from it the hours and minutes provided.

🦣 Removed the command trak report projects

The GitHub pull request.

The command trak report projects is replaced by trak report project all.

The all option was already in place and I thought that report projects was too similar. I prefer to have a single way to do the thing instead of two that are that similar and under the same umbrella—report project/s.

✨ Show the duration of the stopped session

The GitHub pull request.

Like the title says, now when you stop a session using trak stop you’ll see also how much lasted the session.

🆕 You can archive projects

Correlated GitHub pull requests:

I’ve added a new property to projects details, archived. This will have effects mainly on lists, suggestions and probably future features.

It’s still new and to test heavily, you’ll fine more details in the documentation once ready.

The command is trak projects archive <project-id>.

✨🐛 Other small fixes and changes

  • Better message for “A session is already started”, now it shows also the elapsed time like in the status bar
  • Better and fixed help texts of commands
  • I have added tips here and there.
  • Change the “when” parameter to a date.
  • I have improved the “print_missing_timings_error” message, which is triggered when the user fails to provide any timings data.
  • I have removed the “today” property, it’s just another way of saying “now.”
  • Fixed bug in the “add” method.