Casey Liss
๐ค SpeakerAppearances Over Time
Podcast Appearances
That's right. That's why at the end of it you'll see I'm emitting the file names one per line. as opposed to comma separated or as JSON or whatever. One per line is straightforward. I promise to never have new lines in my file names, right? It'll just, it'll be fine. Yeah. Yeah. I just want text output to standard standard out. And then I just feed that into Perl, you know,
That's right. That's why at the end of it you'll see I'm emitting the file names one per line. as opposed to comma separated or as JSON or whatever. One per line is straightforward. I promise to never have new lines in my file names, right? It'll just, it'll be fine. Yeah. Yeah. I just want text output to standard standard out. And then I just feed that into Perl, you know,
it's it's my preferred way of doing things all right now on to all the many many suggestions people sent because so many people sent suggestions i hope an equal or greater number of people sent suggestions to casey but i don't know what casey sees all i know is what i see and i saw a bazillion suggestions for this one step in my workflow by far the most popular which boggles my mind was hey why don't you just export all the photos because once you've exported them to the finder then you can just select them in the finder and hit copy or you can do you know once they're files in the file system there's a million ways to get the file names from them you know what i mean
it's it's my preferred way of doing things all right now on to all the many many suggestions people sent because so many people sent suggestions i hope an equal or greater number of people sent suggestions to casey but i don't know what casey sees all i know is what i see and i saw a bazillion suggestions for this one step in my workflow by far the most popular which boggles my mind was hey why don't you just export all the photos because once you've exported them to the finder then you can just select them in the finder and hit copy or you can do you know once they're files in the file system there's a million ways to get the file names from them you know what i mean
uh yeah that would work but why in the world export photos and make it like you know you can you do it small size they won't take up a lot of room you know but why would i make it do all that work why is empathy for the machine why would i make it like recompress export make a bunch of files just so i can get the file names and then delete the things oh no no that's i mean yes that technically that would absolutely work
uh yeah that would work but why in the world export photos and make it like you know you can you do it small size they won't take up a lot of room you know but why would i make it do all that work why is empathy for the machine why would i make it like recompress export make a bunch of files just so i can get the file names and then delete the things oh no no that's i mean yes that technically that would absolutely work
and some might find it preferable to what I was doing with OCRing, but at least when I was OCRing, I was making one screenshot for dozens and dozens of photos because I have a very big screen, right? Exporting the files. Everyone suggested that. I mean, I guess if you're not in a kind of like... I'm going to write an automation script mindset. This is the most straightforward way to do it.
and some might find it preferable to what I was doing with OCRing, but at least when I was OCRing, I was making one screenshot for dozens and dozens of photos because I have a very big screen, right? Exporting the files. Everyone suggested that. I mean, I guess if you're not in a kind of like... I'm going to write an automation script mindset. This is the most straightforward way to do it.
Hey, you want file names? Make files. They've got names. Boom. Problem solved. But no, I'm not. That solution I reject. Some other people suggested using shortcuts, which is sort of the modern sort of AppleScript type equivalent. We'll put a link in the show notes to an example one from Josh Woodward. Shortcuts can totally do all the stuff, I'm sure.
Hey, you want file names? Make files. They've got names. Boom. Problem solved. But no, I'm not. That solution I reject. Some other people suggested using shortcuts, which is sort of the modern sort of AppleScript type equivalent. We'll put a link in the show notes to an example one from Josh Woodward. Shortcuts can totally do all the stuff, I'm sure.
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.
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.