Jump to content

Things: Search, Show, and Add Tasks


Recommended Posts

Hah, would you believe that in my haste to get a working solution out I left the absolute path to my ~/Library directory in there? It should find your Things properly as of this update: http://alfred.daniel.sh/Workflows/Things.alfredworkflow

Been missing for a while :) but tested this latest version and improvements are great! syntax works great (however not being able to add date i.e. using >+x (being x number of days).

Link to comment

Any chance of Alleyoop support soon? Given you're the author... ;-)

It supports the latest version of Alleyoop, which was just updated a few hours ago. Any future updates should come through there.

 

Been missing for a while :) but tested this latest version and improvements are great! syntax works great (however not being able to add date i.e. using >+x (being x number of days).

Just put out a fix for that and for problems with tagging. Should work a bit better now.

Link to comment

It supports the latest version of Alleyoop, which was just updated a few hours ago. Any future updates should come through there.

 

Not for me it doesn't. Just reinstalled as a precaution and to be sure I got the latest version, but here's what I see in Alfred:

 

Missing%20things.jpg

Link to comment

Not for me it doesn't. Just reinstalled as a precaution and to be sure I got the latest version, but here's what I see in Alfred:

 

Missing%20things.jpg

Hm, when was the last time you downloaded Things? As of now, it's showing up in oop? for me; if I change the version in the workflow's folder, it shows up with oop. You could check to see if there's an update.json file extant, or just try downloading a new copy by hand and seeing if it works any better.

Link to comment

I'm running Things v2.1.1 from the App Store which I expect is the latest version (no updates reported for some time)

 

Prior to my previous post I downloaded new versions of both the Things and AlleyOop workflows - no change.

 

Yes I do have a update.json file in the workflow folder with the following contents:

 

{
    "version": 2.1,
    "remote_json": "http://alfred.daniel.sh/Updates/Things.json"
}
Link to comment

Ummm... the latest workflow has also stopped working for me with symptoms as I reported before - get no items listed

 

The version with the binary worked for me after you made a fix (see post #25 of this thread)

As I've said, "doesn't work" doesn't give me a lot to go on. There are three possible ways to get output from something that "just doesn't work": adding a copy-to-clipboard or Notification Center output to the script filter, or changing the script filter so that it has 2>&1 | tee feedback.log at the end. I usually recommend the last one.

Link to comment

I've done some debugging

 

First, the hard coded path to my Things database (line 14 of feedback.py) is incorrect. (Should be ~/Library/Application Support/Cultured Code/Things/ThingsLibrary.db)

 

Once I corrected that I then got some output indicating an error:

Traceback (most recent call last):
  File "feedback.py", line 118, in <module>
    do_feedback()
  File "feedback.py", line 59, in do_feedback
    icon = os.path.join(alp.local(), "images", "{0}.png".format(area))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u30fb' in position 7: ordinal not in range(128)
Link to comment

I've done some debugging

 

First, the hard coded path to my Things database (line 14 of feedback.py) is incorrect. (Should be ~/Library/Application Support/Cultured Code/Things/ThingsLibrary.db)

 

Once I corrected that I then got some output indicating an error:

Traceback (most recent call last):
  File "feedback.py", line 118, in <module>
    do_feedback()
  File "feedback.py", line 59, in do_feedback
    icon = os.path.join(alp.local(), "images", "{0}.png".format(area))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u30fb' in position 7: ordinal not in range(128)

Thanks, that's very helpful. Though I hate to see my old nemesis UnicodeEncodeError again. I've reworked the code so that if there's nothing in ~/Library/Containers, it'll use the path you specified (I assumed, incorrectly, that the sandboxed location would be a constant), and tried decoding the Unicode before passing it to os.path.join(), though I'm not positive the solution I tried will be effective. Give it a shot and see if it works any better—I'll keep digging through the documentation on that damned exception in the meantime.

Link to comment

Progress, but appear to be hitting a similar issue still:

 

Traceback (most recent call last):
  File "feedback.py", line 125, in <module>
    do_feedback()
  File "feedback.py", line 65, in do_feedback
    de_area = area.decode("utf-8", "replace")
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u30fb' in position 7: ordinal not in range(128)
Link to comment

Progress, but appear to be hitting a similar issue still:

 

Traceback (most recent call last):
  File "feedback.py", line 125, in <module>
    do_feedback()
  File "feedback.py", line 65, in do_feedback
    de_area = area.decode("utf-8", "replace")
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u30fb' in position 7: ordinal not in range(128)

Progress I like! It's possible that I was calling decode on UTF-8 when I should've been calling encode for ASCII. Just spat out a new version; if this one still chokes, there's another codecs module I can try.

Link to comment

More progress. Now I'm getting the Alfred list and can add tasks once again (no silent failure) so all seems to be working, but need more time to test properly

 

However you made a change previously to force Things to the front when searching, a change that appears to be missing from the applescript snippet in act.py (can't remember the exact code)

 

Could you please add that back?

Link to comment

Terrific! I'd forgotten about that change when I rolled back to an old Python version; I just added it back in and uploaded a fixed copy. It still leaves Things in the background when adding tasks, since that's the way the Quick Entry panel behaves, but I can adjust that too, or re-add the feedback messages (which felt kind of annoying), if it seems counterintuitive.

Link to comment

Brilliant - that's Issue #1 fixed  ;) so many thanks for this.

 

Issue #2: As reported, the Things Workflow still doesn't appear to AlleyOop for me. There was an update to AlleyOop (v2.0 - Security Fixes) that I just installed, but the issues remains afterwards

 

For completeness, the update.json file now shows this:

 

{
    "version": 2.13,
    "remote_json": "http://alfred.daniel.sh/Updates/Things.json"
}
Edited by sphardy
Link to comment

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
×
×
  • Create New...