Clear & Pythonista UPDATE

Hello! I wrote an improved version of this workflow. You can find it here.

If you downloaded my previous workflow to fix an ordinary list and send it to Clear, you may want to check it again.

Since we were using the args parameter instead of argv, I was having problems with spaced and accented items. I decided to stick to the argument and play with encodings in python. First, let's reinstall the Drafts action:

Tasks to Clear:

pythonista://Commas2Clear?action=run&args={{[[draft]]}}

And the let's change our Commas2Clear script in Pythonista:

from urllib import quote,unquote
from webbrowser import open

a = unquote(sys.argv[1]).split('\n')

clear = 'clearapp://list/create?listName=' + quote(a[0].decode('latin-1')) + '&tasks=' + quote(', '.join(x for x in a[1:]))

open(clear)

You're good to go. Happy list-making.