Be careful - this repository is in status Alpha!
This script gets data from the SD storage card of my digital camera to my computer. It rotates portrait format images and renames files according to my file name convention.
Please note: this is a replacement for a quick-hack shell script: https://github.com/novoid/getdigicamdata.sh
It is part of a blog article, where I describe my work-flows on how I manage my photographs and more: http://karl-voit.at/managing-digital-photographs/
fetchphotos gets image files from the source directory (specified in the configuration file), and moves the finished files to the destination directory. Along the way, it can add a timestamp to the file name, rotate the image, and make the filename lowercase.
If you haven’t run fetchphotos before, type
fetchphotos.py --generate-configfile
… will generate a skeleton configuration file (and say where the file is). You will need to edit this file and provide value for the source and destination directories (look for “replace me!”).
fetchphotos.py
… will take all the image files in the source directory, rotate them as appropriate, add timestamps to the file names, convert the file names to lowercase, and put these files in the destination directory.
fetchphotos.py /some/directory/*.jpg
… will transform the files as above, but will only use the files in /some/directory/*.jpg as the source images.
fetchphotos.py --help
… will print a complete list of options.
The directory where the camera files are located. This can be a location on the camera itself, if it’s mounted as an external drive, or if you need to run a program to get pictures off the camera, the directory where that program stores the pictures.
This value has no default. It must be specified before use.
The directory where the processed files will be copied to.
This value has no default. It must be specified before use.
Rotate the photo according to EXIF data in the image, if available. It can be ‘true’ or ‘false’.
This value has a default of ‘true’.
Add timestamp according to ISO 8601+ http://datestamp.org/index.shtml can be one of ‘true’ or ‘false’ example: if true, file ‘foo.jpg’ will end up in ‘2009-12-31T23.59.59_foo.jpg’ Note that the time used comes from the EXIF metadata in the image, if available, and from the creation date of the image file otherwise.
This value has a default of ‘true’.
Rename files to lowercase. Can be one of ‘true’ or ‘false’. Example: if true, file ‘Foo.JPG’ will end up in ‘foo.jpg’.
This value has a default of ‘true’.
Don’t delete the files in DIGICAMDIR. If you have confidence that fetchphotos does what you want, you can set this to false.
KEEP_ORIGINALS=true