dccb061533a3b42e081ac2d03cd2654190a49549
[debienna.git] / EOSandGphoto / index.mdwn
1 {{{\r
2 gphoto2 --set-config /main/camera/shutterspeed=1/20 --set-config /main/camera/resolution=1 --interval 5 --frames 5 --capture-image-and-download --hook-script ./rename_image.sh\r
3 }}}\r
4 ./rename_image.sh\r
5 {{{\r
6 #!/bin/bash\r
7 # We have to move images from gphoto2 because gphoto2 cannot move them...\r
8 PREFIX="IMG_"\r
9 [ $ACTION == "download" ] && (mv $ARGUMENT $(exif -t 0x0132 -m $ARGUMENT | sed -e's/:\| //g' -e's/$/.jpg/' -e"s/^/$PREFIX/")) || exit 0\r
10 }}}