Jump to content


Photo

Things: Search, Show, and Add Tasks

things to-do feedback

  • Please log in to reply
155 replies to this topic

#1 phyllisstein

phyllisstein

    Advanced Member

  • Member
  • PipPipPip
  • 370 posts
  • LocationNew York, NY

Posted 25 March 2013 - 11:07 AM

Another quickie from my own personal self, a Things workflow for adding tasks that also, thanks to Alfred's feedback system, searches them. I've been pestering Cultured Code to add this to the Quick Entry panel for ages, since I have a tendency to add one task five times (the number of incomplete "Watch and return Netflix DVDs" tasks I have floating around at any given time is absurd), but now Alfred will handle it for you! Just enter "things" to see a list of all projects, areas, and tasks; keep typing to start entering a task using the plug-in syntax (see below) while searching through pre-existing tasks. Select any item to show it in Things. You can also skip searching new items by adding a plus sign to your input (e.g., "things +Get this done").

 

The format for new tasks is as follows:

#tag1 #tag2 name [project/area] ::note >duedate

…with duedate specified in the format MM/DD/YYYY.

 

Give it a try and let me know if anything else breaks!

 

things_screen.jpg


Edited by phyllisstein, 26 April 2013 - 08:25 PM.

  • Andrew, twinpeaks, mccamel and 3 others like this

alp, Alfred.framework, and my assorted workflows are now abandonware. You can find them at https://github.com/p...stein/Workflows.

 


#2 funkymonkey

funkymonkey

    Newbie

  • Member
  • Pip
  • 12 posts

Posted 25 March 2013 - 03:31 PM

On the surface this workflow has the potential to melt my face right off with it's awesomeness but the performance is not good and the bouncy Pythons of which there are a couple at any time or not pleasant.

 

I'm pretty good at not using nasty characters in Things, any chance you could let me have the applescript version pwwwease?



#3 phyllisstein

phyllisstein

    Advanced Member

  • Member
  • PipPipPip
  • 370 posts
  • LocationNew York, NY

Posted 26 March 2013 - 05:54 AM

We now have a third option available, my current favorite, at http://alfred.daniel....alfredworkflow . It's pure Objective-C, meaning that it has all the advantages of the pure-Python version (coping correctly with special characters, including commas) without the drawbacks (it's actually the fastest, and nothing bounces in the Dock). What I don't know is whether GateKeeper will put the kibosh on it. So if someone could download and test it, I'd be super-grateful. I haven't worked in Obj-C in an eternity, but it seems to work on my machine, so if you get no output it's probably being bocked by GateKeeper.


alp, Alfred.framework, and my assorted workflows are now abandonware. You can find them at https://github.com/p...stein/Workflows.

 


#4 funkymonkey

funkymonkey

    Newbie

  • Member
  • Pip
  • 12 posts

Posted 26 March 2013 - 04:37 PM

Awesome work!

 

The third option 'kind of' works in that I can search for tasks and add tasks. But it doesn't display like the applescript and pure python versions with all the icons and sections (a la your screen grab). If I type 'things ' a full list of every task in Things appears instead.

 

Applescript version is working fine here. :)



#5 phyllisstein

phyllisstein

    Advanced Member

  • Member
  • PipPipPip
  • 370 posts
  • LocationNew York, NY

Posted 26 March 2013 - 05:53 PM

Awesome work!

 

The third option 'kind of' works in that I can search for tasks and add tasks. But it doesn't display like the applescript and pure python versions with all the icons and sections (a la your screen grab). If I type 'things ' a full list of every task in Things appears instead.

 

Applescript version is working fine here. :)

 

Great! If it runs, then it's the one I'm gonna stick with debugging. Not worth supporting three versions at once. I think the projects and lists were sorted to the bottom, after the tasks, in the initial version, but I've changed that. I've also fixed it so that it only pulls open tasks, where before it was pulling open, completed, and canceled ones. You can get an updated version above—or just stick with the AS version, if that's what you prefer.


  • funkymonkey likes this

alp, Alfred.framework, and my assorted workflows are now abandonware. You can find them at https://github.com/p...stein/Workflows.

 


#6 Net Traveler

Net Traveler

    Newbie

  • Member
  • Pip
  • 8 posts
  • LocationUnited States

Posted 26 March 2013 - 08:13 PM

I love the idea! The Objective-C version was working for me, then I tried the Applescript version after you updated and it won't let me add or search tasks.



#7 phyllisstein

phyllisstein

    Advanced Member

  • Member
  • PipPipPip
  • 370 posts
  • LocationNew York, NY

Posted 27 March 2013 - 01:46 AM

Hey phyllisstein, this is a really cool workflow and I am flirting with the idea of using obj-c for a workflow and was wondering if there is anywhere I could browse the source for this workflow on GH or something to get an idea of how one would go about it? If not are there any docs you used to create the workflow or did you just figure it out on your own?

 

Thx

Glad you like it! I've just pushed the code to https://github.com/p...ThingsWorkflow. I mostly figured it out on my own, with some aggressive Googling when I got stuck, but the basic process is to create a Foundation command-line tool that outputs the XML David describes here: http://www.alfredfor...k-in-workflows/

 

ETA: Also, this one relies on Scripting Bridge to communicate with Things, which is where Things.h comes from. You can generate that header file by running:

sdef /path/to/application.app | sdp -fh --basename applicationName

 

 

I love the idea! The Objective-C version was working for me, then I tried the Applescript version after you updated and it won't let me add or search tasks.

I think I'm gonna stick with the Obj-C version as the officially-supported one. I've removed the other two from the initial post. Adding and searching tasks appear to work fine, albeit with a slight delay while it checks each task for whether it's open or not.


Edited by phyllisstein, 27 March 2013 - 01:55 AM.

alp, Alfred.framework, and my assorted workflows are now abandonware. You can find them at https://github.com/p...stein/Workflows.

 


#8 bmscmoreira

bmscmoreira

    Member

  • Member
  • PipPip
  • 31 posts

Posted 28 March 2013 - 09:47 AM

Hmm for some reason the applescript isn't working for me. I use the "Things" keyword and the dialog "Things Tasks" appears but it isn't populate with my existing tasks / projects.

Using Things 2.1.1 and Alfred 2.0.2.



#9 sphardy

sphardy

    Member

  • Member
  • PipPip
  • 81 posts

Posted 28 March 2013 - 10:15 AM

Hmm for some reason the applescript isn't working for me. I use the "Things" keyword and the dialog "Things Tasks" appears but it isn't populate with my existing tasks / projects.

Using Things 2.1.1 and Alfred 2.0.2.

 

Seeing the same - get no feedback at all from this workflow, neither can I create tasks



#10 phyllisstein

phyllisstein

    Advanced Member

  • Member
  • PipPipPip
  • 370 posts
  • LocationNew York, NY

Posted 28 March 2013 - 10:36 AM

Hmm for some reason the applescript isn't working for me. I use the "Things" keyword and the dialog "Things Tasks" appears but it isn't populate with my existing tasks / projects.

Using Things 2.1.1 and Alfred 2.0.2.

 

 

Seeing the same - get no feedback at all from this workflow, neither can I create tasks

 

Sorry that it's giving you trouble, guys. Wanna do me a favor and change the script filter so that it runs the following command, then let me know what shows up in the log file? I'll be able to try a solution once I have a better idea of what the problem is.

 

./ThingsWorkflow {query} 2>&1 | tee feedback.log

alp, Alfred.framework, and my assorted workflows are now abandonware. You can find them at https://github.com/p...stein/Workflows.

 


#11 sphardy

sphardy

    Member

  • Member
  • PipPip
  • 81 posts

Posted 28 March 2013 - 10:40 AM

Afraid I get nothing in the log. If I enter "Things Test Task" and press enter - nothing; Alfred window just stays open, no action and no log content



#12 bmscmoreira

bmscmoreira

    Member

  • Member
  • PipPip
  • 31 posts

Posted 28 March 2013 - 10:42 AM

Yes. The feedback.log file is created but with no content (0 bytes).



#13 bmscmoreira

bmscmoreira

    Member

  • Member
  • PipPip
  • 31 posts

Posted 28 March 2013 - 10:48 AM

Just a hint. I am using Dropbox sync within Alfred. Are you too @sphardy?



#14 sphardy

sphardy

    Member

  • Member
  • PipPip
  • 81 posts

Posted 28 March 2013 - 10:49 AM

Found the source of the issue: I tried running the ThingsWorkflow binary directly from a terminal window - I get no feedback at all

 

Yes - I'm running with Dropbox Sync also, though I tried copying the binary outside of Dropbox and runningfrom there - no change


Edited by sphardy, 28 March 2013 - 10:50 AM.


#15 phyllisstein

phyllisstein

    Advanced Member

  • Member
  • PipPipPip
  • 370 posts
  • LocationNew York, NY

Posted 28 March 2013 - 11:14 AM

When you run it from the command line, does it hang for a while and then have to be killed, or does it immediately drop you back to the command prompt?


alp, Alfred.framework, and my assorted workflows are now abandonware. You can find them at https://github.com/p...stein/Workflows.

 


#16 sphardy

sphardy

    Member

  • Member
  • PipPip
  • 81 posts

Posted 28 March 2013 - 11:15 AM

The former - just hangs and has to be killed



#17 bmscmoreira

bmscmoreira

    Member

  • Member
  • PipPip
  • 31 posts

Posted 28 March 2013 - 11:21 AM

When I try to run ThingsWorkflow binary from the Terminal i get

"Illegal instruction: 4"
but no hanging...
 
hmm perhaps an OS issue? (mountain lion here).
 
"The "illegal instruction" message is simply telling you that your binaries contain instructions the version of the OS that you are attempting to run them under does not understand. I can't give you the precise meaning of 4 but I expect that is internal to Apple." (from stackoverflow)

Edited by bmscmoreira, 28 March 2013 - 11:22 AM.


#18 phyllisstein

phyllisstein

    Advanced Member

  • Member
  • PipPipPip
  • 370 posts
  • LocationNew York, NY

Posted 28 March 2013 - 11:28 AM

The former - just hangs and has to be killed

Alright, I suspect that what's happening in your case is that it's taking too long to iterate through all of your tasks and check to see whether they're open. It only takes an instant normally, but I can see how it would start to cascade. I've uploaded a new version to the address linked in the first post that doesn't do that check; see if you have better luck with that.

 

When I try to run ThingsWorkflow binary from the Terminal i get

"Illegal instruction: 4"
but no hanging...
 
hmm perhaps an OS issue? (mountain lion here).
 
"The "illegal instruction" message is simply telling you that your binaries contain instructions the version of the OS that you are attempting to run them under does not understand. I can't give you the precise meaning of 4 but I expect that is internal to Apple." (from stackoverflow)

I'm also on Mountain Lion, so that strikes me as especially strange. I'll poke around a bit, but try the updated version in the meantime and see if it works any better.

 

ETA: Just uploaded a second revised version with the build target adjusted down to 10.6, which was one suggested solution. Maybe that'll help a bit.

 

Edited Again to Add: And a third version, again at the same link, properly built for both 32- and 64-bit systems. Sorry for the multiple tries, my Obj-C is a little rusty.


Edited by phyllisstein, 28 March 2013 - 11:44 AM.

alp, Alfred.framework, and my assorted workflows are now abandonware. You can find them at https://github.com/p...stein/Workflows.

 


#19 bmscmoreira

bmscmoreira

    Member

  • Member
  • PipPip
  • 31 posts

Posted 28 March 2013 - 11:47 AM

Alright, I suspect that what's happening in your case is that it's taking too long to iterate through all of your tasks and check to see whether they're open. It only takes an instant normally, but I can see how it would start to cascade. I've uploaded a new version to the address linked in the first post that doesn't do that check; see if you have better luck with that.

I'm also on Mountain Lion, so that strikes me as especially strange. I'll poke around a bit, but try the updated version in the meantime and see if it works any better.

ETA: Just uploaded a second revised version with the build target adjusted down to 10.6, which was one suggested solution. Maybe that'll help a bit.


Yes, improved :) now "Things" keyword makes the tasks / projects / areas list appear (as in the first screenshot) and selecting any of them will open Things main app in the corresponding section.

Adding tasks works: I've managed to add a task with title, notes, areas, projects. But wasn't able to pass in tags and duedates.

Edited by bmscmoreira, 28 March 2013 - 11:47 AM.


#20 phyllisstein

phyllisstein

    Advanced Member

  • Member
  • PipPipPip
  • 370 posts
  • LocationNew York, NY

Posted 28 March 2013 - 12:05 PM

Yes, improved :) now "Things" keyword makes the tasks / projects / areas list appear (as in the first screenshot) and selecting any of them will open Things main app in the corresponding section.

Adding tasks works: I've managed to add a task with title, notes, areas, projects. But wasn't able to pass in tags and duedates.

Excellent! Glad we're getting somewhere. You're right that tags were fouling it up, since Alfred doesn't escape "#"; adding a plus sign to the beginning of the query should fix it in your version, but I've also uploaded yet another revision that should allow you to enter tags without the plus. If I remember correctly, the tag must already exist in order for you to use it, and due-dates' formats are something like ">+n," where n is a number of days. This may take some experimenting, though, since Cultured Code pulled their docs on it.


alp, Alfred.framework, and my assorted workflows are now abandonware. You can find them at https://github.com/p...stein/Workflows.

 




Also tagged with one or more of these keywords: things, to-do, feedback

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users