jason0x43 Posted September 14, 2013 Share Posted September 14, 2013 (edited) This workflow lets you interact with your account on Toggl (so, you know, you have to already have an account at toggle.com). It provides a fairly basic level of access; you can view time entries for the past few days (the Toggl API default), start/continue and stop entries, add projects, and generate some basic in-Alfred reports. Note: For the most up to date usage notes, release info, etc., please hop over to the workflow's page on GitHub. Usage The main keyword is tgl -- that will get you the list of available commands. When you first use the workflow, there's just a login command. After you login more commands will become available. timers - List, create, and modify time entries. projects - List, create, and modify projects. tags - List the available tags. report - Get a summary report for today, yesterday, or the current week. The report is grouped by project; tab into them to see times for tasks. sync - Grab the most current data from toggl.com logout - Logout of toggl.com reset - Clear out all local config data and cache This workflow works well in conjunction with the TogglDesktop application. Download Source For current update status, please see the workflow's release page on GitHub. Update 2016-04-15 The GitHub page is the best place to see the status of this workflow, and is the place to file issues. Head over to the Releases page on GitHub to grab the latest release. Update 2015-01-02 A new release is out with improved support for projects and tags. Update 2014-11-22 Well, after using Toggl for a year or two, I feel like I have a better idea of what to do with it. This version adds some new features (project support, at last!) and some general improvements (faster, easier to understand commands). I've also come up with some better (to me) ways of writing UIs with Alfred, and I got tired of the lag introduced by Python, so this is a total rewrite. Let me know what you think. Update 2013-11-29 I just pushed a couple of updates. There is now a command to quickly stop the current timer, and the workflow maintains project IDs when continuing tasks. Edited November 17, 2016 by jason0x43 nikivi, Brendan, Diegobit and 3 others 6 Link to comment
leeolayvar Posted November 3, 2013 Share Posted November 3, 2013 Just wanted to say huge thank you for this workflow. It works soo nicely (much better than the other one). Now if i could find a quality Task workflow like this, i'd be in heaven. Perhaps i'll try to make one with the Todoist API and model it after this source Link to comment
leeolayvar Posted November 4, 2013 Share Posted November 4, 2013 I'm not sure where you prefer issues to be posted, but i created a ticket https://github.com/jason0x43/jc-toggl/issues/1 It would be nice if this preserved Toggl's continue functionality properly, allowing Projects to still be linked to continued tasks Link to comment
jason0x43 Posted November 5, 2013 Author Share Posted November 5, 2013 I'm not sure where you prefer issues to be posted, but i created a ticket https://github.com/jason0x43/jc-toggl/issues/1 It would be nice if this preserved Toggl's continue functionality properly, allowing Projects to still be linked to continued tasks It's easier to handle feature requests and bugs through Github. I saw your ticket; it shouldn't be too hard to add project support for tasks. Link to comment
vinyldust Posted November 9, 2013 Share Posted November 9, 2013 Cheers - this is a great workflow - though how do you get your notifier app running in the menu bar? I added the workflow to alfred, no problem, but don't see anything in the menu bar - and the github code doesn't really have an executable app ? Thanks! Link to comment
jason0x43 Posted November 29, 2013 Author Share Posted November 29, 2013 Cheers - this is a great workflow - though how do you get your notifier app running in the menu bar? I added the workflow to alfred, no problem, but don't see anything in the menu bar - and the github code doesn't really have an executable app ? Thanks! Wow, I totally missed this comment. Sorry about that... Anyway, the notifier project is separate from the Alfred workflow. You can get the notifier by downloading the prepackaged workflow (big grey "Download" button on the Github page; this is the easiest thing to do) or by cloning and compiling the notifier project yourself. Link to comment
jason0x43 Posted November 29, 2013 Author Share Posted November 29, 2013 I just pushed out a couple of updates to the workflow. One of them adds a new "toggl." command to quickly stop the current timer (thanks to @donners). It's a bit faster than the normal method since you don't have to wait for the timer list to load. The other update adds some very basic project support to the workflow. Specifically, continuing a timer will maintain its project ID (if it had one). There's an issue on github for adding a slightly more extended syntax to allow projects and tags to be specified when starting or continuing timers. Does anyone have any thoughts/preferences? Link to comment
jason0x43 Posted November 22, 2014 Author Share Posted November 22, 2014 New release. Total rewrite. Link to comment
politicus Posted December 10, 2014 Share Posted December 10, 2014 Very useful workflow! Thanks for sharing. Two feedbacks: - What are the two actions modifiers (alt/ctrl) supposed to do? - I typed "tgl timer" -> toogled fallback searches. And got this error: [ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/10 08:47:32 Using config file /Users/user/Library/Application Support/Alfred 2/Workflow Data/com.jason0x43.alfred-toggl/config.json 2014/12/10 08:47:32 Using cache file /Users/user/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.jason0x43.alfred-toggl/cache.json 2014/12/10 08:47:32 loaded config: {ec6de4eadf2b2e243b4cc304e3b55751} 2014/12/10 08:47:32 loaded cache 2014/12/10 08:47:32 args: []string{"./alfred-toggl", "tell", ""} 2014/12/10 08:47:32 op: 'tell' 2014/12/10 08:47:32 kind: '' 2014/12/10 08:47:32 query: '' [ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/10 08:47:33 Using config file /Users/user/Library/Application Support/Alfred 2/Workflow Data/com.jason0x43.alfred-toggl/config.json 2014/12/10 08:47:33 Using cache file /Users/user/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.jason0x43.alfred-toggl/cache.json 2014/12/10 08:47:33 loaded config: {ec6de4eadf2b2e243b4cc304e3b55751} 2014/12/10 08:47:33 loaded cache 2014/12/10 08:47:33 args: []string{"./alfred-toggl", "tell", "t"} 2014/12/10 08:47:33 op: 'tell' 2014/12/10 08:47:33 kind: 't' 2014/12/10 08:47:33 query: '' [ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/10 08:47:33 Using config file /Users/user/Library/Application Support/Alfred 2/Workflow Data/com.jason0x43.alfred-toggl/config.json 2014/12/10 08:47:33 Using cache file /Users/user/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.jason0x43.alfred-toggl/cache.json 2014/12/10 08:47:33 loaded config: {ec6de4eadf2b2e243b4cc304e3b55751} 2014/12/10 08:47:33 loaded cache 2014/12/10 08:47:33 args: []string{"./alfred-toggl", "tell", "ti"} 2014/12/10 08:47:33 op: 'tell' 2014/12/10 08:47:33 kind: 'ti' 2014/12/10 08:47:33 query: '' [ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/10 08:47:33 Using config file /Users/user/Library/Application Support/Alfred 2/Workflow Data/com.jason0x43.alfred-toggl/config.json 2014/12/10 08:47:33 Using cache file /Users/user/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.jason0x43.alfred-toggl/cache.json 2014/12/10 08:47:33 loaded config: {ec6de4eadf2b2e243b4cc304e3b55751} 2014/12/10 08:47:33 loaded cache 2014/12/10 08:47:33 args: []string{"./alfred-toggl", "tell", "tim"} 2014/12/10 08:47:33 op: 'tell' 2014/12/10 08:47:33 kind: 'tim' 2014/12/10 08:47:33 query: '' [ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/10 08:47:33 Using config file /Users/user/Library/Application Support/Alfred 2/Workflow Data/com.jason0x43.alfred-toggl/config.json 2014/12/10 08:47:33 Using cache file /Users/user/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.jason0x43.alfred-toggl/cache.json 2014/12/10 08:47:33 loaded config: {ec6de4eadf2b2e243b4cc304e3b55751} 2014/12/10 08:47:33 loaded cache 2014/12/10 08:47:33 args: []string{"./alfred-toggl", "tell", "time"} 2014/12/10 08:47:33 op: 'tell' 2014/12/10 08:47:33 kind: 'time' 2014/12/10 08:47:33 query: '' [ERROR: alfred.workflow.input.scriptfilter] Code 2: 2014/12/10 08:47:33 Using config file /Users/user/Library/Application Support/Alfred 2/Workflow Data/com.jason0x43.alfred-toggl/config.json 2014/12/10 08:47:33 Using cache file /Users/user/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.jason0x43.alfred-toggl/cache.json 2014/12/10 08:47:33 loaded config: {ec6de4eadf2b2e243b4cc304e3b55751} 2014/12/10 08:47:33 loaded cache 2014/12/10 08:47:33 args: []string{"./alfred-toggl", "tell", "timer"} 2014/12/10 08:47:33 op: 'tell' 2014/12/10 08:47:33 kind: 'timer' 2014/12/10 08:47:33 query: '' panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x0 pc=0x6d60] goroutine 16 [running]: runtime.panic(0x2e8880, 0x4d6284) /usr/local/Cellar/go/1.3.3/libexec/src/pkg/runtime/panic.c:279 +0xf5 main.TimerFilter.Items(0xc2080932b0, 0x6, 0x0, 0x0, 0xc208028ea0, 0x1, 0x1, 0x58aee8, 0xc20800fdd0) /Users/jason/Documents/Programming/go/src/github.com/jason0x43/alfred-toggl/main.go:425 +0x3390 main.TimerFilter.Items·i(0x0, 0xc2080932b0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) <autogenerated>:18 +0x90 github.com/jason0x43/go-alfred.(*Workflow).Run(0xc20809fe00, 0xc2080b5e98, 0xb, 0xb) /Users/jason/Documents/Programming/go/src/github.com/jason0x43/go-alfred/main.go:135 +0xbd0 main.main() /Users/jason/Documents/Programming/go/src/github.com/jason0x43/alfred-toggl/main.go:75 +0xb7c goroutine 19 [finalizer wait]: runtime.park(0x27d20, 0x4d98b0, 0x4d8349) /usr/local/Cellar/go/1.3.3/libexec/src/pkg/runtime/proc.c:1369 +0x89 runtime.parkunlock(0x4d98b0, 0x4d8349) /usr/local/Cellar/go/1.3.3/libexec/src/pkg/runtime/proc.c:1385 +0x3b runfinq() /usr/local/Cellar/go/1.3.3/libexec/src/pkg/runtime/mgc0.c:2644 +0xcf runtime.goexit() /usr/local/Cellar/go/1.3.3/libexec/src/pkg/runtime/proc.c:1445 goroutine 17 [syscall]: runtime.goexit() /usr/local/Cellar/go/1.3.3/libexec/src/pkg/runtime/proc.c:1445 Link to comment
jason0x43 Posted December 11, 2014 Author Share Posted December 11, 2014 - What are the two actions modifiers (alt/ctrl) supposed to do? - I typed "tgl timer" -> toogled fallback searches. And got this error: The alt and ctrl connections currently don't do anything, they're just there to prevent my generated menu items from being targets of the global ctrl and alt modifiers. Drat, just when you think you've rid yourself of pointer uses... I'll look into it. Link to comment
politicus Posted December 11, 2014 Share Posted December 11, 2014 Thank you! I just discovered Toggl yesterday and Toogl+Asana+Alfred look like a perfect combination! Link to comment
jason0x43 Posted December 23, 2014 Author Share Posted December 23, 2014 There's a new version out on GitHub and Packal. It should take care of the nil pointer issue. Link to comment
wolph Posted December 25, 2014 Share Posted December 25, 2014 (edited) Perhaps I don't understand how it works, but I seem to be getting "Error: Unknown command ''" a lot. For example, when I type "tgl project" it still shows the "tgl" icon, but as soon as I make it "tgl projects" the command just disappears. So no option to add a project and the same goes for tags. When I do "tgl sync" followed by a return I get the "Error: Unknown command ''" again. Am I doing something completely wrong? The console shows a huge amount of errors without any error message btw: [ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/25 12:04:10 Using config file Workflow Data/com.jason0x43.alfred-toggl/config.json 2014/12/25 12:04:10 Using cache file Workflow Data/com.jason0x43.alfred-toggl/cache.json 2014/12/25 12:04:10 loaded config: {316397782fb522ae3a43b76ba057bba0} 2014/12/25 12:04:10 loaded cache 2014/12/25 12:04:10 args: []string{"./alfred-toggl", "tell", "p"} 2014/12/25 12:04:10 op: 'tell' 2014/12/25 12:04:10 kind: 'p' 2014/12/25 12:04:10 query: '' [ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/25 12:04:11 Using config file Workflow Data/com.jason0x43.alfred-toggl/config.json 2014/12/25 12:04:11 Using cache file Workflow Data/com.jason0x43.alfred-toggl/cache.json 2014/12/25 12:04:11 loaded config: {316397782fb522ae3a43b76ba057bba0} 2014/12/25 12:04:11 loaded cache 2014/12/25 12:04:11 args: []string{"./alfred-toggl", "tell", "pr"} 2014/12/25 12:04:11 op: 'tell' 2014/12/25 12:04:11 kind: 'pr' 2014/12/25 12:04:11 query: '' [ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/25 12:04:11 Using config file Workflow Data/com.jason0x43.alfred-toggl/config.json 2014/12/25 12:04:11 Using cache file Workflow Data/com.jason0x43.alfred-toggl/cache.json 2014/12/25 12:04:11 loaded config: {316397782fb522ae3a43b76ba057bba0} 2014/12/25 12:04:11 loaded cache 2014/12/25 12:04:11 args: []string{"./alfred-toggl", "tell", "pro"} 2014/12/25 12:04:11 op: 'tell' 2014/12/25 12:04:11 kind: 'pro' 2014/12/25 12:04:11 query: '' [ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/25 12:04:24 Using config file Workflow Data/com.jason0x43.alfred-toggl/config.json 2014/12/25 12:04:24 Using cache file Workflow Data/com.jason0x43.alfred-toggl/cache.json 2014/12/25 12:04:24 loaded config: {316397782fb522ae3a43b76ba057bba0} 2014/12/25 12:04:24 loaded cache 2014/12/25 12:04:24 args: []string{"./alfred-toggl", "tell", "projects "} 2014/12/25 12:04:24 op: 'tell' 2014/12/25 12:04:24 kind: 'projects' 2014/12/25 12:04:24 query: '' [ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/25 12:04:26 Using config file Workflow Data/com.jason0x43.alfred-toggl/config.json 2014/12/25 12:04:26 Using cache file Workflow Data/com.jason0x43.alfred-toggl/cache.json 2014/12/25 12:04:26 loaded config: {316397782fb522ae3a43b76ba057bba0} 2014/12/25 12:04:26 loaded cache 2014/12/25 12:04:26 args: []string{"./alfred-toggl", "tell", "projects"} 2014/12/25 12:04:26 op: 'tell' 2014/12/25 12:04:26 kind: 'projects' 2014/12/25 12:04:26 query: '' [ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/25 12:04:27 Using config file Workflow Data/com.jason0x43.alfred-toggl/config.json 2014/12/25 12:04:27 Using cache file Workflow Data/com.jason0x43.alfred-toggl/cache.json 2014/12/25 12:04:27 loaded config: {316397782fb522ae3a43b76ba057bba0} 2014/12/25 12:04:27 loaded cache 2014/12/25 12:04:27 args: []string{"./alfred-toggl", "tell", "project"} 2014/12/25 12:04:27 op: 'tell' 2014/12/25 12:04:27 kind: 'project' 2014/12/25 12:04:27 query: '' [ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/25 12:04:28 Using config file Workflow Data/com.jason0x43.alfred-toggl/config.json 2014/12/25 12:04:28 Using cache file Workflow Data/com.jason0x43.alfred-toggl/cache.json 2014/12/25 12:04:28 loaded config: {316397782fb522ae3a43b76ba057bba0} 2014/12/25 12:04:28 loaded cache 2014/12/25 12:04:28 args: []string{"./alfred-toggl", "tell", "projects"} 2014/12/25 12:04:28 op: 'tell' 2014/12/25 12:04:28 kind: 'projects' 2014/12/25 12:04:28 query: '' Edited December 25, 2014 by wolph Link to comment
jason0x43 Posted December 25, 2014 Author Share Posted December 25, 2014 Perhaps I don't understand how it works, but I seem to be getting "Error: Unknown command ''" a lot. For example, when I type "tgl project" it still shows the "tgl" icon, but as soon as I make it "tgl projects" the command just disappears. So no option to add a project and the same goes for tags. When I do "tgl sync" followed by a return I get the "Error: Unknown command ''" again. Am I doing something completely wrong? You've been able to login, so we're starting out well. The fact that the 'projects' command causes the tgl list items to disappear can indicate that an error has occurred or that you don't have any projects. (Yes, not the most helpful output ever.) Project creation through the workflow isn't yet available but should be in the next day or so. To sync with toggle.com, type 'sync' and wait for a second or two. The item title will switch to 'Synchronized!' if syncing was successful. (The 'sync' command isn't meant to be actionable; that will be fixed in a future release.) If that works, you're successfully retrieving data from toggl.com. Link to comment
politicus Posted January 5, 2015 Share Posted January 5, 2015 (edited) Tried the lasted version (1.1.0) from Packal. And got this error : [ERROR: alfred.workflow.input.scriptfilter] Code 0: 2015/01/05 11:11:30 Using config file /Users/user/Library/Application Support/Alfred 2/Workflow Data/com.jason0x43.alfred-toggl/config.json 2015/01/05 11:11:30 Using cache file /Users/user/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.jason0x43.alfred-toggl/cache.json 2015/01/05 11:11:30 loaded config: {ec6de4eadf2b2e243b4cc304e3b55751 false} 2015/01/05 11:11:30 loaded cache 2015/01/05 11:11:30 args: []string{"./alfred-toggl", "tell", "timers"} 2015/01/05 11:11:30 op: 'tell' 2015/01/05 11:11:30 kind: 'timers' 2015/01/05 11:11:30 query: '' Edited January 5, 2015 by politicus Link to comment
jason0x43 Posted January 6, 2015 Author Share Posted January 6, 2015 That doesn't actually look like an error. (Alfred's debug console seems to assume anything on stderr is an error.) What output are you seeing from the workflow? Link to comment
politicus Posted January 6, 2015 Share Posted January 6, 2015 If by output, you mean "what do I see when I type the workflow's keyword", I see that everything looks like to be working well I can use every feature of the workflow. Case closed? Link to comment
jason0x43 Posted January 7, 2015 Author Share Posted January 7, 2015 If by output, you mean "what do I see when I type the workflow's keyword", I see that everything looks like to be working well I can use every feature of the workflow. Case closed? Yes, it sounds like it's working as intended. Link to comment
jonteamere Posted January 28, 2015 Share Posted January 28, 2015 @jason So, I think I've updated to the new version of your Toggl workflow. It now uses the 'tgl' keyword, right? It seems to me like your other version was better (i.e., easier to understand). Why the change? Also, what happened to the menubar notification component? Link to comment
jason0x43 Posted January 28, 2015 Author Share Posted January 28, 2015 @jason So, I think I've updated to the new version of your Toggl workflow. It now uses the 'tgl' keyword, right? It seems to me like your other version was better (i.e., easier to understand). Why the change? Also, what happened to the menubar notification component? Yes, it uses the 'tgl' keyword. I actually designed this version to be generally easier to pick up than the original. The previous version was simpler to use when creating timers, but I wasn't a huge fan of using sigils to specify tags and projects. I opted instead to go for a menu-driven workflow instead, which isn't quite as fast when you just want to start a timer (although tab-completion still keeps things pretty quick), but it makes it more straightforward to present lists of projects and tags and such. It's also much easier to advertise new functionality when everything's a visible menu option vs an implicit part of a data entry language. I stopped updating the notification component in favor of Toggl's own TogglDesktop client. Aside from being more generally useful, their client keeps a persistent, live connection open to toggl.com, so it's more reliable than the menubar component. Link to comment
jonteamere Posted January 31, 2015 Share Posted January 31, 2015 Yes, it uses the 'tgl' keyword. I actually designed this version to be generally easier to pick up than the original. The previous version was simpler to use when creating timers, but I wasn't a huge fan of using sigils to specify tags and projects. I opted instead to go for a menu-driven workflow instead, which isn't quite as fast when you just want to start a timer (although tab-completion still keeps things pretty quick), but it makes it more straightforward to present lists of projects and tags and such. It's also much easier to advertise new functionality when everything's a visible menu option vs an implicit part of a data entry language. I stopped updating the notification component in favor of Toggl's own TogglDesktop client. Aside from being more generally useful, their client keeps a persistent, live connection open to toggl.com, so it's more reliable than the menubar component. Thanks for the reply. So, almost immediately after posting my question(s) to you, I started using the Toggl desktop client. I would have to agree with you. It's great. Still some solid workflow work though. Much appreciated. Link to comment
sushinger Posted February 9, 2015 Share Posted February 9, 2015 Hello, I was happy to find a Workflow for Toggl here! Unfortunatly I cannot authenticate using my Email or API token. When I enter "tgl" for the first time, I have 2 options: login - Login to toggl.com token - Manually enter toggle.com API token http://note.io/173LzmB I'm sure that I have entered the correct credentials / token. Please note, that I am using the free-plan on toggle.com But the workflow keeps requesting Login or Token. Any idea what went wrong and how I can get it running correctly? Thank you! Sascha Link to comment
jason0x43 Posted February 17, 2015 Author Share Posted February 17, 2015 Hello, I was happy to find a Workflow for Toggl here! Unfortunatly I cannot authenticate using my Email or API token. When I enter "tgl" for the first time, I have 2 options: login - Login to toggl.com token - Manually enter toggle.com API token http://note.io/173LzmB I'm sure that I have entered the correct credentials / token. Please note, that I am using the free-plan on toggle.com But the workflow keeps requesting Login or Token. Any idea what went wrong and how I can get it running correctly? Thank you! Sascha Could you try pasting some debug info here? Open Alfred's preferences, select "Workflows" at the top of the dialog, select the Toggl workflow, then click the little "bug" icon in the upper right part of the workflow area. A console pane should pop up in the bottom of the preferences dialog. Try logging into toggl through the workflow, then copy and paste the console output into this thread. There shouldn't be any sensitive information in the console output, but glance through it before posting, just to make sure. Link to comment
jb510 Posted April 7, 2015 Share Posted April 7, 2015 (edited) Thank you Jason for an excellent workflow. I wish I'd known you'd updated it sooner! It wasn't until today while telling my business partner about it I notice the new version. It's great! Hurray for project support!. Project support in the workflow means I can finally use projects in toggl and that in turn means I'll finally be motivated enough to work out an API integration between Toggl and our (home built / bespoke) time card and invoicing system. Yay! no more manual entry between things is coming soon. Edited April 7, 2015 by jb510 Link to comment
Dmitry T. Posted November 7, 2015 Share Posted November 7, 2015 I registered to thank you personally. Jason, your workflow is amazing. Truly programmers are wizards of modern age. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now