Compare commits
No commits in common. "c04339c1981866428174ab4ac20cd8fc4bf0a470" and "7b024bba84a12ffb9bf9eb2b5f4ff4dd633e5092" have entirely different histories.
c04339c198
...
7b024bba84
|
@ -2,28 +2,16 @@ self:
|
||||||
with self; ''
|
with self; ''
|
||||||
export PATH=${lib.makeBinPath [pkgs.coreutils pkgs.sane-frontends pkgs.sane-backends pkgs.ghostscript pkgs.imagemagick]}
|
export PATH=${lib.makeBinPath [pkgs.coreutils pkgs.sane-frontends pkgs.sane-backends pkgs.ghostscript pkgs.imagemagick]}
|
||||||
|
|
||||||
NAME=$([ "$1" == "" ] && date -Iseconds || echo "$1")
|
while true;
|
||||||
|
|
||||||
TMPDIR=$(mktemp -d)
|
|
||||||
|
|
||||||
echo "Using ''${NAME}.pdf as filename"
|
|
||||||
RESPONSE=""
|
|
||||||
|
|
||||||
while [ -z "$RESPONSE" ];
|
|
||||||
do
|
do
|
||||||
|
read -p "Press Enter to continue or Ctrl+C to stop" < /dev/tty
|
||||||
|
|
||||||
DATETIME=$(date -Iseconds)
|
DATETIME=$(date -Iseconds)
|
||||||
echo "Starting scan $DATETIME"
|
|
||||||
scanimage \
|
scanimage \
|
||||||
-d "''${SCANNER_DEFAULT_DEVICE}" \
|
-d "''${SCANNER_DEFAULT_DEVICE}" \
|
||||||
--format=jpeg \
|
--format=jpeg \
|
||||||
--resolution 300 \
|
--resolution 300 \
|
||||||
--progress \
|
--progress \
|
||||||
-o "''${TMPDIR}/''${DATETIME}.jpg"
|
-o "''${SCANNER_OUTPUT_DIR}/''${DATETIME}.jpg"
|
||||||
|
|
||||||
read -p "Press ENTER to scan another page, or any other key to generate the final PDF: " RESPONSE < /dev/tty
|
|
||||||
done
|
done
|
||||||
|
|
||||||
${python39Packages.img2pdf}/bin/img2pdf --output "''${SCANNER_OUTPUT_DIR}/''${NAME}.pdf" ''${TMPDIR}/*
|
|
||||||
|
|
||||||
rm -rf TMPDIR
|
|
||||||
''
|
''
|
||||||
|
|
|
@ -58,7 +58,7 @@ localfolders = ~/Mail/admins@pub.solar
|
||||||
|
|
||||||
[Repository RemoteAdminsPubSolar]
|
[Repository RemoteAdminsPubSolar]
|
||||||
type = IMAP
|
type = IMAP
|
||||||
remotehost = mx2.greenbaum.cloud
|
remotehost = mail.greenbaum.cloud
|
||||||
remoteuser = admins@pub.solar
|
remoteuser = admins@pub.solar
|
||||||
remotepasseval = get_secret("service", "smtp", "host", "mail.greenbaum.cloud", "user", "admins@pub.solar")
|
remotepasseval = get_secret("service", "smtp", "host", "mail.greenbaum.cloud", "user", "admins@pub.solar")
|
||||||
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
|
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
|
||||||
|
@ -73,7 +73,7 @@ localfolders = ~/Mail/crew@pub.solar
|
||||||
|
|
||||||
[Repository RemoteCrewPubSolar]
|
[Repository RemoteCrewPubSolar]
|
||||||
type = IMAP
|
type = IMAP
|
||||||
remotehost = mx2.greenbaum.cloud
|
remotehost = mail.greenbaum.cloud
|
||||||
remoteuser = crew@pub.solar
|
remoteuser = crew@pub.solar
|
||||||
remotepasseval = get_secret("service", "smtp", "host", "mail.greenbaum.cloud", "user", "crew@pub.solar")
|
remotepasseval = get_secret("service", "smtp", "host", "mail.greenbaum.cloud", "user", "crew@pub.solar")
|
||||||
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
|
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
|
||||||
|
|
Loading…
Reference in a new issue