From 1437a13f21e988206fb7b42e1843f89a46c31f53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20V=C3=A1squez=20P=C3=A9rez?= Date: Mon, 20 Nov 2023 21:56:00 -0800 Subject: [PATCH] added a couple of scripts to encode and decode base64, and a script to convert pdf to cbz --- bash/64.sh | 4 ++++ bash/d64.sh | 4 ++++ bash/pdf2cbz.sh | 9 +++++++++ 3 files changed, 17 insertions(+) create mode 100755 bash/64.sh create mode 100755 bash/d64.sh create mode 100755 bash/pdf2cbz.sh diff --git a/bash/64.sh b/bash/64.sh new file mode 100755 index 0000000..39bdef6 --- /dev/null +++ b/bash/64.sh @@ -0,0 +1,4 @@ +for i; + do + openssl base64 -in "$i" -out "${i%.*}_base64.txt" +done \ No newline at end of file diff --git a/bash/d64.sh b/bash/d64.sh new file mode 100755 index 0000000..ee8e079 --- /dev/null +++ b/bash/d64.sh @@ -0,0 +1,4 @@ +for i; + do + openssl base64 -d -in "$i" -out "${i%.*}.binary_file" +done \ No newline at end of file diff --git a/bash/pdf2cbz.sh b/bash/pdf2cbz.sh new file mode 100755 index 0000000..0e2f3a6 --- /dev/null +++ b/bash/pdf2cbz.sh @@ -0,0 +1,9 @@ +for i; +do + pdf=$i + new_folder=${i%.*} + mkdir "$new_folder" + pdfimages "$i" -j "$new_folder"/page_ + 7z a -tzip "$new_folder".cbz "$new_folder" + rm -R "$pdf" "$new_folder" +done