Created
June 17, 2021 09:52
-
-
Save selfire1/1107941a0e74e1fe87bd460091956e4f to your computer and use it in GitHub Desktop.
A shell script to start tracking an Amazing Marvin task in Toggl Track.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ------------------------------------------------- | |
# Before running the script, make sure that you understand it. Running code you find on the Internet may damage your system. | |
# ------------------------------------------------- | |
# In Amazing marvin, set the path to this script as "Start time tracking task" in the "System Triggers strategy" like this: | |
# /Path/to/this/script $TASK_TITLE | |
# Replace "YourSecretToken" with your Toggl API token below. | |
# ------------------------------------------------- | |
curl -v -u YourSecretToken:api_token \ | |
-H "Content-Type: application/json" \ | |
-d '{"time_entry":{"description":'"\"$1\""',"created_with":"curl"}}' \ | |
-X POST https://api.track.toggl.com/api/v8/time_entries/start |
can you try using / instead of \ in Marvin?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I changed the directory and it’s the same error message that appears :/
In my marvin-toggl-tracking.sh file I have exactly this that is typed in (except for the ""#"" it’s just a #):
""#""!/bin/bash
""#"" -------------------------------------------------
""#"" Before running the script, make sure that you understand it. Running code you find on the Internet may damage your system.
""#"" -------------------------------------------------
""#"" In Amazing marvin, set the path to this script as "Start time tracking task" in the "System Triggers strategy" like this:
""#"" /Path/to/this/script $TASK_TITLE
""#"" Replace "YourSecretToken" with your Toggl API token below.
""#"" -------------------------------------------------
curl -v -u {The token that I used}:api_token
-H "Content-Type: application/json"
-d '{"time_entry":{"description":'""$1""',"created_with":"curl"}}'
-X POST https://api.track.toggl.com/api/v8/time_entries/start
In my triggers file in the Marvin folder I have this type in:
{
"onStartTimeTracking": "\C:\Users\User\Desktop $TASK_TITLE"
}
And finally, in Marvin I have this type in:
\C:\Users\User\Desktop $TASK_TITLE
I don’t know why Marvin double the slash bars when I copy paste them automatically, maybe that’s the issue.
I don’t really if these information is important for you but I want to provide you more information by hoping that you can help me solve this problem. : )