2022-12-09 07:54:57 +01:00
|
|
|
#/bin/sh -xe
|
|
|
|
. ${HOME}/.bin/_config
|
|
|
|
|
2023-12-12 08:39:33 +01:00
|
|
|
needs pdfarranger--
|
|
|
|
|
2022-12-09 07:54:57 +01:00
|
|
|
cd ${PIMDIR}/documents
|
|
|
|
|
|
|
|
_doc=$(ls -1 _incoming | head -1)
|
2022-12-09 09:16:28 +01:00
|
|
|
|
|
|
|
if [ -z "$_doc" ]
|
|
|
|
then
|
|
|
|
echo "Nothing left... wohooo!"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2022-12-09 07:54:57 +01:00
|
|
|
pdfarranger "_incoming/${_doc}" > /dev/null 2>&1 &
|
|
|
|
echo "Here is: ${_doc}"
|
2022-12-09 17:23:26 +01:00
|
|
|
echo "Shall we move it to _done? [y = yes, yn = yes and next]"
|
2022-12-09 07:54:57 +01:00
|
|
|
read key
|
|
|
|
|
2022-12-09 17:23:26 +01:00
|
|
|
again=0
|
2022-12-09 07:54:57 +01:00
|
|
|
case $key in
|
|
|
|
[yY]) mv "_incoming/${_doc}" done/; ;;
|
2022-12-09 17:23:26 +01:00
|
|
|
[yY][nN]) mv "_incoming/${_doc}" done/; again=1; ;;
|
2022-12-09 07:54:57 +01:00
|
|
|
*) echo "What a shame..."; ;;
|
|
|
|
esac
|
|
|
|
|
2022-12-09 17:23:26 +01:00
|
|
|
pkill -f /usr/local/bin/pdfarranger
|
|
|
|
|
|
|
|
[ $again -eq 1 ] && $0
|