Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- FOCAL=focal.dat
- WC=~/tmp/wc.rb
- if [[ "$1" == "-t" && ! -z "$2" ]]; then
- exiftool -T -focallengthin35mmformat *.JPG | grep -v '-' | awk '{print NR, $1}' > $FOCAL
- gnuplot -p -e "set terminal png; set term png size 2000,500; set term png font 'ヒラギノ丸ゴ ProN W4, 16'; set output '$2'; set xlabel 'n枚目'; set ylabel '焦点距離'; plot '$FOCAL' using 1:2 with lines lw 0.1"
- rm $FOCAL
- open $2
- elif [[ "$1" == "-c" && ! -z "$2" ]]; then
- exiftool -T -focallengthin35mmformat *.JPG | grep -v '-' | awk '{print $1}' | $WC > $FOCAL
- gnuplot -p -e "set terminal png; set output '$2'; set term png font 'ヒラギノ丸ゴ ProN W4, 12'; set xlabel '焦点距離'; set ylabel '枚数'; plot '$FOCAL' using 1:2 with lines"
- rm $FOCAL
- open $2
- else
- echo "Usage: focal.sh (-c|-t) PLOTFILE"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement