From fea3f86acffe3776245389b9247dbf9abbc2e504 Mon Sep 17 00:00:00 2001 From: Jesse Bannon Date: Wed, 1 Mar 2023 19:58:27 -0800 Subject: [PATCH] [DOCS] Improved installation guide (#490) --- README.md | 85 ++++----------------------- docs/index.rst | 1 + docs/install.rst | 146 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 158 insertions(+), 74 deletions(-) create mode 100644 docs/install.rst diff --git a/README.md b/README.md index 5ab3062c..71186b10 100644 --- a/README.md +++ b/README.md @@ -235,84 +235,21 @@ player to recognize downloads as: - Discographies ## Installation +`ytdl-sub` can be installed on the following platforms. -The ytdl-sub docker image uses -[LinuxServer's](https://www.linuxserver.io/) -[base alpine image](https://github.com/linuxserver/docker-baseimage-alpine). -It looks, feels, and operates like other LinuxServer images. This is the -recommended way to use ytdl-sub. - -The docker image is intended to be used as a console. For automating -`subscriptions.yaml` downloads to pull new media, see -[this guide](https://github.com/jmbannon/ytdl-sub/wiki/7.-Automate-Downloading-New-Content-Using-Your-Configs) -on how set up a cron job in the docker container. - -### Docker Compose -```yaml -services: - ytdl-sub: - image: ghcr.io/jmbannon/ytdl-sub:latest - container_name: ytdl-sub - environment: - - PUID=1000 - - PGID=1000 - - TZ=America/Los_Angeles - volumes: - - :/config - - :/tv_shows # optional - - :/movies # optional - - :/music_videos # optional - - :/music # optional - restart: unless-stopped -``` -### Docker CLI -```commandline -docker run -d \ - --name=ytdl-sub \ - -e PUID=1000 \ - -e PGID=1000 \ - -e TZ=America/Los_Angeles \ - -v :/config \ - -v :/tv_shows \ - -v :/movies \ - -v :/music_videos \ - -v :/music \ - --restart unless-stopped \ - ghcr.io/jmbannon/ytdl-sub:latest -``` - -### Executable -Download and use our latest executable using the command below. For Windows users, use this method in -[WSL](https://learn.microsoft.com/en-us/windows/wsl/). FFmpeg is a required dependency. -```commandline -curl -L -o ytdl-sub https://github.com/jmbannon/ytdl-sub/releases/latest/download/ytdl-sub -chmod +x ytdl-sub -./ytdl-sub -h -``` - -### PIP -You can install our [PyPI package](https://pypi.org/project/ytdl-sub/). Both FFmpeg and Python 3.10 or greater are required. -```commandline -python3 -m pip install -U ytdl-sub -``` - -### Building Docker Image Locally -Run `make docker` in the root directory of this repo to build the image. This -will build the python wheel and install it in the Dockerfile. - -### Building Python Package Locally -With a Python 3.10 virtual environment, you can clone and install the repo using -```commandline -git clone https://github.com/jmbannon/ytdl-sub.git -cd ytdl-sub - -pip install -e . -``` +- Docker Compose +- Docker CLI +- Windows +- Linux +- Linux ARM +- PIP +- Local Install +- Local Docker Build ## Contributing There are many ways to contribute, even without coding. Please take a look in -our [GitHub Issues](https://github.com/jmbannon/ytdl-sub/issues) to ask -questions, submit a feature request, or pick up a bug. +our [GitHub Issues](https://github.com/jmbannon/ytdl-sub/issues) to submit a feature request, or +pick up a bug. ## Support We are pretty active in our diff --git a/docs/index.rst b/docs/index.rst index 5564031f..8ee85a75 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -21,5 +21,6 @@ Contents .. toctree:: :maxdepth: 2 + install presets config diff --git a/docs/install.rst b/docs/install.rst new file mode 100644 index 00000000..d3597973 --- /dev/null +++ b/docs/install.rst @@ -0,0 +1,146 @@ +Install +======= +``ytdl-sub`` can be installed on the following platforms. + +.. contents:: + :depth: 2 + +All installations require a 64-bit CPU. 32-bit is not supported. + +Docker Compose +-------------- +The ytdl-sub docker image uses +`Linux Server's `_ +`base alpine image `_ +It looks, feels, and operates like other LinuxServer images. This is the +recommended way to use ytdl-sub. + +The docker image is intended to be used as a console. For automating +``subscriptions.yaml`` downloads to pull new media, see +`this guide `_ +on how set up a cron job in the docker container. + +.. code-block:: yaml + + services: + ytdl-sub: + image: ghcr.io/jmbannon/ytdl-sub:latest + container_name: ytdl-sub + environment: + - PUID=1000 + - PGID=1000 + - TZ=America/Los_Angeles + volumes: + - :/config + - :/tv_shows # optional + - :/movies # optional + - :/music_videos # optional + - :/music # optional + restart: unless-stopped + +Docker +-------------- +.. code-block:: bash + + docker run -d \ + --name=ytdl-sub \ + -e PUID=1000 \ + -e PGID=1000 \ + -e TZ=America/Los_Angeles \ + -v :/config \ + -v :/tv_shows \ + -v :/movies \ + -v :/music_videos \ + -v :/music \ + --restart unless-stopped \ + ghcr.io/jmbannon/ytdl-sub:latest + +Windows +-------------- +From powershell, run: + +.. code-block:: powershell + + # Download ffmpeg/ffprobe dependencies from yt-dlp + curl.exe -L -o ffmpeg.zip https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl.zip + tar -xf ffmpeg.zip + move "ffmpeg-master-latest-win64-gpl\bin\ffmpeg.exe" "ffmpeg.exe" + move "ffmpeg-master-latest-win64-gpl\bin\ffprobe.exe" "ffprobe.exe" + + # Download ytdl-sub + curl.exe -L -o ytdl-sub.exe https://github.com/jmbannon/ytdl-sub/releases/latest/download/ytdl-sub.exe + ytdl-sub.exe -h + +Linux +-------------- +Requires ffmpeg as a dependency. Can typically be installed with any Linux package manager. + +.. code-block:: bash + + curl -L -o ytdl-sub https://github.com/jmbannon/ytdl-sub/releases/latest/download/ytdl-sub + chmod +x ytdl-sub + ytdl-sub -h + +You can also install using yt-dlp's ffmpeg builds. This ensures your ffmpeg is up to date: + +.. code-block:: bash + + curl -L -o ffmpeg.tar.gz https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz + tar -xf ffmpeg.tar.gz + chmod +x ffmpeg-master-latest-linux64-gpl/bin/ffmpeg + chmod +x ffmpeg-master-latest-linux64-gpl/bin/ffprobe + + # May need sudo / root permissions to perform + mv ffmpeg-master-latest-linux64-gpl/bin/ffmpeg /usr/bin/ffmpeg + mv ffmpeg-master-latest-linux64-gpl/bin/ffprobe /usr/bin/ffprobe + +Linux ARM +-------------- +Requires ffmpeg as a dependency. Can typically be installed with any Linux package manager. + +.. code-block:: bash + + curl -L -o ytdl-sub https://github.com/jmbannon/ytdl-sub/releases/latest/download/ytdl-sub_aarch64 + chmod +x ytdl-sub + ytdl-sub -h + +You can also install using yt-dlp's ffmpeg builds. This ensures your ffmpeg is up to date: + +.. code-block:: bash + + curl -L -o ffmpeg.tar.gz https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linuxarm64-gpl.tar.xz + tar -xf ffmpeg.tar.gz + chmod +x ffmpeg-master-latest-linuxarm64-gpl/bin/ffmpeg + chmod +x ffmpeg-master-latest-linuxarm64-gpl/bin/ffprobe + + # May need sudo / root permissions to perform + mv ffmpeg-master-latest-linuxarm64-gpl/bin/ffmpeg /usr/bin/ffmpeg + mv ffmpeg-master-latest-linuxarm64-gpl/bin/ffprobe /usr/bin/ffprobe + + +PIP +-------------- +You can install our +`PyPI package `_. +Both ffmpeg and Python 3.10 or greater are required. + +.. code-block:: bash + + python3 -m pip install -U ytdl-sub + +Local Install +-------------- +With a Python 3.10 virtual environment, you can clone and install the repo using + +.. code-block:: bash + + git clone https://github.com/jmbannon/ytdl-sub.git + cd ytdl-sub + + pip install -e . + +Local Docker Build +-------------- +Run ``make docker`` in the root directory of this repo to build the image. This +will build the python wheel and install it in the Dockerfile. +