Python script to back up Photos to SD card or HDD
-
Experienced Python developer here, but new to Pythonista and toolkits on iOS.
I'm looking for (or to write) a script that will backup the Photo Library to removable SD cards.
Going on a trip soon and I'm trying to avoid taking my laptop and it's accessories. I can load photos from my camera's memory card into the iOS Photo Library (camera roll). But then backing them up to some other media is really kinda painful. I can connect an SD card or USB HDD to the iPad, but saving the images requires manually selecting images and then exporting them. I'd like to automate that task.
I haven't found a script that does exactly that, or even a close approximation. Anyone have anything I can start with?
TIA!
-
dialogs.pick_document() does not show an usb Drive but shortcut command "get file" shows it, thus I think it could be possible, but perhaps with iOS 13 functions in future Pythonista version.
-
@FlyingDiver with the new beta, and thus in the v3.3 arriving begin of next week, you will be able to open an external folder on an usb Drive (flash, sd, Drive) connected to your iPhone/iPad, and thus save on it your local photos.
-
@FlyingDiver, thus, a script like this should now be feasible:
- (After you have imported and edited the photos.)
- Opens the photo gallery.
- You pick the first photo that should be backed up.
- That photo and all newer photos are copied to the external drive, potentially to a specific folder created with today’s date or a running number.
Would that fit your use case?
-
@mikael it is what does my little scrip above, you only need to add a path in the file write, a path like some posts above.
-
@cvp, yes, indeed. I was just thinking about the usability, i.e. visually picking the first image to be saved.
-
@mikael ok, sorry. Wen I go in holidays, I always backup my photos from my camera to my iPad, until now via wifi, via usb in the future. But often, I have a lot of photos per day and it is sometimes difficult to say/pick which is the first to save visually. And I give the today date (I back up in the evening) and it is done.
-
@cvp what camera do you use? Just curious.
-
@jmv38 Panasonic Lumix DMC-TZ40
-
This post is deleted!last edited by Kasarka