Jump to content
ipaterson

Wunderlist Workflow

Recommended Posts

Wunderlist Workflow for Alfred
Create tasks in Wunderlist more effortlessly than ever before with this Alfred workflow (requires Alfred 2 or 3 with Powerpack license).
Beginner and advanced approaches to adding a monthly repeating task beginning the following week:
ff5acaea-0a3b-11e5-93f9-74b4b14039dc.gif

Setup

Download here
After downloading, simply double-click to install the workflow in Alfred. Use the wl command in Alfred to activate the workflow, or assign a hotkey in Alfred preferences. The workflow will guide you through securely logging in to Wunderlist and will even let you know when an important update is available.

Documentation and Examples

My apologies, but it is not feasible to keep documentation in this thread in sync with the project page. 

Edited by ipaterson

Share this post


Link to post

I hope it works well for everyone. I will be adding it to alfredworkflows.com once version 0.2 is ready, so if you find anything that is not working outside of the known bugs please let me know. 

 

Also, I believe that Wunderlist uses twui, which accounts for some of the inaccessibility and all the "AXUnknown" UI elements. Does anyone have experience using AppleScript with twui or have any idea how to get more insight from either UI Browser or Accessibility Inspector?

Share this post


Link to post

I notice that when I add an item, my terminal window pops up. Is that normal?

 

I noticed that yesterday and was able to fix it this morning. That is scheduled for the next version, 0.2, but I should probably just do a hotfix against 0.1 because that would be particularly perturbing for people who do not use the terminal.

 

It's supposed to send you back to the app you were using previously, oops!

Share this post


Link to post

I notice that when I add an item, my terminal window pops up. Is that normal?

 

Please use your update manager to pull in the fix, dubbed version 0.101 because alleyoop is a bit strict on version numbers.

Share this post


Link to post

NEW: Preview of version 0.2 that will introduce autocompletion of lists when entering tasks

 

The next major update is coming soon, but before I release it I would like some help testing! Please download the 0.2-beta.1 release and let me know whether it works for you and if you have any suggestions. There are a few other minor changes coming in 0.2, so hopefully once I hear back on the preview it will be nearly time to release the update. The beta linked above will update via alleyoop once the final version 0.2 is released.

 

The wl command now supports autocompletion and partial entry of lists to make task entry more efficient. Simply begin typing the name of a list and press tab or return to complete the list name. Alternatively, just type a few letters of the list name followed by a colon.

All of these should work fine for adding tasks to your "Today" list:

  • wl to + tab + wl Today:List gadget on eBay + return
    • Autocompletes the full list name
  • wl to:List gadget on eBay + return
    • Adds a task based on just the partial list name without autocompletion
  • wl List gadget on eBay + down arrow to select Today + return
    • The "old way," this still works in 0.2

The autocompletion is based on simple substrings, so you can match a Read Later list with re or late or d l (any consecutive letters) but not rl. The matching also ignores case and accents so a folder named Tecnología could be matched with tecnologia. Always good to have improvements for the future, abbreviation-style matching might be available later if anyone wants it.

Edited by ipaterson

Share this post


Link to post

Wunderlist 2.3.0 compatibility

This workflow is compatible with just-released Wunderlist 2.3.0. Be sure to update Wunderlist in the Mac App Store to take advantage of a limited time free trial of new features in Wunderlist Pro!

 

Unfortunately, this update does not bring any changes that make the planned features of this workflow easier to implement.

Edited by ipaterson

Share this post


Link to post

Hi, I tried the new beta and it works pretty well as long as I don't type too quickly.

 

If I type "wl to" then tab too quickly, it automatically outputs "wl Starred."

Edited by kimonostereo

Share this post


Link to post

Good observation, I'm going to have to dig around to see what others have done about that. Alfred calls the script on an interval, starting immediately after the first letter. It gets "t" which matches Starred, Today, and probably some of your custom lists.

 

There are two workarounds for that. First, you could enter "y" and then press tab because Today is the first list with that letter, or you could skip the tab altogether and type "wl to:Feed the goldfish." The "to:" will match "Today" and you won't have the problem with typing too quickly. 

 

I would like to find a way in general to avoid the problem though. I've noticed a few times that the task I entered was missing the last few letters. Instead of sending the actual text you've typed to the next step in the workflow, Alfred sends the text as reported by the script. I'll dig around on the forums for that, for now I've opened a bug report here if you want to follow any updates.

Share this post


Link to post

Hi, I tried the new beta and it works pretty well as long as I don't type too quickly.

 

If I type "wl to" then tab too quickly, it automatically outputs "wl Starred."

 

Good news, I was able to optimize the code by 30%, but also found that by launching the script in a different way from Alfred I can cut it down to near instant feedback. It should be much better for you, I'll have a 0.2-beta.2 preview for you to test tomorrow!

Share this post


Link to post

NEW: Second preview of version 0.2 which introduces autocompletion of lists

 

Please download the 0.2-beta.2 release to test a few minor bug fixes and hopefully faster responses to typing in Alfred. 

 

This isn't as fast as I would like it to be, after 0.2 is released I might take another stab at optimizing it. 

Share this post


Link to post

Hi, I tried the new beta and it works pretty well as long as I don't type too quickly.

 

If I type "wl to" then tab too quickly, it automatically outputs "wl Starred."

 

It seems that about 2/3 of the delay in responding to the keyboard is due to overhead in loading the script processor. I did some investigation with details here to find whether that could be improved simply by using a different programming language to handle the responses and it seems like PHP may be the best choice. I will switch over to PHP for handling the keyboard input after 0.2 is released.

Share this post


Link to post

Trying out .2-beta 2 tonight. It's faster! But I think it's so fast that it skips the last letter of the to do and sometimes does not completely enter it into the list. Will play with it more to see if I can reproduce the issue for you.

Share this post


Link to post

I'll put out a third beta within the next few days to test the PHP list filter. I started and got it working today but need to do some testing and cleanup. It shaves off another 60% from the delay on the current 0.2-beta.2. That brings the feedback right into the 60ms range which is going to be much better for fast typers than 160ms.

 

Thanks for all your help, kimonostereo! It's important to get this right since fast feedback will be important for other features as well.

Share this post


Link to post

NEW: Third preview of version 0.2 which introduces autocompletion of lists


 


Please download the 0.2-beta.3 release to test the last remaining bug fixes for this version and much faster responses to typing in Alfred.


 


This update uses PHP rather than AppleScript to respond to user input in Alfred because it was much faster and not terribly complicated. My preference would be to abandon PHP in favor of a Cocoa cli script because PHP is not going to play well with certain goals of the workflow like localization.


 


Also, due to feedback from a user on GitHub, the workflow no longer assigns Wunderlist to all desktops if the list info cannot be loaded. More info is available on the release page.


Edited by ipaterson

Share this post


Link to post

New version 0.2 – List Autocompletion

 

The wl command now supports autocompletion and partial entry of lists to make task entry more efficient. Simply begin typing the name of a list and press tab or return to complete the list name. Alternatively, just type a few letters of the list name followed by a colon.

All of these should work fine for adding tasks to your "Today" list:

  • wl to + tab = wl Today:
    • Autocompletes the full list name
    • Type your task after the colon then press return to add it to Wunderlist
  • wl to:List gadget on eBay + return
    • Adds a task based on just the partial list name without the tab key autocompletion step
  • wl List gadget on eBay + down arrow to select Today + return
    • The "old way," this still works in 0.2

Download the latest release or grab the update through Alleyoop!

 

Known Issues

Response speed and missing characters
A lot of effort went into making response to list filtering very fast. However, if you are a very fast typist you may notice that the last few characters are missing from your task. It is best to wait a moment before pressing return to ensure that your task is complete. Alfred needs a split second (about 60ms) to catch up with your typing, a number that I hope to improve in future versions.

Issues with "special characters"
What seemed like a great convenience for typing the text of tasks and lists into Wunderlist turned out to be a mistake. Tasks containing "special characters" such as accented letters may be entered incorrectly in Wunderlist. For example, the task Sonreír más is entered as Sonrear mas.

Localization
Users is languages other than English may notice that Alfred shows lists that do not accept tasks. For example, the "Week" list or the "Assigned to Me" list will be visible in Alfred even though you cannot add tasks to them. This is an unfortunate side effect of improving feedback speed for autocompletion. Currently the feedback is handled by PHP because it was the fastest option, but PHP is not very friendly with Mac specifics such as querying the localization of the Wunderlist app to find the display name of the "Assigned to Me" list. This will be addressed in the future, hopefully by switching from PHP to a Cocoa application.

Share this post


Link to post

Bug fixes

Version 0.2 was updated to 0.202 today with the following fixes:

  • There is an OS-level bug in Mavericks that breaks the workflow's settings any time a list value is stored, this update introduces a workaround that allows the wl command to work again.
  • The "Most recently used" option may not have worked properly when adding new tasks
  • In some cases, tasks containing a : colon character were not inserted correctly
  • Problems adding tasks when the Wunderlist window is closed or minimized.

Grab the update through your alleyoop update manager or download the update here.

 

Other News

Testing is now semi-automated which will help improve the reliability and convenience of releases. There were a growing number of test cases, and this should generally reduce friction with adding new cases. Clone the repo, then switch to the develop branch and run ./run_tests.sh if you want to help test!

 

Also, the Wunderlist team is now aware of the workflow which may give a bit of pull to implementation of AppleScript in Wunderlist. I received confirmation that AppleScript support is still on the roadmap. Once that change is made it will be possible to abandon all/most of the UI automation that this workflow depends on. Rather than having to show Wunderlist then throw keyboard shortcuts at it until it shows the correct screen, Wunderlist would expose a simple API allowing tasks and lists to be read and edited with ease.

 

Version 1.0 of the workflow will coincide with that update in Wunderlist. Since there is no way to know whether that is weeks or months away, upcoming versions 0.3 and 0.4 intend to add a few more features the hard way.

Edited by ipaterson

Share this post


Link to post

Hey Ian, 

 

Thank you for this workflow but I'm having problems with the shortcut it seems. everytime i type wl, I'm automatically redirected to the app and therefor can't type the rest of my query in alfred. I downloaded the lastest version of your script 0.202 but still having the same issues. 

 

Any suggestions would be very helpful. Thanks  :)

Share this post


Link to post

@ltdxdtl and @jumland can you make sure that Access for Assistive Devices is enabled for Alfred? See the instructions on the first page of this thread and let me know if there is still a problem.

 

It sounds like the workflow is trying to load information about your lists in Wunderlist. That info is stored so that the workflow can operate without activating Wunderlist until you add a task. What you described should only happen once on the first use, so if it is happening continuously my first guess is that the workflow is not being permitted to load that list info. Fingers crossed!

Share this post


Link to post

Please let me know if the Access for Assistive Devices setting was the culprit. I hope to hear back, especially if this is a different issue that might affect other users.

 

In the meantime, I have planned an enhancement that will make the issue described in my previous post easier for the user to discover and resolve. This will be pushed out as a hotfix to the current version to avoid any further confusion.

Share this post


Link to post

I've got latest version, whatever i'm trying to do with wl*, it creates 5 New list items in my mac wunderlist app.

 

Wow that's a new one, can you explain the exact steps you're taking? For example

  1. Alt+Space to open Alfred
  2. Type "wl a new task" in Alfred
  3. Press Down arrow a few times to select my first custom list
  4. Press Return to add the task
  5. Wunderlist appears
  6. The custom list is selected
  7. The task is added to the list
  8. The task input is populated again and another task is added to the list

Also, which versions of Mac OS, Wunderlist, and Alfred are you running? Thanks for the report, hopefully we can figure this out...

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