Script for Downloading Pictures From Digital Cameras

Now that my digital camera is working, I just created a script to download pictures semi automatically from my digital camera. It currently does the following:

* Camera device scanning, will refuse to run when camera is not plugged in.
* No need to specify the ever changing device node, the script will attempt to obtain necessary information from /proc filesystem
* Mounting and umounting
* Moving pictures from camera to specified directory (big deal!)
* Create two downsampled files from the pictures: a 200 pixel maximum side thumbnail and a 1000 pixel maximum side for online viewing, while still maintaining aspect ratio.
* Pictures are moved into subdirectory named after the current date.
* Open a Konqueror window on the final directory, if running under [KDE](http://www.kde.org).

Theory of operation: plug the camera, and run the script (keep in mind the ‘theory’ part :))

Requires:

* sudo, configured to run mount, umount and mkdir as root (security hole I know, this is not designed to run under multiuser environment)
* Kernel 2.6 with devfs
* ImageMagick

To do:

* Hotplug could be configured to run the script automatically whenever a camera is plugged in

Download it [here](https://priyadi.net/download/downloadpics.sh).

2 comments

Leave a comment

Your email address will not be published. Required fields are marked *