diff options
Diffstat (limited to 'bin/watch_incoming.sh')
-rwxr-xr-x | bin/watch_incoming.sh | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/bin/watch_incoming.sh b/bin/watch_incoming.sh deleted file mode 100755 index eed1da0..0000000 --- a/bin/watch_incoming.sh +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | TARGET=$HOME/Downloads/toPrint/toPrint_staging | ||
4 | PROCESSED=$HOME/Downloads/toPrint/toPrint_ready | ||
5 | SPLIFF=$HOME/bin/spliff | ||
6 | |||
7 | inotifywait -m -e create -e moved_to --format "%f" "${TARGET}" \ | ||
8 | | while read -r FILENAME | ||
9 | do | ||
10 | THUMB=$(mktemp /tmp/pdf_thumbnail_XXXXXXXXX.png) | ||
11 | evince-thumbnailer -s 1024 -l "${TARGET}/${FILENAME}" "${THUMB}" | ||
12 | mv "${TARGET}/${FILENAME}" "${PROCESSED}/${FILENAME}" | ||
13 | $SPLIFF "${PROCESSED}/${FILENAME}" | ||
14 | rm -f "${PROCESSED}/${FILENAME}" | ||
15 | dunstify -a "spliff" -I "${THUMB}" "$FILENAME" | ||
16 | done | ||