To my programming friends out there, I found this command line project (https://clockify-cli.netlify.app/) that makes it possible to send time entries to an app called Clockify via the terminal.
I’d love to be able to use this to send time entries from Tinderbox to clockify. My problem is I don’t really know how I’d go about figuring out how to do this. I’m wondering if someone out there could help get me started.
Awhile back I tried to do this with a CLI for Twitter, and @rtalexander and I are trying to now do it with GhatGPT. I clearly don’t know enough about run commands and command line yet to make this stuff work. Would love to be pointed toward the right learning direction.
This page has lots of examples: clockify-cli in :: Clockify CLI
I suggest starting by (1) setting up clocking, and doing the initialization/setup described in the project page. The (2) try using
clocking-cli in from the command line. Try different options, check the results.
Now, enter one of your sample commands in a string attribute. Try
runCommand($MyString). See if you get what you expect.
FWIW, having been down this road—albeit for a different task and further back in time—a key step for those not deeply code skilled is to break this into two initial steps:
- Get the command line working … on the command line. IOW be confident that if delivered to the command line correctly, a CL will have the desired outcome
- Generating a CL correctly from inside Tinderbox using
I think a confusion is that often CL examples mix piped (
stdin) input with parameters for the CL. But most CL tools can take input via a parameter (even if available documentation is excessively terse and gnomic). Bu comparison, runCommand() takes a slightly different approach with 3 (2 optional) arguments:
- The CL’s name. Basically the ‘app’ you are calling.
- (optional). The input(s_. IOW, what you type after the CL app’s name when inputting via the CL—the Cl’s arguments.
- Setting the working directory (
pwd) for the task. This cis pertinent if passing path-based arguments at #2 above.
Thanks @eastgate could have questions. How weary, from a security perspective do you need to be/should be with app projects like this, clockify-cli in :: Clockify CLI? Is there a way to test fo their integrity?
I tried searching for “clocking” on the linked page. Where can I find info on
clocking-cli? What is this?
I didn’t mean “clocking” — I meant to write
So, I got my command line work, Ya! Now I can’t figure out how to get runComamnd in TBX to pass it to the command line.
This is what I’ve got.
runCommand(clockify-cli manual 'MME 2023 Update' -s '2023-01-24 13:00' -e '2023-01-24 16:53' -d 'Reviewed current effort on book review with Kristen and Mary Beth' --not-billable --task 'Team Meeting');
Anyone have any ideas?
You need to put the command into quotes (
runCommand("clockify-cli manual ‘MME 2023 Update’ -s ‘2023-01-24 13:00’ -e ‘2023-01-24 16:53’ -d ‘Reviewed current effort on book review with Kristen and Mary Beth’ --not-billable --task ‘Team Meeting’");
And Tinderbox will probably don’t know what to do with the
which clockify-cli in Terminal.app and use the output (i.e. the full path) in Tinderbox.
Yup, @Pete you’re absolutely right. @rtalexander called me and gave me the same advice. Have it working now!!!
This weekend I can do a demo on how you can manage your time with Clockify out of Tinderbox! super cool.