[KPhotoAlbum] Can't import
Johannes Zarl-Zierl
johannes at zarl-zierl.at
Mon Jul 18 19:59:01 BST 2016
Hi David,
On Sonntag, 17. Juli 2016 21:53:16 CEST Dave Sill wrote:
> [...}
> Ah, thanks, Johannes. That makes sense.
Glad I could help you ;-)
> I'm used to photo managers having
> an import function for extracting new photos from a camera or memory card.
> So kphotoalbum doesn't have such a feature?
No, kphotoalbum does not provide this.
If you want to have a device action "Import photos", you can add it manually.
To give you a starting point, something like this should work:
1. Create a shell script that does the import:
#!/bin/bash
MOUNTPOINT="$1"
IMAGE_SOURCE="$MOUNTPOINT/DCIM/*/*"
IMAGEDIR="/path/to/images"
YEAR=$(date +%Y)
IMPORTDATE=$(date +%F)
# ask the user for a name:
IMPORTNAME=$(kdialog --title "Choose album name" --inputbox "Specify an album name:" "$IMPORTDATE" )
# copy the images from the memory card:
kdecp5 "$IMAGE_SOURCE" "$IMAGEDIR/$YEAR/$IMPORTNAME"
2. Make the script file executable:
chmod +x ~/bin/import-photos.sh
3. Add a device action in the kde settings[1]:
kcmshell5 solid-actions
-> Add an appropriate action for your device and add the script you just created:
/path/to/bin/import-photos.sh "%f"
HTH,
Johannes
[1] https://techbase.kde.org/Development/Tutorials/Solid/Device_Actions
More information about the Kphotoalbum
mailing list