Jump to content
phyllisstein

Things: Search, Show, and Add Tasks

Recommended Posts

How do I put a task in a project. I have a Project called Billing. Please give me an example as I don't quite understand the syntax in the first post.

Share this post


Link to post

taskname [Billing]

 

(assuming Billing project is already created in Things; you can't create a new project from the workflow, I believe a limitation of Things itself).

 

PS: also applies to Areas

Share this post


Link to post

Daniel,

 

I have found another problem, that might be related to Unicode. A soon as I want to create a task that includes some special characters, the workflow looses track. See screenshots.

 

73NS+.png

 

8QVe+.png

 

What might be the cause?

 

Kristof

Edited by KrOstir

Share this post


Link to post

Daniel,

 

I have found another problem, that might be related to Unicode. A soon as I want to create a task that includes some special characters, the workflow looses track. See screenshots.

 

Screen%20Shot%202013-04-22%20at%2011.56.

 

Screen%20Shot%202013-04-22%20at%2011.56.

 

What might be the cause?

 

Kristof

 

The problem with unicode symbols was already discussed here and here.

Share this post


Link to post

Daniel,

 

I have found another problem, that might be related to Unicode. A soon as I want to create a task that includes some special characters, the workflow looses track. See screenshots.

 

73NS+.png

 

8QVe+.png

 

What might be the cause?

 

Kristof

 

A small change to alp's fuzzy search module seems to have helped on my end; let me know how it works for you: http://alfred.daniel.sh/Workflows/Things.alfredworkflow

Share this post


Link to post

I'm having similar issues as KrOstir - whenever I type a square bracket to add a task to a Project, it breaks out of the workflow and tries to search Google. I just re-downloaded from your site to make sure I have the latest version. I'm having the same problem with Alleyoop too when there is a ? or ! (ie oop? or oop!, so I can't refresh oop).

 

Here are screenshots:

 

Screen%20Shot%202013-04-25%20at%209.57.5

 

 

Screen%20Shot%202013-04-25%20at%209.58.1

 

Any ideas?

Share this post


Link to post

Looks like it was another issue with alp's fuzzy matching—the bracket was being interpreted as part of a regex, not as part of the literal string. Did a quick-and-dirty test and it seems to be working now: http://alfred.daniel.sh/Workflows/Things.alfredworkflow

 

Still not working for me. I deleted the old one and downloaded again, but still breaking out to Google search whenever I type the opening square bracket.

Share this post


Link to post

Here's feedback.log for a test task I just tried to add:

 

Traceback (most recent call last):
  File "feedback.py", line 126, in <module>
    do_feedback()
  File "feedback.py", line 106, in do_feedback
    things = alp.fuzzy_search(q, v)
  File "/Users/mattbanks/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.66D8DB0B-72E6-4303-91C6-29384836DDA2/alp/fuzzy.py", line 144, in fuzzy_search
    R = match_rank(query, [key(el) for el in elements], seq=seq)
  File "/Users/mattbanks/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.66D8DB0B-72E6-4303-91C6-29384836DDA2/alp/fuzzy.py", line 113, in match_rank
    mat = [re.match(expr, s, re.IGNORECASE) if query[0:seq].lower() in s.lower() else None for s in strings]
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 137, in match
    return _compile(pattern, flags).match(string)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 244, in _compile
    raise error, v # invalid expression
sre_constants.error: unbalanced parenthesis

Share this post


Link to post

Strange, I can't seem to reproduce the error; even if I throw some parentheses into the task, nothing in the task syntax breaks on my end. I've just uploaded my working copy again; you might want to try grabbing it to make sure I didn't do something foolish like neglect to export the new version.

Share this post


Link to post

Strange, I can't seem to reproduce the error; even if I throw some parentheses into the task, nothing in the task syntax breaks on my end. I've just uploaded my working copy again; you might want to try grabbing it to make sure I didn't do something foolish like neglect to export the new version.

It's working now! Maybe just an upload error ;)

 

Thanks for all your awesome work on this stuff!

Share this post


Link to post

Hi Daniel,

 

Love the workflow, thank you!

 

Since updating to the latest version of Things (2.2), creating a task with a due date via the workflow causes Things to crash immediately. Do you know of any issues with the newest version?

Share this post


Link to post

Hi Daniel,

 

Love the workflow, thank you!

 

Since updating to the latest version of Things (2.2), creating a task with a due date via the workflow causes Things to crash immediately. Do you know of any issues with the newest version?

 

So it does. I don't know what the problem is; all I can say is that it's not the workflow, since issuing the command from AppleScript Editor crashes it just as certainly. I'll send their support an e-mail, and I suggest that anyone else who sees this do the same.

Share this post


Link to post

Hi Daniel,

 

Love the workflow, thank you!

 

Since updating to the latest version of Things (2.2), creating a task with a due date via the workflow causes Things to crash immediately. Do you know of any issues with the newest version?

 

CulturedCode support tells me that they found the bug today, but it just missed making it into a bugfix build they submitted to the App Store. It'll be in the next scheduled update, so keep an eye on their release notes. For now, it should work if you use >MM/DD/YYYY to set a due date. I'll update the original post accordingly.

Share this post


Link to post

Would be great if this supports natural language for due dates. In one week, in 3 days, today, tomorrow, on march 3, in 4 months etc., There was another things workflow that did this, but it isn't as feature rich as this one. Thanks a lot!

Unfortunately, the entry syntax is fixed by Things. Normally you're able to enter something like >+1 to indicate "one day from now," but a bug in Things 2.2 currently restricts you to using MM/DD/YYYY. Keep an eye on the release notes for upcoming versions; they'll reflect the change when this is fixed.

Share this post


Link to post

Thanks for this, you have no idea how much time it will save me. To be able to quickly jump to a project or area, without Things even being open. Fan-flipping-tastic.

Share this post


Link to post

Unfortunately, the entry syntax is fixed by Things. Normally you're able to enter something like >+1 to indicate "one day from now," but a bug in Things 2.2 currently restricts you to using MM/DD/YYYY. Keep an eye on the release notes for upcoming versions; they'll reflect the change when this is fixed.

 

Oh thanks, then I guess we would have to parse the input with the script and return the date in the standard things format. Or wait for them to fix it. :)

Share this post


Link to post

And if it helps this is the code from the previous plugin that I was using:

 

on tellthings(w)
	tell application "Things"
		parse quicksilver input (w)
	end tell
	error number -128
end tellthings

on testclass(f)
	set teststring to "r"
	try
		set teststring to (f as integer)
	end try
	if (class of teststring) is integer then
		return true
	else
		return false
	end if
end testclass

on alfred_script(q)

if application "Things" is running then
else
	tell application "Things" to activate
	tell application "Finder"
		set visible of process "Things" to false
	end tell
	delay 1
end if
set x to ""
set y to ""
set days1 to 0
set endspace to false
set today to current date

set x to text 1 thru ((offset of "::" in q) - 1) of q
if (offset of "::" in q) = 0 then
	set y to ""
else
	set y to text (offset of "::" in q) thru -1 of q
end if

repeat while endspace is false
	if (text -1 of x) = " " then
		set x to text 1 thru -2 of x
	else
		set endspace to true
	end if
end repeat

if ((count of words of x) < 3) then
	tellthings(x & y)
end if

set foundmnothdate to current date
if (word -2 in x = "next") then
	if (word -1 in x) = "day" then
		set x to text 1 thru ((offset of (word -2 in x) in x) - 2) of x
		tellthings(x & y & ">+1")
		
	else if ((word -1 in x) is in ((current date)'s weekday as string)) then
		set x to text 1 thru ((offset of (word -2 in x) in x) - 2) of x
		tellthings(x & y & ">+7")
	else
		set foundweekdate to current date
		set leftweekdays to 0
		repeat while (word -1 in x) is not in ((foundweekdate's weekday) as string)
			set foundweekdate to (foundweekdate + 1 * days)
			set leftweekdays to leftweekdays + 1
			if leftweekdays > 8 then
				tellthings(x & y)
			end if
		end repeat
		set x to text 1 thru ((offset of (word -2 in x) in x) - 2) of x
		
		tellthings(x & y & ">+" & leftweekdays)
	end if
	
else if (word -3 in x = "in") and testclass(word -2 in x) then
	set days1 to (word -2 in x)
	if (word -1 in x) is in "days" then
	else if (word -1 in x) is in "weeks" then
		set days1 to days1 * 7
	else if (word -1 in x) is in "months" then
		
		set today's month to (today's month) + (word -2 in x)
		set days1 to (((today - (current date)) / 86400) as integer)
	else if (word -1 in x) is in "years" then
		set today's year to (today's year) + (word -2 in x)
		set days1 to (((today - (current date)) / 86400) as integer)
	end if
	set x to text 1 thru ((offset of (word -3 in x) in x) - 2) of x
	tellthings(x & y & ">+" & days1)
else if ((word -3 in x = "on")) and ((word -2 in x) is in "january february march april may june july august september october november decemer") and testclass(word -1 in x) then
	set foundmonthdate to current date
	
	if ((word -2 in x) is in ((today's month) as string)) and ((word -1 in x as integer) ≤ (today's day as integer)) then
		set foundmonthdate's month to (foundmonthdate's month) + 1
	end if
	repeat while (word -2 in x) is not in ((foundmonthdate's month) as string)
		set foundmonthdate's month to ((foundmonthdate's month) + 1)
	end repeat
	set foundmonthdate's day to (word -1 in x as integer)
	set x to text 1 thru ((offset of (word -3 in x) in x) - 2) of x
	set days1 to (((foundmonthdate - (current date)) / 86400) as integer)
	
	tellthings(x & y & ">+" & days1)
else
	tellthings(x & y)
	
	
end if


end alfred_script

 

It used to calculate dates perfectly, I guess the only workaround for this is to parse this script, take the date, convert it to the standard things format (or the date settings as per user's local settings on mac which is what Things accepts now) and then send it across to things. Damn, really hate them for breaking things when updating Things.

Share this post


Link to post

You can add support for utf-8? That would be great!

Screen%20Shot%202013-05-08%20at%203.48.2

Your screenshot is a bit too small for me to read, but it looks like it's working fine. Where are you seeing a problem?

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...