[KimDaBa] Import from camera
Shawn Willden
shawn-kimdaba at willden.org
Fri Oct 29 07:17:42 BST 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Monday 25 October 2004 08:43 am, Vincent Picavet wrote:
> I do exactly the same as you except that I run gphoto2 to get my images
> using PTP directly from the camera, and "jhead -n -autorot *" to
> rename/rotate images according to exif informations.
I do pretty much the same as you, except I automate it all through hotplug so
that just plugging my camera's USB cable into my laptop (and turning on the
camera) does it all automagically.
To do it I created (actually copied and tweaked, but whatever) a file
in /etc/hotplug/usb. The file is called "usbcam" and contains:
- ----------cut here---------------
GROUP=camera
if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
chmod o-rwx "${DEVICE}"
chgrp "${GROUP}" "${DEVICE}"
chmod g+rw "${DEVICE}"
sudo -u shawn /home/shawn/bin/got_camera.sh
fi
- ---------cut here----------------
Most of this is what you probably already have to make it possible to access
your camera with gphoto2, the only difference is the line that invokes the
"got_camera.sh" script.
My got_camera.sh script is also very simple:
- --------cut here-----------------
#!/bin/sh
cd /home/shawn/Personal/pics/new
gphoto2 -P && gphoto2 -D
if [ $? -eq 0 ]; then
artsplay /usr/share/sounds/photo_success.wav
else
artsplay /usr/share/sounds/photo_error.wav
fi
SCRIPTDIR=/home/shawn/Personal/pics/scripts/
$SCRIPTDIR/resizeforslides.sh
$SCRIPTDIR/relocatepics.sh
$SCRIPTDIR/resizemove.sh
- -------cut here--------------------
The other scripts at the ends do some other operations... do whatever you
want. The nifty bit is that it's all kicked off by hotplug, so it all
happens just by plugging in the camera.
There are lots of ways this can be improved, obviously.
Shawn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFBgeCK6d8WxFy/CWcRAn3vAJ0bJSOxBsRb7r3TlFaPZ/erFPuQ9wCgkChm
k/xJW6NCJeG4y+yxY+itn2I=
=fRjg
-----END PGP SIGNATURE-----
More information about the Kphotoalbum
mailing list