Automatically copy images off digital camera
I haven't found any programs doing this (in Linux):
- when a camera is connected (and recognized) it - creates a folder according to the images/computers date (and checks that one doesn't exist, else it makes a [date-x] folder, where x is a rising number) - copies all images to this folder - asks permission to delete the images (or not, should be possible to specify) - informs about the actions taken/openes the downloaded images folder should also be possible to specify). I can't see this could be anything hard to create, but will I need to make this script myself, or is it just that I can't find this kind of a program? It could certainly exist, as this is something ppl probably want. Thank's in advance |
Well, I know that each time I plug my memory card into my card reader on my Ubuntu Desktop it offers to copy all the images off of the memory card for me. I'm not sure on the name of the program that pops up with that one... I'm on a laptop at school now and it's quite difficult to get Linux working here so I am using Windows... ugh... if no one else posts the name of that program I will check it when I get home tonight and post it for you.
S |
Gphotolib, once you've set it up initially, will do all of that in about 3 commands. If you've not gotten gphoto set up yet I got a little verbose when doing mine and posted it all here.
That said, here's a little script which doens't have a whole lot of error checking (you can do that yourself if it gets to be a hassle), but which will do what you want: Code:
#!/bin/bash nautilus --no-desktop $filename & in there at the end, which I think would accomplish the task. |
As an afterthought, the --delete-all-files isn't all that reliable (I thought it was just me that it didn't work for, but google says otherwise).
May I instead substitute something like gphoto2 --delete-file 0-$num_photos or, failing even that, put it in a loop: for i in `seq 0 $num_photos`; do gphoto2 --delete-file $i done I don't remember if they start at 0 or 1, I used 0 for argument's sake. |
Thank's for the script, I actually already started (or almost finished) coding one myself. The only problems I have are:
- echoed out messages don't appear anywhere - i'd like to use kde's widgets, like a confirming before deleting, but obviously need to do learn kde coding before this - I cannot delete with gphoto2 for some reason, it just doesn't delete (even if it succesfully does this command) - delete-all fails as there is a "theme.dat" on my camera, which is impossible to delete. On digikam I can delete pictures, but not the theme.dat file It seems as this is known (deleting the theme.dat file), I remember seeing an error report on this issue somewhere. I have an Ixus 700 and it seems as development for its drivers are also a bit behind currently, but digikam can delete "normal" files! But thanks fot the script anyway. I'd really be interested in knowing what prog ubuntu uses (I use debian myself) |
Yeah, the delete-all-files has a known issue (see my post after that one). You won't be able to use graphical buttons in a bash script; if you want that, just use gtkam (gphoto2's GUI) instead.
The echo'd messages will appear on the commandline, the same place from which you started the script... Code:
[laura@cleopatra ~/work]$ ./camera.sh Edit: I see that I left all of the "checking to see if.." debug lines in there. They ought to have been commented out, too. D'oh. |
Oh yes, I obviously didnät explain myself..
If I make it start automatically, with hotplug by activating it with files in: Code:
/etc/hotplug/usb/autocopy.usermap Code:
/etc/hotplug/usb/autocopy |
Ohhhh, I see what you mean. Honestly, I'd just use the GUI or run the script manually when you plug the camera in....it's made for running froma commandline, not for background tasks (the fact that you want to give it input means you'll have to run manually). I haven't the faintest idea where output like that goes, but I've a hunch that it's /dev/null. You won't be able to respond to a program like that, either, so you'd better hardcode the deletion of files to either on or off so it doesn't hang waiting for your response.
|
All times are GMT -5. The time now is 01:35 PM. |