Skip to content
Snippets Groups Projects
Commit 46a3e698 authored by ag87zypi's avatar ag87zypi
Browse files

help option -h|--help added

parent 84191ff1
Branches master
No related tags found
No related merge requests found
......@@ -10,14 +10,29 @@
## v3 24-01-15 alban: add acceptance for wildcard *
## v4 24-01-17 alban: add file type check
## v5 24-01-23 alban: add binary check
## v6 24-02-08 alban: add direct help option call
##
helptext () {
echo "\n Use with one or more files (spaces in file name need quoting or escaping): \n ${0##*/} Example_1.pdf \"Example 2.pdf\" Example\ 3.pdf \n \n Can be used also with wildcard: \n ${0##*/} More_Examples_*.pdf \n\n"
echo "\
\n\
This bash script rewrites the already filled in text of PDF forms \n\
to keep text visible in some viewer's (e.g. okular from KDE) display mode: \n\
${0##*/} PDF_1 [... PDF_n] \n\
or prints this help text again: \n\
${0##*/} --help | -h \n\
\n\
Use with one or more files (spaces in file name need quoting or escaping): \n\
${0##*/} Example_1.pdf \"Example 2.pdf\" Example\ 3.pdf \n\
\n\
Can be used also with wildcard: \n\
${0##*/} More_Examples_*.pdf \n\
\n\
"
}
## check for binaries needed
## check for needed binaries
## give needed binaries as space-seperated entries in variable $progs2check
##
progs2check="pdftk"
......@@ -30,7 +45,11 @@ for prog in $progs2check; do
done
## help request as parameter
# TBD
case "$1" in
-h|--help) helptext
exit 0
;;
esac
## no parameter
if [ -z "$1" ]; then
......@@ -59,5 +78,3 @@ for param in $*; do
echo " Result: ${newfilename}"
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment