Casey Liss
π€ SpeakerAppearances Over Time
Podcast Appearances
Shortcuts, I find, I'm even more allergic to than AppleScript because I'm a programmer. And at least AppleScript lets me sort of kind of do programming, but shortcuts... It makes me arrange widgets in a GUI instead of programming. And I'm glad that it exists, and I'm glad that it is very powerful. It can do lots of things, and I'm glad a lot of people like it.
Not for me, but we'll put an example in there. Mootly suggested a Python project, which we'll link to in the show notes, called OSX, OS10, whatever, OSX Photos. And it's a command line utility that talks directly to the photos database. And it can do all sorts of stuff. It can output stuff as CSV or JSON. And you can also, of course, query the SQLite database that is behind photos yourself.
Not for me, but we'll put an example in there. Mootly suggested a Python project, which we'll link to in the show notes, called OSX, OS10, whatever, OSX Photos. And it's a command line utility that talks directly to the photos database. And it can do all sorts of stuff. It can output stuff as CSV or JSON. And you can also, of course, query the SQLite database that is behind photos yourself.
For some reason that I don't understand that someone from Apple will surely write in and tell us about all the tables that are interesting in the SQLite database beginning with the letter Z. Is it like a core data thing or something? I think so. Yeah. Yeah.
For some reason that I don't understand that someone from Apple will surely write in and tell us about all the tables that are interesting in the SQLite database beginning with the letter Z. Is it like a core data thing or something? I think so. Yeah. Yeah.
Anyway, the Z asset table has the info you want, but this Python command line utility will just basically bypass everything and let you just query the database. I don't think I actually want that because I imagine the current selection isn't reflected in the database, but I could be wrong about that.
Anyway, the Z asset table has the info you want, but this Python command line utility will just basically bypass everything and let you just query the database. I don't think I actually want that because I imagine the current selection isn't reflected in the database, but I could be wrong about that.
But anyway, because I want to go off of the current selection as just a flexible way of saying, I know which photos I'm dealing with here. Just let me select them in the app and then run the script, right? I don't know if it's convenient to get the current selection, but that's another thing you could do.
But anyway, because I want to go off of the current selection as just a flexible way of saying, I know which photos I'm dealing with here. Just let me select them in the app and then run the script, right? I don't know if it's convenient to get the current selection, but that's another thing you could do.
Will Lineweber provide an example of directly reading the Photos database if you want to see what that looks like? It's just SQLite. It's just a SQLite database. You can just query it. The tables are wacky, and they begin with the letter Z, and the columns are maybe not what you expect, but you can do it. And finally, a couple of people sent Swift code that uses PhotoKit.
Will Lineweber provide an example of directly reading the Photos database if you want to see what that looks like? It's just SQLite. It's just a SQLite database. You can just query it. The tables are wacky, and they begin with the letter Z, and the columns are maybe not what you expect, but you can do it. And finally, a couple of people sent Swift code that uses PhotoKit.
we'll put a link in the show notes to one on GitHub from Alex Mazinov. Underscore David Smith also provided one. Yeah, Apple obviously has APIs to get to the photos database. That's how you can do photo pickers and all sorts of other stuff that interacts with it. And, you know, you can write Swift to do that.
we'll put a link in the show notes to one on GitHub from Alex Mazinov. Underscore David Smith also provided one. Yeah, Apple obviously has APIs to get to the photos database. That's how you can do photo pickers and all sorts of other stuff that interacts with it. And, you know, you can write Swift to do that.
So if Swift is your preferred language, like Perl is mine, you can write up a Swift quote unquote script, you know, same thing. Put a line at the top, you know, that will run, you know, user bin Swift or whatever. Like you can use Swift like that and it will compile it on the fly and run your thing.
So if Swift is your preferred language, like Perl is mine, you can write up a Swift quote unquote script, you know, same thing. Put a line at the top, you know, that will run, you know, user bin Swift or whatever. Like you can use Swift like that and it will compile it on the fly and run your thing.
same caveats about i'm not sure you can get the current selection from the photos app without asking it through like shortcuts or apple script but i could be wrong with that as well so there are lots of ways to skin this cat but predictably the way i did it is with pearl with the smallest amount of apple script possible just to do the part that i didn't want to do in pearl
same caveats about i'm not sure you can get the current selection from the photos app without asking it through like shortcuts or apple script but i could be wrong with that as well so there are lots of ways to skin this cat but predictably the way i did it is with pearl with the smallest amount of apple script possible just to do the part that i didn't want to do in pearl
I thought we gave you some good actionable improvements that didn't really change your workflow, but just said, hey, in this step, you could do this with less work or whatever during the episode. But yes, obviously, people are amazed by the Rube Goldberg machine that you've constructed. I also checked out that... I think... I forget which one it was. It was like the GPX.
I thought we gave you some good actionable improvements that didn't really change your workflow, but just said, hey, in this step, you could do this with less work or whatever during the episode. But yes, obviously, people are amazed by the Rube Goldberg machine that you've constructed. I also checked out that... I think... I forget which one it was. It was like the GPX.
I should have put a link in here. Someone suggested one of the... the tagging apps that looked pretty good. Basically, it's just an app that you run on your phone and it keeps track of your location and exports files in a format that a lot of apps can read to tag your files.