summaryrefslogtreecommitdiffstats
path: root/shrink_pdf
diff options
context:
space:
mode:
authorNiklas Halle <niklas@niklashalle.net>2020-07-26 13:46:20 +0200
committerNiklas Halle <niklas@niklashalle.net>2020-07-26 13:46:20 +0200
commitd6951204ef6cdbd53775b19cc331b4d529428dee (patch)
treee6932ca294ae541e0b9eb517859f2a5bda34f3b5 /shrink_pdf
parent1fd36242bb94dd9d2e9dda6cf97da6074d4946ea (diff)
downloadpaperless_upload-d6951204ef6cdbd53775b19cc331b4d529428dee.tar.gz
paperless_upload-d6951204ef6cdbd53775b19cc331b4d529428dee.zip
Added "year" entry to local state, used for resetting the id on year change, as well as tagging the document accordingly
Also reworked the output a bit
Diffstat (limited to 'shrink_pdf')
-rwxr-xr-xshrink_pdf8
1 files changed, 7 insertions, 1 deletions
diff --git a/shrink_pdf b/shrink_pdf
index 66347c3..9f06e30 100755
--- a/shrink_pdf
+++ b/shrink_pdf
@@ -1,3 +1,9 @@
#!/bin/env bash
+filename="${1}"
-ps2pdf -dPDFSETTINGS=/ebook "${1}" "small_${1}"
+if [ -z "${filename}" ]; then
+ echo please provide a file name
+ exit 1
+fi
+
+ps2pdf -dPDFSETTINGS=/ebook "${filename}" "small_${filename}"