Files
youtubedl/ytdl.sh

18 lines
360 B
Bash
Raw Normal View History

2025-07-02 06:56:23 -07:00
#!/bin/bash
# Either builds yt-dlp docker container or runs it
if [[ "$1" == "" ]]; then
echo "Arg: build"
echo "Arg: run [yt-dlp target URL]"
fi
if [[ "$1" == "build" ]]; then
echo "Building"
docker build -t ytdl .
fi
if [[ "$1" == "run" ]]; then
echo "Running"
2025-07-02 07:31:38 -07:00
docker run --rm -v $PWD/vid:/vid ytdl /yt-dlp -P /vid -x --audio-format mp3 $2
2025-07-02 06:56:23 -07:00
fi