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

Clear & Pythonista

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

You love Clear and you love URL schemes, but you definitely hate whatever is on the deeper layers of your keyboard. Specially commas. And Clear needs those to send more than a single task to a list. It bothers me so badly I moved to Ita. However, now with Pythonista, I can use Clear again.

This trick is absurdly simple and I must thank Eric Pramono for cleaning up my dirty python code. But first we're going to add a little action to Drafts to send the contents of the doc to Pythonista.

Tasks to Clear:

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

Super simple, right? This action will send your current draft to Pythonista and run the workflow Commas2Clear.

from urllib import quote
from webbrowser import open
a = sys.argv[1].split('\n')
clear = 'clearapp://list/create?listName=' + quote(a[0]) + '&tasks=' + quote(', '.join(x for x in a[1:])) 
 open(clear)

This is it. This rule will parse the first line of your draft as the name of the list, meaning that you can create or append to any list. The remaining items will be comma-separated and added to the aforementioned list.