AuHau / toggl-cli

A simple command-line interface for toggl.com

Home Page:https://toggl.uhlir.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flag to quickly do `toggl stop -p $TIME; toggl start -s $TIME ...`

StanczakDominik opened this issue · comments

I find myself doing the following often:

# it's 7:00
>>> toggl start "Entry 1"
# at 8:00 I realize I switched to entry 2 at 7:30
>>> toggl start -s 7:30 "Entry 2"

but then I have Entry 1 ranging from 7:00 to 8:00 and Entry 2 from 7:30 to 8:00, with the latter span being covered twice. So instead I sidestep this with:

>>> toggl stop -p 7:30
>>> toggl start -s 7:30 "Entry 2"

but it'd be quicker to have a another flag in start:

>>> toggl start -ps 7:30 "Entry 2"

that would call stop first at the given time. I took -p from toggl stop, but I'm open to ideas on this.

I'd be happy to implement this, but I wanted to discuss it first!


By the way @AuHau, I noticed in the recent issues that you mentioned you've been struggling to find time to work on this tool recently. As it's an incredibly useful one for me, I'd like to offer my help as a maintainer 🙂

That is a great suggestion! Please, feel free to create PR for this! The only thing is I am not sure if Click (the CLI framework) will allow you to create -ps flag, you might have to create a separate flag for this option. But you will figure it out ;-)

Also, thanks for the offer! I will happily accept it ;-) I have sent you the invite for the Maintainer of this repo. Feel free to work on it as you find fit. I will try to wrap up the migrations from Travis to Github Actions and create infrastructure for releasing using Github Actions so you can also create releases.

I've actually done exactly that over at PlasmaPy a while ago, so I think I can handle it! I'll just start from what you started #216 :)

Or rather, I could, but I didn't think to check if I had access to https://github.com/AuHau/toggl-cli/settings/secrets/actions 😅 since I don't (which is, of course, reasonable), I guess I'm limited to preparing the new github workflow. I continued work from your branch in #279.