summaryrefslogtreecommitdiffstats
path: root/.local/bin/remove-first-page
diff options
context:
space:
mode:
authorJustin Gassner <justin.gassner@mailbox.org>2024-01-10 13:29:11 +0100
committerJustin Gassner <justin.gassner@mailbox.org>2024-01-10 13:29:11 +0100
commit0dfdabd3d7c2aaee37900103c37a96317f3ada07 (patch)
treefe27ea564b60cf6e75b7f2dc3dc8bb57d78a3884 /.local/bin/remove-first-page
parent2a610aeff4a33456c03f0c8db1469cdc95ba1e73 (diff)
downloaddotfiles-0dfdabd3d7c2aaee37900103c37a96317f3ada07.tar.zst
config
Diffstat (limited to '.local/bin/remove-first-page')
-rwxr-xr-x.local/bin/remove-first-page14
1 files changed, 14 insertions, 0 deletions
diff --git a/.local/bin/remove-first-page b/.local/bin/remove-first-page
new file mode 100755
index 0000000..6e46706
--- /dev/null
+++ b/.local/bin/remove-first-page
@@ -0,0 +1,14 @@
+#!/usr/bin/bash
+
+remove_first_page_pdf() {
+ pdftk "$1" cat 2-end output "$1".new.pdf
+}
+
+case "$1" in
+ *.pdf)
+ remove_first_page_pdf "$1"
+ ;;
+ *)
+ echo "Not a pdf file."
+ ;;
+esac