D 2019-03-01T08:47:32.620 L TODO N text/x-markdown U MCO W 1142 TODO ==== Add Toggl support ----------------- * [API key] in ini file * [Workspace ID] in ini file (or autodetect if the given API key has only one workspace?) * Fetch today’s first activity; use that as start time (`https://toggl.com/reports/api/v2/details?user_agent=toggl.com@martijn.coppoolse.com&workspace_id={workspaceID}&order_desc=off&since={since:yyyy-MM-dd}&until={until:yyyy-MM-dd}`) * On Friday, fetch all hours since Monday, cumulate these, subtract from the required weekly hours, and add that to today’s start time + pause time to get the suggested end time, capped at 9 hours maximum. If the suggested end time lies before today’s start time, just use the default end time. Additions to .ini: [Toggl] API key=... Workspace ID=... First day of week=<0..6 = Sunday..Saturday; defaults to 1 = Monday> Last day of week=<0..6 = Sunday..Saturday; defaults to 5 = Friday> Hours required=36 ### See also [tickets] [API key]: https://toggl.com/app/profile#api_token [Workspace ID]: https://www.toggl.com/api/v8/workspaces [tickets]: rptview?rn=1 Z 5d1c6de21bddfbe0ba1abad425cf0a2e