Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
"Run Pythonista Script" Widget: How to write script that can email selected photos from my phone's camera roll?
-
Brief background: I take lots of pictures on my phone. Whenever one comes out well, I go into my phone's camera roll, select that picture, and email it to a family member (the same family member, and thus the same email address, every time). This is a multistep process though, so is kind of annoying, and the steps are identical every time. Thus it seems ripe for automation.
My goal: What I'd like to do is write a Pythonista script that will attach and email the picture for me. Ideally, I'd like to go into my camera roll, select the photo (or photos) I want to send, and then (rather than selecting my email app, attaching, typing in the email address, etc.) simply tap "Run Pythonista Script" and have Pythonista take care of the rest.
Is this type of thing possible? I've done some Google searches which suggest it is, but the key thing I can't figure out is how to automate the picture attachment based on my selection(s) in the camera roll. In a perfect world, I'd love for someone to just give me the script here lol, but failing that, any info you can provide about how to do this would be appreciated. I've never written one of these widget scripts, and the iOS file structure is beyond me, so I really don't know where to start. Thanks in advance.
-
@wannabegeek, unless you want to do this in Python for learning purposes, I would recommend using Apple Shortcuts, where creating this workflow will take you about 1 minute. Suggest creating one that takes the images as input, so you can just share them from Photos.
-
You know what, that's a fantastic idea. I didn't even know about Shortcuts in iOS, but looking into it, this seems like a vastly simpler solution. Thank you!
-
Side note, Pythonista has some hooks in Shortcuts as well for kicking off scripts. So even if that's not the best route for this particular project, it's a REALLY powerful tool to keep in your back pocket.
I have a shortcut called "Burn" that starts a Pythonista script that shows a fire gif and plays a rap air horn... so... lol