From e3773f850a2c03e19e9f079429749e7cdf7c8f74 Mon Sep 17 00:00:00 2001 From: finn Date: Wed, 2 Jul 2025 06:56:23 -0700 Subject: [PATCH] working milepost --- .gitignore | 1 + Dockerfile | 2 ++ ytdl.sh | 17 +++++++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 .gitignore create mode 100755 ytdl.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..39cb56d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +vid/ diff --git a/Dockerfile b/Dockerfile index 0ea7fc1..b7701d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,5 @@ +# dockerfile for containerized yt-dlp + FROM python:3-bookworm RUN wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp diff --git a/ytdl.sh b/ytdl.sh new file mode 100755 index 0000000..4a9825c --- /dev/null +++ b/ytdl.sh @@ -0,0 +1,17 @@ +#!/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" + docker run -v vid:/vid ytdl /yt-dlp $2 +fi