As promised in the show, I have a full blog post on my Drafts action group:
Hi. Iâm not able to download the shortcut because I get a message that my settings do not allow me to download untrusted shortcuts. Iâm not seeing where to go to turn on the setting to allow me to download it. Any advice? Thank you for your wonderful show.
Steps to allow can be found in this article and includes screenshots.
Iâve been using Python and Pythonista to deal with this. Itâs nothing fancy, I made it on a train ride after a particularly stressful packing. So for anyone interested:
I have a folder on iCloud Drive with the script and multiple .txt files. Each .txt file is named after a category; items are in the file on a new line. The script can be run on macOS or iOS (in shortcuts its just opening this URL: pythonista3://Packing_list/Packing_list?action=run&root=icloud). It will create a project in Things and add the items under category Headings.
I will be adding some of the stuff you talked about, like the dictionary for the basics, iPad etc. Right now, it just adds everything from the files.
import urllib
import webbrowser
def LoadData(FileName):
file = open(FileName, "r")
file_text = file.read()
text_list = file_text.split("\n")
del text_list[-1]
return text_list
categories = ['-', '-', '-', '-', '-']
data = []
for item in categories:
data.append(LoadData("%s.txt" % item))
s = ''
counter = 0
for category in data:
s += '{"type":"heading","attributes":{"title":"%s"}},' % items[counter]
counter += 1
for i in category:
s += '{"type":"to-do","attributes":{"title":"%s"}},' % i
a = urllib.parse.quote('{"type":"project","attributes":{"title":"Packing List","items": [%s]}}' %s)
json = ('things:///json?data=[%s]' % d)
webbrowser.open(json)
Hi @RosemaryOrchard thanks for sharing your blog post. Would there be a way for the shortcut to get the number of nights and then use this to suggest a qty of certain items eg 4 night calendar means 4 Ă underwear, 4 x socks etc
If so can you point me in the direction to working it out
Thatâs not something I planned for in the Drafts version and it would require some thinking - just adding an overall x4
to everything doesnât make sense - itâs unlikely youâd take 4 iPhones on a trip (well, maybe some people would but most people wonât). Iâll have to have a think as to the best way to implement this!
No you would only want to flag certain items that were required per night.
My thoughts were run through each item and if flagged multiply by nights and then add to drafts document.
I presume in general categories could be considered âper nightâ, rather than individual items? E.g. clothing as a category would probably have a per night counter, where as technology wouldnât. Thatâs the approach Iâm thinking of right now.
I would have thought that would be too broad. Gloves, coat and pairs of shoes are all common clothing items, but you wouldnât take one per night.
I think it will have to be per item, as you have said only some clothes may be per night. Medicines/toiletries some may be per night etc.
@RosemaryOrchard Your packing list extravaganza shortcut is exactly what I need. But I am running into a problem with the Scriptable action. I assume I am supposed to copy the script from the comment into a new script; done. Now when I run the shortcut, shortcuts crashes when it gets to the scriptable action. It seems to run the action (the new list is created) but then I get kicked back to the home screen.
Has anyone has a similar problem? Or have any guesses what is causing my issue?
Here is the shortcut with my changes.
Any help would be appreciated.
Update: The shortcut seems to be working now. No idea what the issue was.
Hello everybody,
this is my very first post so let me hi to the forum!
One question about the Scriptable based version: is there any way to add the category name to the resulting checklist? I mean a checkbox with the name of each selected category at the beginning of the corresponding list.
Cheers
Gaetano
@MacSparky I improved the Shortcut for easy maintenance/editing by making it read the contents of a note from Bear. I use the trim action provided by the app Toolbox Pro to cut the title and tags/whitespace at the end of the note and then parse the contents by separating them into items at each line break.
Those items are then added to Things.
By that I can comfortably make changes in Bear without the need to edit the dictionary in Shortcuts, which I find a bit more tedious.
Especially reordering is a breeze, as Bear supports âline bubblingâ (ââ„â / ââ„â) like most code editors.
Thanks for the inspiration
I donât see how to download/import the drafts actions. I have never added actions to drafts this way, so I just may be missing it.
So many ideas in this show!
Currently trying to use the Trello list shortcut. Iâm getting an error when it gets to âCreate the list trip in untitled boardâ with âdata in the wrong formatâ. Iâve tried a few things but havenât workout out what is broken!
I found the issue! For some reason the event picker was set to the Calendar âHolidays in the United Kingdomâ and it obviously didnât like that. Reset it to one of my own calendars and now it works beautifully. Brilliant work Rosemary!