Jump to content
Modi34

Sidekick - workflow for OmniFocus

Recommended Posts

A workflow for quick adding new tasks into selected OmniFocus project.

Preview:

ncDkOLW.gif

 

It can:  

  • Filter tasks inside project
  • Add new tasks with notes and clipboard content
  • Run terminal command after your task is finished (mostly for git or whatever)
  • Open note links (all at once) (discontinued in version 2)
  • Copy note
  • Delete tasks
  • Quickly open tasks in omnifocus (discontinued in version 2)
  • Complete tasks

           - version 2 -

  • Work with completed tasks
  • Search tasks and projects (both completed and uncompleted) in of database
  • Change project selection
  • Complete projects
  • Flag unflag tasks and projects
  • Added basic fantastical 2 support (disabled by default)
  • Workflow now reopens itself with appleScript - Application('Alfred 3').runTrigger('sidekick',{inWorkflow:'com.sidekick.modi',withArgument:mode});

github download

 

 

 

 

Version 2 works using omnifocus cached database - It is much faster than using applescript.

I work with appstore omnifocus - so there is appstore cache folder set by default in the settings - https://www.dropbox.com/s/q1lbjwozpn84sh3/2016-10-09 18.09.46.gif?dl=0 - If you use non appstore version you should change db variable in the settings to

~/Library/Containers/com.omnigroup.OmniFocus2/Data/Library/Caches/com.omnigroup.OmniFocus2/OmniFocusDatabase2

 

to run terminal commands you need to add your script into the project description surrounded with | - for example |open http://www.alfredforum.com/|- will open alfred forum after every task you finish.

 

use $1 to access task title and $2 to get task note

 

 

 

 

This workflow is not 100% ready  yet - there are a lot of things I'm planing to add:

  • add new tasks (when started and finished) into calendar with link to the omnifocus task
  • Timing app support (get start finish date and generate report what exactly I was doing during the task)
  • finder/pathfinder support (add selected files with @2)
  • chrome/safari support (add tabs urls with @3)
  • automatically change settings when user opens workflow first time (in case user has not appstore version or does not have any third party apps)
  • edit tasks inside alfred (do not know if it is usefull)
  • change task parents
  • creating new projects inside sidekick

If you have any ideas how I can make this workflow better I will be glad to implement them

Edited by Modi34

Share this post


Link to post

Thank you for making this, it's a convenient tool. It works as intended for me except for "Quickly open tasks in OmniFocus" - this command just opens a search bar, any ideas how this can be fixed?

Share this post


Link to post

Thank you for making this, it's a convenient tool. It works as intended for me except for "Quickly open tasks in OmniFocus" - this command just opens a search bar, any ideas how this can be fixed?

if you mean alt+shift+a shortcut it was created to quickly add tasks in to selected project.

 

I have just uploaded the latest version of the workflow - I've added a lot of new features and fixed all bugs ( I hope :) )

In a few minutes I will update topic description

Share this post


Link to post

This is great. Thanks a bunch! I am using it currently and it has helped greatly.

 

Also, that is an awesome alfred theme. Where did you find it?

Edited by prav

Share this post


Link to post
On 2016. 5. 28. at 11:52 PM, Modi34 said:

Version 2 works using omnifocus cached database - It is much faster than using applescript.

I work with appstore omnifocus - so there is appstore cache folder set by default in the settings - https://i.imgur.com/fpIA9wF.png- If you use non appstore version you should change db variable in the settings to

~/Library/Containers/com.omnigroup.OmniFocus2/Data/Library/Caches/com.omnigroup.OmniFocus2/OmniFocusDatabase2

 

 

 

 

I changed DB variable cuz Im using non App Store version.

but I got below error

Starting debug for 'Sidekick'

[2016-10-10 00:10:50][ERROR: input.scriptfilter] Code 1: /Users/iddef/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Scripts/F4A3509E-95DF-4ACC-ACC0-0B7E902AC149:475:600: execution error: Error on line 6: Error: 대상체를 가져올 수 없습니다. (-1728)

 

Edited by Mahmud Lee

Share this post


Link to post
5 minutes ago, Mahmud Lee said:

 

 

 

Can u explain this more detail?

I'm using Omnifocus - non App Store version. 

How can I change db variable in the settings? ( I mean where I can find this SETTINGS?)

 

Im new to Alfred and Omnifocus as well

 

yes ofcourse - this is an updated gif https://www.dropbox.com/s/q1lbjwozpn84sh3/2016-10-09 18.09.46.gif?dl=0

 

sry did not know that old screen no longer available...

 

the third version is almost finished - by the end of the month I will upload it

Share this post


Link to post
11 minutes ago, Mahmud Lee said:

 

 

 

I changed DB variable cuz Im using non App Store version.

but I got below error

Starting debug for 'Sidekick'

[2016-10-10 00:10:50][ERROR: input.scriptfilter] Code 1: /Users/iddef/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Scripts/F4A3509E-95DF-4ACC-ACC0-0B7E902AC149:475:600: execution error: Error on line 6: Error: 대상체를 가져올 수 없습니다. (-1728)

 

this workflow still using applescript  - applescript is available in omnifocus pro only - so if you are using non pro version it will not work

Share this post


Link to post
7 minutes ago, Modi34 said:

yes ofcourse - this is an updated gif https://www.dropbox.com/s/q1lbjwozpn84sh3/2016-10-09 18.09.46.gif?dl=0

 

sry did not know that old screen no longer available...

 

the third version is almost finished - by the end of the month I will upload it

 

2 minutes ago, Modi34 said:

this workflow still using applescript  - applescript is available in omnifocus pro only - so if you are using non pro version it will not work

I'm using pro version

Share this post


Link to post
2 minutes ago, Mahmud Lee said:

so this workflow only work when OmniFocus running on the same desktop...

 

i tested it and if OmniFocus is off or belongs to other Desktop.. it doesn't work

I have 6 desktop - everything works everywhere - I will test it with non appstore version a bit later//

https://www.dropbox.com/s/zbappj76gu442eq/2016-10-09 18.28.50.gif?dl=0 - as you can see it works everywhere

Share this post


Link to post
1 minute ago, Modi34 said:

I have 6 desktop - everything works everywhere - I will test it with non appstore version a bit later//

https://www.dropbox.com/s/zbappj76gu442eq/2016-10-09 18.28.50.gif?dl=0 - as you can see it works everywhere

 

yeah thats really great. hope u can fix this issue. 

 

[2016-10-10 00:10:50][ERROR: input.scriptfilter] Code 1: /Users/iddef/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Scripts/F4A3509E-95DF-4ACC-ACC0-0B7E902AC149:475:600: execution error: Error on line 6: Error: 대상체를 가져올 수 없습니다. (-1728)

 

if OmniFocus2 Pro(non App Store) isn't on the same desktop, it can't use omnifocus database it seems...or another problem....

 

Cheers!

 

Share this post


Link to post

I have non-App store Pro Version.

 

I replaced the db environment variable in the Alfred Workflow Settings, but it still doesn't work.

 

 

 

 

Debugging gives me the following result.

Starting debug for 'Sidekick'

[2016-10-09 10:54:17][trigger.hotkey] Processing output of 'utility.argument' with arg ''
[2016-10-09 10:54:17][utility.argument] Processing output of 'input.scriptfilter' with arg ''
[2016-10-09 10:54:17][ERROR: input.scriptfilter] Code 1: /Users/andrewlee/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Scripts/1F368C55-AE86-46C4-B499-77E51285195A:475:600: execution error: Error on line 6: Error: Can't get object. (-1728)
[2016-10-09 10:54:33][trigger.hotkey] Processing output of 'utility.argument' with arg ''
[2016-10-09 10:54:33][utility.argument] Processing output of 'input.scriptfilter' with arg ''
[2016-10-09 10:54:34][ERROR: input.scriptfilter] Code 1: /Users/andrewlee/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Scripts/E87C762C-EE08-488D-8764-DD2E4616E52F:1033:1140: execution error: Error on line 10: TypeError: undefined is not an object (evaluating 'h[1].toLowerCase') (-2700)

 

 

 

 

I wish I can help you diagnose the problem, but I can't really figure this one out.

 

A very quick glance at the your input.js and output.js didn't raise any errors. And you aren't using really large libraries such as node.js anyways, so it wouldn't be a compatibility issue.

 

I updated my Omnifocus to 2.7.2 yesterday which could be the issue? But this should still work since I entered in the correct OmniFocusDatabase2 directory.

 

 

Edited by gilgameshskytrooper

Share this post


Link to post
8 minutes ago, gilgameshskytrooper said:

I have non-App store Pro Version.

 

I replaced the db environment variable in the Alfred Workflow Settings, but it still doesn't work.

 

 

 

 

Debugging gives me the following result.

Starting debug for 'Sidekick'

[2016-10-09 10:54:17][trigger.hotkey] Processing output of 'utility.argument' with arg ''
[2016-10-09 10:54:17][utility.argument] Processing output of 'input.scriptfilter' with arg ''
[2016-10-09 10:54:17][ERROR: input.scriptfilter] Code 1: /Users/andrewlee/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Scripts/1F368C55-AE86-46C4-B499-77E51285195A:475:600: execution error: Error on line 6: Error: Can't get object. (-1728)
[2016-10-09 10:54:33][trigger.hotkey] Processing output of 'utility.argument' with arg ''
[2016-10-09 10:54:33][utility.argument] Processing output of 'input.scriptfilter' with arg ''
[2016-10-09 10:54:34][ERROR: input.scriptfilter] Code 1: /Users/andrewlee/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Scripts/E87C762C-EE08-488D-8764-DD2E4616E52F:1033:1140: execution error: Error on line 10: TypeError: undefined is not an object (evaluating 'h[1].toLowerCase') (-2700)

thx for reporting this bug - I will fix it tomorrow

Share this post


Link to post
5 minutes ago, Modi34 said:

thx for reporting this bug - I will fix it tomorrow

 

No worries! Happy to help.

 

Could you have a set up for Pro and Non-Pro users? I think an AppleScript based workflow would work much better for me. And since it's supported natively by Omnigroup, it would be more stable in my situation.

 

 

A few more potential reasons why your script doesn't work for me.

1) I set up my default shell to be fish rather than bash. If your script sends default Bash commands through my shell, it won't run. We would have to come up with a wrapper around this (I can help you with this)

 

2) My default sqlite is not an internet download .pkg file, nor a manually built source file. It is all managed by homebrew. Therefore, it is symlinked into /usr/local/bin rather than some other location.

 

3) My current Ruby environment is a mess. The people at RVM have not been able to release a stable binary for OS 10.12, and So it's really messed up my Ruby installations I already had. I need to fix this one of these days. Potentially, my Ruby issues messed up other things as well.

Share this post


Link to post
On 09.10.2016 at 6:06 PM, Mahmud Lee said:

 

 

On 09.10.2016 at 6:45 PM, lixiaoyao said:

 

 

On 09.10.2016 at 7:22 PM, gilgameshskytrooper said:

 

 

 

I fixed this bug - https://dl.dropboxusercontent.com/u/82532678/Sidekick.alfredworkflow

 

the problem was with omnifocus windows - if your omnifocus license is not activated it has an additional window that changes its position on focus/// - it is a bit weird behaviour///

kjB4YMw.png

I fixed it but I will not update the extension for now - this bug occurres only for people who did not bought omnifocus - so there is probably no reason for it...

Edited by Modi34

Share this post


Link to post
On 10/10/2016 at 0:23 PM, Modi34 said:

 

 

 

 

I fixed this bug - https://dl.dropboxusercontent.com/u/82532678/Sidekick.alfredworkflow

 

the problem was with omnifocus windows - if your omnifocus license is not activated it has an additional window that changes its position on focus/// - it is a bit weird behaviour///

kjB4YMw.png

I fixed it but I will not update the extension for now - this bug occurres only for people who did not bought omnifocus - so there is probably no reason for it...

 

 

f.y.i I have bought it though, but not through the App Store.

 

It must be something else

Screen Shot 2016-10-11 at 6.52.50 PM.png

Screen Shot 2016-10-11 at 6.52.59 PM.png

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...