Deprecated: Return type of I::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/i.php on line 62

Deprecated: Return type of I::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/i.php on line 91

Deprecated: Return type of I::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/i.php on line 71

Deprecated: Return type of I::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/i.php on line 101

Deprecated: Return type of I::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/i.php on line 53

Deprecated: Return type of Collection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/collection.php on line 80

Deprecated: parse_str(): Passing null to parameter #1 ($string) of type string is deprecated in /home/public/kirby/toolkit/lib/url.php on line 135
One Tap Less | Clear & Pythonista UPDATE

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.