[KimDaBa] Import from camera
Shawn Willden
shawn-kimdaba at willden.org
Sat Oct 30 16:41:43 BST 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Friday 29 October 2004 04:51 pm, Robert L Krawitz wrote:
> I'd like to try to figure it out using a card reader rather than the
> camera, if that's possible.
It should be. One complication is that to keep the scripts simple you'll
probably have to make sure you always put the card in the reader before
attaching the reader to the computer. That's because there aren't any
hotplug events for card insertion.
When you plug in your CF reader, hotplug will load up the appropriate driver
(almost certainly usb-storage) and then look in /etc/hotplug/usb for an
executable file with the same name. If it finds one, it will execute it. So
that's where you need to hook in. That script will need to mount the CF file
system ('mount -t vfat /dev/sda1 /mnt/disk' or something similar), figure out
which camera the card is from and then do the copying (and whatever else you
want to do).
How to figure out which camera the card is from? Well, you could use jhead or
metacam to analyze the EXIF data (metacam might be better, as I can't find a
way to get jhead to read the "Owner Name" field, and I like the idea of using
that more than the camera model). You could just place an empty file in the
root directory of each CF card with a name that identifies which camera the
card goes with. You could look at details of file names or file paths...
Probably the nicest way is to use the EXIF data, because then you could swap
cards around between cameras at will, and if you processed each image
individually your script would still work just fine even if the card
contained some images from one camera and some from another.
Shawn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFBg7Y66d8WxFy/CWcRAi1DAJ41se2LneoJUQZiAt75jfw3NEMtGwCgg2Tw
a1U2a0YIMaYtq7aWXYcl0Vc=
=vFTz
-----END PGP SIGNATURE-----
More information about the Kphotoalbum
mailing list