From bf5e9491bc6c84f7244f7e64c996b99f04da4c8e Mon Sep 17 00:00:00 2001 From: c0dev0id Date: Fri, 9 Dec 2022 07:54:57 +0100 Subject: [PATCH] Update 2022-12-09 07:54 OpenBSD/amd64 --- .bin/documents-import | 5 +++++ .bin/documents-next | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100755 .bin/documents-import create mode 100755 .bin/documents-next diff --git a/.bin/documents-import b/.bin/documents-import new file mode 100755 index 0000000..562316b --- /dev/null +++ b/.bin/documents-import @@ -0,0 +1,5 @@ +#/bin/sh -xe +. ${HOME}/.bin/_config + +mkdir -p ${PIMDIR}/documents/_incoming +mv -f /tank/scanner/*.pdf ${PIMDIR}/documents/_incoming/ diff --git a/.bin/documents-next b/.bin/documents-next new file mode 100755 index 0000000..e613e1c --- /dev/null +++ b/.bin/documents-next @@ -0,0 +1,17 @@ +#/bin/sh -xe +. ${HOME}/.bin/_config + +cd ${PIMDIR}/documents + +_doc=$(ls -1 _incoming | head -1) +pdfarranger "_incoming/${_doc}" > /dev/null 2>&1 & +echo "Here is: ${_doc}" +echo "Shall we move it to _done?" +read key + +case $key in + [yY]) mv "_incoming/${_doc}" done/; ;; + *) echo "What a shame..."; ;; +esac + +pkill -f /usr/local/bin/pdfarranger