mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-19 20:57:52 +00:00
yt-wsp.sh : print help on empty args
This commit is contained in:
parent
a94897bcde
commit
f254e78737
@ -67,23 +67,6 @@ msg() {
|
|||||||
echo >&2 -e "${1-}"
|
echo >&2 -e "${1-}"
|
||||||
}
|
}
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# create a temporary directory to work in
|
|
||||||
# set the temp_dir and temp_filename variables
|
|
||||||
################################################################################
|
|
||||||
temp_dir="$(mktemp -d ${SCRIPT_DIR}/tmp.XXXXXX)";
|
|
||||||
temp_filename="${temp_dir}/yt-dlp-filename";
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# for now we only take one argument
|
|
||||||
# TODO: a for loop
|
|
||||||
################################################################################
|
|
||||||
source_url="${1}"
|
|
||||||
|
|
||||||
|
|
||||||
title_name="";
|
|
||||||
|
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
local -r clean_me="${1}";
|
local -r clean_me="${1}";
|
||||||
|
|
||||||
@ -145,6 +128,20 @@ fi
|
|||||||
|
|
||||||
check_requirements;
|
check_requirements;
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# create a temporary directory to work in
|
||||||
|
# set the temp_dir and temp_filename variables
|
||||||
|
################################################################################
|
||||||
|
temp_dir="$(mktemp -d ${SCRIPT_DIR}/tmp.XXXXXX)";
|
||||||
|
temp_filename="${temp_dir}/yt-dlp-filename";
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# for now we only take one argument
|
||||||
|
# TODO: a for loop
|
||||||
|
################################################################################
|
||||||
|
source_url="${1}"
|
||||||
|
title_name="";
|
||||||
|
|
||||||
msg "Downloading VOD...";
|
msg "Downloading VOD...";
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -199,6 +196,6 @@ ffmpeg -i "${temp_dir}/${title_name}.vod.mp4" \
|
|||||||
-c:s mov_text \
|
-c:s mov_text \
|
||||||
-y "${title_name}-res.mp4";
|
-y "${title_name}-res.mp4";
|
||||||
|
|
||||||
cleanup "${temp_dir}";
|
#cleanup "${temp_dir}";
|
||||||
|
|
||||||
msg "Done! Your finished file is ready: ${title_name}-res.mp4";
|
msg "Done! Your finished file is ready: ${title_name}-res.mp4";
|
||||||
|
Loading…
Reference in New Issue
Block a user