Jump to content
robwalton

TaskPaper3 Workflow for Alfred

Recommended Posts

I've put an Alfred workflow for TaskPaper 3 up at packal and github. The page includes a download link, full instructions and an image. Please give it a go. There is a is another discussion thread on the TaskPaper forum.

 

The commands are briefly:

 

Keywords:
- d:setdoc - configure the TaskPapar document

- d:choosedoc - configure the TaskPaper document via a dialogue box
- d:help - show a brief summary of commands and settings
- d:setremind - view, change or disable the reminder search


- do - open the workflow’s TaskPaper document
- do <task> - create a new task
- domail - create tasks from emails selected in Apple’s Mail app


- dos - search for and then select an item. Use modifiers cmd to toggle @done and shift to toggle @today tags
- dop - search for and then focus on a project
- doss - select and apply a search saved from the document
- dot - search for and then append a tag to any current search. Use the modifier cmd-return to instead clear the search before appending the tag
- dopr - open resources associated with a project or to add a folder or alias resource if none exist

 

dosn - show (expand) all notes
- dohn - hide (collapse) all notes

 

Modifiers:
- none - operate on a project
- ⌘ - operate on the Inbox
- ⇧ - operate on the Stack

- ⌥ - operate on the Reading List project

 

The source is on github and the code behind the scenes is written using JXA. Please let me know if you run into troubles or have suggestions.

 

--- Rob

 

Edited by robwalton
Update with new v1.0 commands

Share this post


Link to post

Thanks so much for this. I had something similar cobbled together from others' and my own AppleScript for TP2 but there's no way I was going to have time to update it all in JXA.

Share this post


Link to post

Thanks for feedback guys. I've put a new version 0.9.1 up at packal.org/workflow/taskpaper .

 

 

This includes a few improvements:

  • Fix help command to work when no workflow document has been configured
  • Improve d:setdoc command so that it now shows all TP docs before typing
  • Improve dop command to focus on projects properly in all cases
  • Improve search command to now show all items before user starts typing
  • Add autocomplete to script filters and fix icon references

Share this post


Link to post
15 hours ago, dfay said:

Thanks so much for this. I had something similar cobbled together from others' and my own AppleScript for TP2 but there's no way I was going to have time to update it all in JXA.

I can see why you wouldn't want to do it a second time! Just noticed TaskPaper 3.5 has been released. Hopefully it will all still work right.

 

I found the Javascript part of JXA okay---it has some oddities but not too bad and way easier to write than Applescript. Also TaskPaper's API where you evaluate code inside it is pretty easy to work with. However, the Apple automation bit of JXA is seems pretty hit and miss. Things that would work in Applescript sometimes don't in JXA or bits are missing; but the good thing about JXA is you can use objective C which seemed to work well.

 

 

Share this post


Link to post

A new version 0.9.3 up at packal.org/workflow/taskpaper. This includes:

Quote

- d:setdoc now warns if Spotlight finds no TaskPaper files and suggesus d:choosedoc
- Create new d:choosedoc command to choose a workflow via a dialogue box
- Cursor now correctly moves from sidebar to editor pain when selecting an item
- Fix 'do' command with no args to now open workflow doc rather than just bring TP forward
- domail command warns if Mail app is closed and no longer creates an empty entry

There is a discussion thread on the TaskPaper forum.

Edited by robwalton

Share this post


Link to post

This is a huge help. I had a lot of Applescripts I made for Taskpaper 2 and Alfred that broke when I upgraded to 10.12, and even though I had upgraded to Taskpaper 3, I was missing a lot of the efficiency I had before due to the loss of my workflows and not having the time to invest yet in relearning how to automate Taskpaper 3. This workflow is great. Thank you for sharing it!

Edited by marlowe
minor edit

Share this post


Link to post

I really like the "domail" command for Mail. Being able to put the title of the e-mail and a link to the e-mail into a project is delightful!

 

I noticed that the mail task has an extra line placed after it. Is that extra line there for a reason?

 

Separate topic:

 

Is there a possibility to add the same type of command for URLs?

 

For example, "dou" would copy the title and URL of the front tab in Safari and place them into TaskPaper as a task. I've been trying to code it myself, but thus far, I can't figure it out.

Share this post


Link to post
On 12/2/2016 at 4:18 AM, Lecter said:

 

I really like the "domail" command for Mail. Being able to put the title of the e-mail and a link to the e-mail into a project is delightful!

 

I noticed that the mail task has an extra line placed after it. Is that extra line there for a reason?

 

Hi @Lecter, Thanks for the feedback. I also use the 'domail' command a lot. The blank lines are a bug which snuck in. It also fails if either Mail or TP is not open, and annoyingly brings in the entire thread rather than just the most recent item. Will fix at some point!

On 12/2/2016 at 4:18 AM, Lecter said:

Is there a possibility to add the same type of command for URLs?

 

For example, "dou" would copy the title and URL of the front tab in Safari and place them into TaskPaper as a task. I've been trying to code it myself, but thus far, I can't figure it out.

This would be a handy feature and if I get my head into working on this again I'll probably add it. It could even copy in any highlighted text. Not totally sure that everyone would get the mnemonic 'dou' though.

Share this post


Link to post
1 hour ago, robwalton said:

Will fix at some point!

 

Thanks!

 

1 hour ago, robwalton said:

Not totally sure that everyone would get the mnemonic 'dou' though.

 

It was just the first one that came to mind. Please use whichever one suits you! :)

Share this post


Link to post


I've put a new version 1.0 up at packal and github. This includes some new features:

Quote

- Added dorl (rl for read later) command to capture active webpage title, URL and highlighted text
- Added dosn` and dohn to show or hide notes respectively
- Collapse notes in items added by do, domail or dou
- Add 'alt' modifier to act on 'Reading List' project

@Lecter, dorl (for 'read later') is for you!

 

There is a slightly more active discussion thread on the TaskPaper forum

Share this post


Link to post
12 hours ago, msdisme said:

If I have questions abou tht eworkflow what is the best way to ask them

 

This forum is a good place to ask questions.  I'm not always that active, but seem to be ramping up again. I'm also likely to start using TaskPaper again, so that might help.

 

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×