File tree 1 file changed +8
-2
lines changed 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ function v2gif() {
64
64
fi
65
65
66
66
# Parse the options
67
- args=$( " $getopt " -l " alert:" -l " lossy:" -l " width:" -l del,delete -l high -l tag -l " fps:" -l webm -o " a:l:w:f:dhmt" -- " $@ " ) || {
67
+ args=$( " $getopt " -l " alert:" -l " lossy:" -l " width:" -l del,delete -l high -l help -l tag -l " fps:" -l webm -o " a:l:w:f:dhmt" -- " $@ " ) || {
68
68
echo ' Terminating...' >&2
69
69
return 2
70
70
}
@@ -82,6 +82,7 @@ function v2gif() {
82
82
local fps=" "
83
83
local make_webm=" "
84
84
local alert=5000
85
+ local printhelp=" "
85
86
while [[ $# -ge 1 ]]; do
86
87
case " $1 " in
87
88
--)
@@ -94,6 +95,11 @@ function v2gif() {
94
95
opt_del_after=" true"
95
96
shift
96
97
;;
98
+ --help)
99
+ # Print Help
100
+ printhelp=" true"
101
+ shift
102
+ ;;
97
103
-h | --high)
98
104
# High Quality, use gifski
99
105
gifski=" $( type -p gifski) "
@@ -141,7 +147,7 @@ function v2gif() {
141
147
esac
142
148
done
143
149
144
- if [[ -z " $* " ]]; then
150
+ if [[ -z " $* " || " $printhelp " ]]; then
145
151
echo " $( tput setaf 1) No input files given. Example: v2gif file [file...] [-w <max width (pixels)>] [-l <lossy level>] $( tput sgr 0) "
146
152
echo " -d/--del/--delete Delete original vid if done suceessfully (and file not over the size limit)"
147
153
echo " -h/--high High Quality - use Gifski instead of gifsicle"
You can’t perform that action at this time.
0 commit comments