18 lines
448 B
Nix
18 lines
448 B
Nix
self:
|
|
with self; ''
|
|
export PATH=${lib.makeBinPath [pkgs.coreutils pkgs.sane-frontends pkgs.sane-backends pkgs.ghostscript pkgs.imagemagick]}
|
|
|
|
while true;
|
|
do
|
|
read -p "Press Enter to continue or Ctrl+C to stop" < /dev/tty
|
|
|
|
DATETIME=$(date -Iseconds)
|
|
scanimage \
|
|
-d "''${SCANNER_DEFAULT_DEVICE}" \
|
|
--format=jpeg \
|
|
--resolution 300 \
|
|
--progress \
|
|
-o "''${SCANNER_OUTPUT_DIR}/''${DATETIME}.jpg"
|
|
done
|
|
''
|