Last active
April 7, 2016 22:35
-
-
Save vpack/0810b0f2f93c357e7cafdd08571fce17 to your computer and use it in GitHub Desktop.
Toggl timesheet - Automate
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
# Hate this work and so i scripted it !! | |
# Start Time is set to 9:00 AM EST - Change as needed | |
# Get your Token from Toggl settings page | |
create_timesheet(){ | |
for DY in $1 | |
do | |
curl -u MYNEWTOKENMYNEWTOKENMYNEWTOKEN:api_token -H "Content-Type: application/json" \ | |
-d '{"time_entry":{"description":"MYNEWCLIENT","billable":true,"duration":28800,"start":"2016-'$MTH'-'$DY'T13:00:00.000Z","created_with":"curl"}}' \ | |
-X POST https://www.toggl.com/api/v8/time_entries | |
done | |
} | |
MTH=03;create_timesheet "01 02 03 04 07 08 09 10 11 14 15 16 17 18 21 22 23 24 25 28 29 30 31" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment