Git Product home page Git Product logo

fetchphotos's Introduction

Be careful - this repository is in status Alpha!

fetchphotos

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/

Usage

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.

Examples

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.

Configuration file reference

General:DIGICAMDIR

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.

General:DESTINATIONDIR

The directory where the processed files will be copied to.

This value has no default. It must be specified before use.

File_processing:ROTATE_PHOTOS

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’.

File_processing:ADD_TIMESTAMP

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’.

File_processing:LOWERCASE_FILENAME

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’.

File_processing:KEEP_ORIGINALS

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

fetchphotos's People

Contributors

novoid avatar sesamemucho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

sesamemucho

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.