3 # gphoto2_capture.sh - Do automated high exposure tethered photo shoots
5 # Copyright (C) 2014 Antonio Ospite <ao2@ao2.it>
7 # This program is free software. It comes without any warranty, to
8 # the extent permitted by applicable law. You can redistribute it
9 # and/or modify it under the terms of the Do What The Fuck You Want
10 # To Public License, Version 2, as published by Sam Hocevar. See
11 # http://sam.zoy.org/wtfpl/COPYING for more details.
15 # Get the configuration variables with these commands:
16 # gphoto2 --set-config capture=1
17 # gphoto2 --list-all-config | sed -e 's/^[^\/]/\t\0/g' > Camera-config.txt
20 CAPTURE_MODE=$(LANG=C gphoto2 --get-config capture | grep Current | cut -d ' ' -f 2 | tr -d '\n')
22 if [ "x$CAPTURE_MODE" = "x" ];
27 if [ $CAPTURE_MODE -eq 0 ];
29 gphoto2 --set-config capture=1
32 # The settings below are for a Canon powershot A85, with these settings:
33 # - Save pictures on the memory card
35 # - Manual shooting mode
36 # - Exposure 0.5 seconds
42 --set-config-index capturetarget=1 \
43 --set-config-index /main/capturesettings/aperture=0 \
44 --set-config-index /main/capturesettings/shootingmode=3 \
45 --set-config-index /main/capturesettings/shutterspeed=15 \
46 --set-config-index /main/imgsettings/imagequality=2 \
47 --set-config-index /main/imgsettings/iso=1 \
51 # Stop the capture with Ctrl-C and then download all the files on the PC,
52 # after that delete them from the camera:
53 # gphoto2 --get-all-files
54 # gphoto2 --delete-all-files --recurse