Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. FOCAL=focal.dat
  4. WC=~/tmp/wc.rb
  5.  
  6. if [[ "$1" == "-t" && ! -z "$2" ]]; then
  7. exiftool -T -focallengthin35mmformat *.JPG | grep -v '-' | awk '{print NR, $1}' > $FOCAL
  8. 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"
  9. rm $FOCAL
  10. open $2
  11. elif [[ "$1" == "-c" && ! -z "$2" ]]; then
  12. exiftool -T -focallengthin35mmformat *.JPG | grep -v '-' | awk '{print $1}' | $WC > $FOCAL
  13. 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"
  14. rm $FOCAL
  15. open $2
  16. else
  17. echo "Usage: focal.sh (-c|-t) PLOTFILE"
  18. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement