tfilmscan - filmtools - various tools for photographic film development and darkroom printing
HTML git clone git://src.adamsgaard.dk/filmtools
DIR Log
DIR Files
DIR Refs
DIR LICENSE
---
tfilmscan (367B)
---
1 #!/bin/sh
2 # requirements: scanimage(1) from sane-backends
3
4 n=0
5 basename="$(date +%Y-%m-%d-filmscan-)"
6 ext="tiff"
7
8 while :; do
9 f="${basename}$(printf '%05d' "$n").${ext}"
10 [ ! -f "$f" ] && break
11 n=$(( n + 1 ))
12 if [ $n -gt 9999 ]; then
13 echo "error: file name counter value exceeded" >&2
14 exit 1
15 fi
16 done
17
18 echo "$f"
19
20 scanimage --mode Lineart --format=tiff > "$f"