From 6444897a0bfbca333433a403059c15df8611219c Mon Sep 17 00:00:00 2001 From: Qualis Svagtlys <45446348+Svagtlys@users.noreply.github.com> Date: Wed, 20 Dec 2023 12:15:24 -0600 Subject: [PATCH] Correct indentation (4 -> 2) --- docs/source/code_reference/config_yaml.rst | 32 ++-- .../code_reference/subscriptions_yaml.rst | 72 +++---- docs/source/deprecation_notices.rst | 32 ++-- docs/source/faq/index.rst | 18 +- .../advanced_configuration.rst | 8 +- .../getting_started/automating_downloads.rst | 134 ++++++------- .../guides/getting_started/examples.rst | 8 +- .../guides/getting_started/first_config.rst | 20 +- .../guides/getting_started/first_download.rst | 26 +-- .../guides/getting_started/first_sub.rst | 6 +- docs/source/guides/getting_started/index.rst | 20 +- docs/source/guides/index.rst | 6 +- docs/source/guides/install/agnostic.rst | 14 +- docs/source/guides/install/docker.rst | 180 +++++++++--------- docs/source/guides/install/index.rst | 10 +- docs/source/guides/install/linux.rst | 40 ++-- docs/source/guides/install/windows.rst | 16 +- docs/source/index.rst | 28 +-- docs/source/introduction.rst | 16 +- docs/source/presets.rst | 78 ++++---- docs/source/usage.rst | 24 +-- 21 files changed, 394 insertions(+), 394 deletions(-) diff --git a/docs/source/code_reference/config_yaml.rst b/docs/source/code_reference/config_yaml.rst index fd15ee29..521e1f0a 100644 --- a/docs/source/code_reference/config_yaml.rst +++ b/docs/source/code_reference/config_yaml.rst @@ -11,8 +11,8 @@ The ``config.yaml`` is made up of two sections: .. code-block:: yaml - configuration: - presets: + configuration: + presets: You can jump to any section and subsection of the config using the navigation section to the left. @@ -38,9 +38,9 @@ should be persisted. .. code-block:: yaml - configuration: - persist_logs: - logs_directory: "/path/to/log/directory" + configuration: + persist_logs: + logs_directory: "/path/to/log/directory" Log files are stored as ``YYYY-mm-dd-HHMMSS.subscription_name.(success|error).log``. @@ -105,13 +105,13 @@ Presets support inheritance by defining a parent preset: .. code-block:: yaml - presets: - custom_preset: - ... - parent_preset: - ... - child_preset: - preset: "parent_preset" + presets: + custom_preset: + ... + parent_preset: + ... + child_preset: + preset: "parent_preset" In the example above, ``child_preset`` inherits all fields defined in ``parent_preset``. It is advantageous to use parent presets where possible to reduce duplicate yaml @@ -121,10 +121,10 @@ Presets also support inheritance from multiple presets: .. code-block:: yaml - child_preset: - preset: - - "custom_preset" - - "parent_preset" + child_preset: + preset: + - "custom_preset" + - "parent_preset" In this example, ``child_preset`` will inherit all fields from ``custom_preset`` and ``parent_preset`` in that order. The bottom-most preset has the highest diff --git a/docs/source/code_reference/subscriptions_yaml.rst b/docs/source/code_reference/subscriptions_yaml.rst index c57c100d..fe763a1d 100644 --- a/docs/source/code_reference/subscriptions_yaml.rst +++ b/docs/source/code_reference/subscriptions_yaml.rst @@ -17,25 +17,25 @@ Below is an example that downloads a YouTube playlist: .. code-block:: yaml :caption: config.yaml - presets: - playlist_preset_ex: - download: - download_strategy: "url" - url: "{url}" - output_options: - output_directory: "{output_directory}/{playlist_name}" - file_name: "{playlist_name}.{title}.{ext}" - overrides: - output_directory: "/path/to/ytdl-sub-videos" + presets: + playlist_preset_ex: + download: + download_strategy: "url" + url: "{url}" + output_options: + output_directory: "{output_directory}/{playlist_name}" + file_name: "{playlist_name}.{title}.{ext}" + overrides: + output_directory: "/path/to/ytdl-sub-videos" .. code-block:: yaml :caption: subscription.yaml - my_subscription_name: - preset: "playlist_preset_ex" - overrides: - playlist_name: "diy-playlist" - url: "https://youtube.com/playlist?list=UCsvn_Po0SmunchJYtttWpOxMg" + my_subscription_name: + preset: "playlist_preset_ex" + overrides: + playlist_name: "diy-playlist" + url: "https://youtube.com/playlist?list=UCsvn_Po0SmunchJYtttWpOxMg" Our preset ``playlist_preset_ex`` defines three custom variables: ``{output_directory}``, ``{playlist_name}``, and ``{url}``. The subscription sets @@ -50,13 +50,13 @@ For example: .. code-block:: yaml :caption: subscription.yaml - TV Show Full Archive: - = News: - "Breaking News": "https://www.youtube.com/@SomeBreakingNews" + TV Show Full Archive: + = News: + "Breaking News": "https://www.youtube.com/@SomeBreakingNews" - TV Show Only Recent: - = Tech | TV-Y: - "Two Minute Papers": "https://www.youtube.com/@TwoMinutePapers" + TV Show Only Recent: + = Tech | TV-Y: + "Two Minute Papers": "https://www.youtube.com/@TwoMinutePapers" Will create two subscriptions named "Breaking News" and "Two Minute Papers", equivalent to: @@ -110,13 +110,13 @@ by using the file-wide ``__preset__``: .. code-block:: yaml :caption: subscription.yaml - __preset__: - preset: "playlist_preset_ex" + __preset__: + preset: "playlist_preset_ex" - my_subscription_name: - overrides: - url: "https://youtube.com/playlist?list=UCsvn_Po0SmunchJYtttWpOxMg" - playlist_name: "diy-playlist" + my_subscription_name: + overrides: + url: "https://youtube.com/playlist?list=UCsvn_Po0SmunchJYtttWpOxMg" + playlist_name: "diy-playlist" This ``subscription.yaml`` is equivalent to the one above it because all subscriptions automatically set ``__preset__`` as a ``parent preset``. @@ -134,17 +134,17 @@ Using the example above, we can do: .. code-block:: yaml :caption: subscription.yaml - __preset__: - preset: - - "tv_show" - overrides: - tv_show_name: "{subscription_name}" + __preset__: + preset: + - "tv_show" + overrides: + tv_show_name: "{subscription_name}" - __value__: "url" + __value__: "url" - # single-line subscription, sets "Brandon Acker" and the subscription value - # to the override variables tv_show_name and url - "Brandon Acker": "https://www.youtube.com/@brandonacker" + # single-line subscription, sets "Brandon Acker" and the subscription value + # to the override variables tv_show_name and url + "Brandon Acker": "https://www.youtube.com/@brandonacker" Traditional subscriptions that can override presets will still work when using ``__value__``. ``__value__`` can also be set within a :ref:`code_reference/config_yaml:config.yaml`. \ No newline at end of file diff --git a/docs/source/deprecation_notices.rst b/docs/source/deprecation_notices.rst index 955aff43..fdbfc929 100644 --- a/docs/source/deprecation_notices.rst +++ b/docs/source/deprecation_notices.rst @@ -20,20 +20,20 @@ Music tags are getting simplified. ``tags`` will now reside directly under music .. code-block:: yaml - my_example_preset: - music_tags: - embed_thumbnail: True - tags: - artist: "Elvis Presley" + my_example_preset: + music_tags: + embed_thumbnail: True + tags: + artist: "Elvis Presley" To the following: .. code-block:: yaml - my_example_preset: - embed_thumbnail: True - music_tags: - artist: "Elvis Presley" + my_example_preset: + embed_thumbnail: True + music_tags: + artist: "Elvis Presley" The old format will be removed in October 2023. @@ -45,15 +45,15 @@ Convert from: .. code-block:: yaml - my_example_preset: - video_tags: - tags: - title: "Elvis Presley Documentary" + my_example_preset: + video_tags: + tags: + title: "Elvis Presley Documentary" To the following: .. code-block:: yaml - my_example_preset: - video_tags: - title: "Elvis Presley Documentary" + my_example_preset: + video_tags: + title: "Elvis Presley Documentary" diff --git a/docs/source/faq/index.rst b/docs/source/faq/index.rst index b4ad7273..c728b7ca 100644 --- a/docs/source/faq/index.rst +++ b/docs/source/faq/index.rst @@ -19,8 +19,8 @@ to download your YouTube cookie, then add it to your .. code-block:: yaml - ytdl_options: - cookiefile: "/path/to/cookies/file.txt" + ytdl_options: + cookiefile: "/path/to/cookies/file.txt" ...automate my downloads? ''''''''''''''''''''''''' @@ -35,8 +35,8 @@ Your preset most likely has ``break_on_existing`` set to True, which will stop d .. code-block:: yaml - ytdl_options: - break_on_existing: False + ytdl_options: + break_on_existing: False After your download your new date_range duration, re-enable ``break_on_existing`` to speed up successive downloads. @@ -46,11 +46,11 @@ Most likely the video has a non-English language set to its 'native' language. Y .. code-block:: yaml - ytdl_options: - extractor_args: - youtube: - lang: - - "en" + ytdl_options: + extractor_args: + youtube: + lang: + - "en" ...Plex is not showing my TV shows correctly '''''''''''''''''''''''''''''''''''''''''''' diff --git a/docs/source/guides/getting_started/advanced_configuration.rst b/docs/source/guides/getting_started/advanced_configuration.rst index d898bfe7..c3ec8aae 100644 --- a/docs/source/guides/getting_started/advanced_configuration.rst +++ b/docs/source/guides/getting_started/advanced_configuration.rst @@ -10,11 +10,11 @@ The layout of the ``config.yaml`` file is relatively straightforward: .. code-block:: yaml - presets: + presets: - preset_name: - plugin1: - plugin1_option1: value1 + preset_name: + plugin1: + plugin1_option1: value1 Modifying an Existing Preset diff --git a/docs/source/guides/getting_started/automating_downloads.rst b/docs/source/guides/getting_started/automating_downloads.rst index ba7fa583..53791dde 100644 --- a/docs/source/guides/getting_started/automating_downloads.rst +++ b/docs/source/guides/getting_started/automating_downloads.rst @@ -18,103 +18,103 @@ Docker and Unraid ----------------- .. tab-set:: + + .. tab-item:: GUI Image - .. tab-item:: GUI Image - - The script that will execute automatically is located at ``/config/ytdl-sub-configs/run-cron``. + The script that will execute automatically is located at ``/config/ytdl-sub-configs/run-cron``. - Access your container at http://localhost:8443/, then in the GUI terminal run these commands: + Access your container at http://localhost:8443/, then in the GUI terminal run these commands: - .. code-block:: shell + .. code-block:: shell - echo '#!/bin/bash' > /config/ytdl-sub-configs/run_cron - echo "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" >> /config/ytdl-sub-configs/run_cron - echo "echo 'Cron started, running ytdl-sub...'" >> /config/ytdl-sub-configs/run_cron - echo "cd /config/ytdl-sub-configs" >> /config/ytdl-sub-configs/run_cron - echo "ytdl-sub --config=config.yaml sub subscriptions.yaml" >> /config/ytdl-sub-configs/run_cron - chmod +x /config/ytdl-sub-configs/run_cron - chown abc:abc /config/ytdl-sub-configs/run_cron + echo '#!/bin/bash' > /config/ytdl-sub-configs/run_cron + echo "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" >> /config/ytdl-sub-configs/run_cron + echo "echo 'Cron started, running ytdl-sub...'" >> /config/ytdl-sub-configs/run_cron + echo "cd /config/ytdl-sub-configs" >> /config/ytdl-sub-configs/run_cron + echo "ytdl-sub --config=config.yaml sub subscriptions.yaml" >> /config/ytdl-sub-configs/run_cron + chmod +x /config/ytdl-sub-configs/run_cron + chown abc:abc /config/ytdl-sub-configs/run_cron - You can test the newly created script by running: + You can test the newly created script by running: - .. code-block:: shell + .. code-block:: shell - /config/ytdl-sub-configs/run_cron + /config/ytdl-sub-configs/run_cron - To create the cron definition, run the following command: + To create the cron definition, run the following command: - .. code-block:: shell + .. code-block:: shell - echo "# min hour day month weekday command" > /config/crontabs/abc - echo " 0 */6 * * * /config/ytdl-sub-configs/run_cron" >> /config/crontabs/abc + echo "# min hour day month weekday command" > /config/crontabs/abc + echo " 0 */6 * * * /config/ytdl-sub-configs/run_cron" >> /config/crontabs/abc - This will run the script every 6 hours. To run every hour, change ``*/6`` to ``*/1``, or to run once a day, change the same value to the hour (in 24hr format) that you want it to run at. See the `cron tab manpage`_ for more options. + This will run the script every 6 hours. To run every hour, change ``*/6`` to ``*/1``, or to run once a day, change the same value to the hour (in 24hr format) that you want it to run at. See the `cron tab manpage`_ for more options. - .. tab-item:: Headless Image + .. tab-item:: Headless Image - .. _LinuxServer's Universal Cron mod: https://github.com/linuxserver/docker-mods/tree/universal-cron + .. _LinuxServer's Universal Cron mod: https://github.com/linuxserver/docker-mods/tree/universal-cron - The first step is to ensure you have `LinuxServer's Universal Cron mod`_ enabled via the environment variable. For the GUI image, this is already included (no need to add it). + The first step is to ensure you have `LinuxServer's Universal Cron mod`_ enabled via the environment variable. For the GUI image, this is already included (no need to add it). - .. code-block:: yaml + .. 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 - - DOCKER_MODS=linuxserver/mods:universal-cron # <-- Make sure you have this! - volumes: - # ensure directories have user permissions - - :/config - - :/tv_shows - restart: unless-stopped + services: + ytdl-sub: + image: ghcr.io/jmbannon/ytdl-sub:latest + container_name: ytdl-sub + environment: + - PUID=1000 + - PGID=1000 + - TZ=America/Los_Angeles + - DOCKER_MODS=linuxserver/mods:universal-cron # <-- Make sure you have this! + volumes: + # ensure directories have user permissions + - :/config + - :/tv_shows + restart: unless-stopped - This line will tell your container to install and enable cron on start. + This line will tell your container to install and enable cron on start. - If you had to add this line, you will need to restart your container. + If you had to add this line, you will need to restart your container. - .. code-block:: shell + .. code-block:: shell - docker compose restart + docker compose restart - The script that will execute automatically is located at ``/config/run-cron``. + The script that will execute automatically is located at ``/config/run-cron``. - Access your container from the terminal by running: + Access your container from the terminal by running: - .. code-block:: shell + .. code-block:: shell - docker exec -itu abc ytdl-sub /bin/bash + docker exec -itu abc ytdl-sub /bin/bash - then in the terminal run these commands: + then in the terminal run these commands: - .. code-block:: shell + .. code-block:: shell - echo '#!/bin/bash' > /config/ytdl-sub-configs/run_cron - echo "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" >> /config/ytdl-sub-configs/run_cron - echo "echo 'Cron started, running ytdl-sub...'" >> /config/ytdl-sub-configs/run_cron - echo "cd /config/ytdl-sub-configs" >> /config/ytdl-sub-configs/run_cron - echo "ytdl-sub --config=config.yaml sub subscriptions.yaml" >> /config/ytdl-sub-configs/run_cron - chmod +x /config/ytdl-sub-configs/run_cron - chown abc:abc /config/ytdl-sub-configs/run_cron + echo '#!/bin/bash' > /config/ytdl-sub-configs/run_cron + echo "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" >> /config/ytdl-sub-configs/run_cron + echo "echo 'Cron started, running ytdl-sub...'" >> /config/ytdl-sub-configs/run_cron + echo "cd /config/ytdl-sub-configs" >> /config/ytdl-sub-configs/run_cron + echo "ytdl-sub --config=config.yaml sub subscriptions.yaml" >> /config/ytdl-sub-configs/run_cron + chmod +x /config/ytdl-sub-configs/run_cron + chown abc:abc /config/ytdl-sub-configs/run_cron - You can test the newly created script by running: + You can test the newly created script by running: - .. code-block:: + .. code-block:: - /config/run_cron + /config/run_cron - To create the cron definition, run the following command: + To create the cron definition, run the following command: - .. code-block:: shell + .. code-block:: shell - echo "# min hour day month weekday command" > /config/crontabs/abc - echo " 0 */6 * * * /config/run_cron" >> /config/crontabs/abc - - This will run the script every 6 hours. To run every hour, change ``*/6`` to ``*/1``, or to run once a day, change the same value to the hour (in 24hr format) that you want it to run at. See the `cron tab manpage`_ for more options. + echo "# min hour day month weekday command" > /config/crontabs/abc + echo " 0 */6 * * * /config/run_cron" >> /config/crontabs/abc + + This will run the script every 6 hours. To run every hour, change ``*/6`` to ``*/1``, or to run once a day, change the same value to the hour (in 24hr format) that you want it to run at. See the `cron tab manpage`_ for more options. .. _linux-setup: @@ -123,8 +123,8 @@ Linux .. code-block:: shell - crontab -e - 0 */6 * * * /config/run_cron + crontab -e + 0 */6 * * * /config/run_cron @@ -137,4 +137,4 @@ To be tested (please contact code owner or join the discord server if you can te .. code-block:: powershell - ytdl-sub.exe --config \path\to\config\config.yaml sub \path\to\config\subscriptions.yaml \ No newline at end of file + ytdl-sub.exe --config \path\to\config\config.yaml sub \path\to\config\subscriptions.yaml \ No newline at end of file diff --git a/docs/source/guides/getting_started/examples.rst b/docs/source/guides/getting_started/examples.rst index a8dcd75b..522ba19a 100644 --- a/docs/source/guides/getting_started/examples.rst +++ b/docs/source/guides/getting_started/examples.rst @@ -6,9 +6,9 @@ and perform a dry-run using .. code-block:: bash - ytdl-sub \ - --dry-run \ - --config path/to/config.yaml \ - sub path/to/subscriptions.yaml + ytdl-sub \ + --dry-run \ + --config path/to/config.yaml \ + sub path/to/subscriptions.yaml This will simulate what a download will look like. \ No newline at end of file diff --git a/docs/source/guides/getting_started/first_config.rst b/docs/source/guides/getting_started/first_config.rst index 320730f3..34126aa9 100644 --- a/docs/source/guides/getting_started/first_config.rst +++ b/docs/source/guides/getting_started/first_config.rst @@ -4,19 +4,19 @@ Initial Configuration Your first configuration will look pretty simple: .. code-block:: yaml - :linenos: + :linenos: - configuration: - working_directory: '.ytdl-sub-downloads' + configuration: + working_directory: '.ytdl-sub-downloads' - presets: - "My Favorite YouTube Channels": - preset: - - "Jellyfin TV Show by Date" - - "Only Recent" + presets: + "My Favorite YouTube Channels": + preset: + - "Jellyfin TV Show by Date" + - "Only Recent" - overrides: - tv_show_directory: "/tv_shows/youtube" + overrides: + tv_show_directory: "/tv_shows/youtube" The first two lines in this ``config.yaml`` file are the ``configuration``, and define the ``working_directory``, which is described near the bottom of :ref:`this section ` diff --git a/docs/source/guides/getting_started/first_download.rst b/docs/source/guides/getting_started/first_download.rst index c2a5d2da..8babc19e 100644 --- a/docs/source/guides/getting_started/first_download.rst +++ b/docs/source/guides/getting_started/first_download.rst @@ -5,26 +5,26 @@ Once you have the ``config.yaml`` and ``subscriptions.yaml`` files created and f .. tab-set:: - .. tab-item:: Dry run + .. tab-item:: Dry run - A dry run lets you check that your configuration doesn't throw any errors and what the expected output files of actually doing the download are, without actually downloading the full media. + A dry run lets you check that your configuration doesn't throw any errors and what the expected output files of actually doing the download are, without actually downloading the full media. - .. code-block:: shell + .. code-block:: shell - ytdl-sub --dry-run sub + ytdl-sub --dry-run sub - .. tab-item:: Normal run + .. tab-item:: Normal run - A normal run will download all files as determined by your ``presets`` and, once processing is finished, move the downloaded and processed files to your ``output_directory``. + A normal run will download all files as determined by your ``presets`` and, once processing is finished, move the downloaded and processed files to your ``output_directory``. - .. code-block:: shell + .. code-block:: shell - ytdl-sub sub + ytdl-sub sub - .. tab-item:: One-time download + .. tab-item:: One-time download - Sometimes you may only want to download media once, in which case adding them to your ``subscriptions.yaml`` file is unneccessary. As an example, the below code will download the same videos as our subscription file: + Sometimes you may only want to download media once, in which case adding them to your ``subscriptions.yaml`` file is unneccessary. As an example, the below code will download the same videos as our subscription file: - .. code-block:: shell - - ytdl-sub dl --preset "My Favorite YouTube Channels" --overrides.subscription_name "Rick Astley" --overrides.subscription_value "https://www.youtube.com/@RickAstleyYT/videos" \ No newline at end of file + .. code-block:: shell + + ytdl-sub dl --preset "My Favorite YouTube Channels" --overrides.subscription_name "Rick Astley" --overrides.subscription_value "https://www.youtube.com/@RickAstleyYT/videos" \ No newline at end of file diff --git a/docs/source/guides/getting_started/first_sub.rst b/docs/source/guides/getting_started/first_sub.rst index 9f5c37c3..bc12adf1 100644 --- a/docs/source/guides/getting_started/first_sub.rst +++ b/docs/source/guides/getting_started/first_sub.rst @@ -4,9 +4,9 @@ Initial Subscription Your first subscription should look similar to the below: .. code-block:: yaml - - "My Favorite YouTube Channels": - "Rick Astley": "https://www.youtube.com/@RickAstleyYT/videos" + + "My Favorite YouTube Channels": + "Rick Astley": "https://www.youtube.com/@RickAstleyYT/videos" The first line in this subscription file is the ``preset``, which provides the "definitions" for the subscription as listed in :doc:`/guides/getting_started/first_config`. diff --git a/docs/source/guides/getting_started/index.rst b/docs/source/guides/getting_started/index.rst index 1ce1a331..63145b5f 100644 --- a/docs/source/guides/getting_started/index.rst +++ b/docs/source/guides/getting_started/index.rst @@ -74,14 +74,14 @@ Other docs that may be of use: :doc:`examples` .. toctree:: - :hidden: - :caption: Getting Started Guide - :maxdepth: 1 + :hidden: + :caption: Getting Started Guide + :maxdepth: 1 - first_config - first_sub - first_download - automating_downloads - advanced_configuration - prebuilt_presets - examples \ No newline at end of file + first_config + first_sub + first_download + automating_downloads + advanced_configuration + prebuilt_presets + examples \ No newline at end of file diff --git a/docs/source/guides/index.rst b/docs/source/guides/index.rst index d6bba6ce..114f5acc 100644 --- a/docs/source/guides/index.rst +++ b/docs/source/guides/index.rst @@ -2,6 +2,6 @@ Guides ====== .. toctree:: - install/index - getting_started/index - development/index \ No newline at end of file + install/index + getting_started/index + development/index \ No newline at end of file diff --git a/docs/source/guides/install/agnostic.rst b/docs/source/guides/install/agnostic.rst index de3a4671..48b87843 100644 --- a/docs/source/guides/install/agnostic.rst +++ b/docs/source/guides/install/agnostic.rst @@ -9,7 +9,7 @@ Both ffmpeg and Python 3.10 or greater are required. .. code-block:: bash - python3 -m pip install -U ytdl-sub + python3 -m pip install -U ytdl-sub Local Install -------------- @@ -17,10 +17,10 @@ With a Python 3.10 virtual environment, you can clone and install the repo. .. code-block:: bash - git clone https://github.com/jmbannon/ytdl-sub.git - cd ytdl-sub + git clone https://github.com/jmbannon/ytdl-sub.git + cd ytdl-sub - pip install -e . + pip install -e . Local Docker Build ------------------- @@ -29,7 +29,7 @@ will build the python wheel and install it in the Dockerfile. .. code-block:: bash - git clone https://github.com/jmbannon/ytdl-sub.git - cd ytdl-sub + git clone https://github.com/jmbannon/ytdl-sub.git + cd ytdl-sub - make docker \ No newline at end of file + make docker \ No newline at end of file diff --git a/docs/source/guides/install/docker.rst b/docs/source/guides/install/docker.rst index f7b3d205..3793eba9 100644 --- a/docs/source/guides/install/docker.rst +++ b/docs/source/guides/install/docker.rst @@ -25,23 +25,23 @@ After starting, code-server will be running at http://localhost:8443/, which is .. code-block:: yaml - services: - ytdl-sub: - image: ghcr.io/jmbannon/ytdl-sub-gui: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 - ports: - - 8443:8443 - restart: unless-stopped + services: + ytdl-sub: + image: ghcr.io/jmbannon/ytdl-sub-gui: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 + ports: + - 8443:8443 + restart: unless-stopped Headless Image ~~~~~~~~~~~~~~ @@ -53,29 +53,29 @@ via exec'ing into the image using the command: .. code-block:: bash - docker exec -u abc -it ytdl-sub /bin/bash + docker exec -u abc -it ytdl-sub /bin/bash This is how you will access and interact with ``ytdl-sub``. .. 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 - - DOCKER_MODS=linuxserver/mods:universal-cron - volumes: - - :/config - - :/tv_shows # optional - - :/movies # optional - - :/music_videos # optional - - :/music # optional - restart: unless-stopped + services: + ytdl-sub: + image: ghcr.io/jmbannon/ytdl-sub:latest + container_name: ytdl-sub + environment: + - PUID=1000 + - PGID=1000 + - TZ=America/Los_Angeles + - DOCKER_MODS=linuxserver/mods:universal-cron + volumes: + - :/config + - :/tv_shows # optional + - :/movies # optional + - :/music_videos # optional + - :/music # optional + restart: unless-stopped CPU/GPU Passthrough ~~~~~~~~~~~~~~~~~~~ @@ -89,71 +89,71 @@ CPU .. code-block:: yaml - services: - ytdl-sub: - image: ghcr.io/jmbannon/ytdl-sub-gui: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 - ports: - - 8443:8443 - devices: - - /dev/dri:/dev/dri # CPU passthrough - restart: unless-stopped + services: + ytdl-sub: + image: ghcr.io/jmbannon/ytdl-sub-gui: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 + ports: + - 8443:8443 + devices: + - /dev/dri:/dev/dri # CPU passthrough + restart: unless-stopped GPU ^^^ .. code-block:: yaml - services: - ytdl-sub: - image: ghcr.io/jmbannon/ytdl-sub-gui:latest - container_name: ytdl-sub - environment: - - PUID=1000 - - PGID=1000 - - TZ=America/Los_Angeles - - NVIDIA_DRIVER_CAPABILITIES=all # Nvidia ENV args - - NVIDIA_VISIBLE_DEVICES=all - volumes: - - :/config - - :/tv_shows # optional - - :/movies # optional - - :/music_videos # optional - - :/music # optional - ports: - - 8443:8443 - deploy: - resources: - reservations: - devices: - - capabilities: [gpu] # GPU passthrough - restart: unless-stopped + services: + ytdl-sub: + image: ghcr.io/jmbannon/ytdl-sub-gui:latest + container_name: ytdl-sub + environment: + - PUID=1000 + - PGID=1000 + - TZ=America/Los_Angeles + - NVIDIA_DRIVER_CAPABILITIES=all # Nvidia ENV args + - NVIDIA_VISIBLE_DEVICES=all + volumes: + - :/config + - :/tv_shows # optional + - :/movies # optional + - :/music_videos # optional + - :/music # optional + ports: + - 8443:8443 + deploy: + resources: + reservations: + devices: + - capabilities: [gpu] # GPU passthrough + restart: unless-stopped Docker CLI ---------- .. code-block:: bash - docker run -d \ - --name=ytdl-sub \ - -e PUID=1000 \ - -e PGID=1000 \ - -e TZ=America/Los_Angeles \ - -p 8443:8443 \ - -v :/config \ - -v :/tv_shows \ - -v :/movies \ - -v :/music_videos \ - -v :/music \ - --restart unless-stopped \ - ghcr.io/jmbannon/ytdl-sub-gui:latest \ No newline at end of file + docker run -d \ + --name=ytdl-sub \ + -e PUID=1000 \ + -e PGID=1000 \ + -e TZ=America/Los_Angeles \ + -p 8443:8443 \ + -v :/config \ + -v :/tv_shows \ + -v :/movies \ + -v :/music_videos \ + -v :/music \ + --restart unless-stopped \ + ghcr.io/jmbannon/ytdl-sub-gui:latest \ No newline at end of file diff --git a/docs/source/guides/install/index.rst b/docs/source/guides/install/index.rst index 9acbf9df..d9060b46 100644 --- a/docs/source/guides/install/index.rst +++ b/docs/source/guides/install/index.rst @@ -7,8 +7,8 @@ All installations require a 64-bit CPU. 32-bit is not supported. Once you've completed your installation, please refer to the :doc:`../getting_started/index` guide for next steps .. toctree:: - docker - linux - unraid - windows - agnostic + docker + linux + unraid + windows + agnostic diff --git a/docs/source/guides/install/linux.rst b/docs/source/guides/install/linux.rst index 0c222aa8..6990ae98 100644 --- a/docs/source/guides/install/linux.rst +++ b/docs/source/guides/install/linux.rst @@ -4,22 +4,22 @@ Requires ffmpeg as a dependency. Can typically be installed with any Linux packa .. 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 + 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 + 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 + # 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 -------------- @@ -27,19 +27,19 @@ Requires ffmpeg as a dependency. Can typically be installed with any Linux packa .. 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 + 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 + 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 \ No newline at end of file + # 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 \ No newline at end of file diff --git a/docs/source/guides/install/windows.rst b/docs/source/guides/install/windows.rst index c3cfb0ed..7c4050c2 100644 --- a/docs/source/guides/install/windows.rst +++ b/docs/source/guides/install/windows.rst @@ -4,12 +4,12 @@ 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 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 \ No newline at end of file + # 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 \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst index 3c58dde0..1763bdb8 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,21 +1,21 @@ ytdl-sub User Guide =================== .. toctree:: - :maxdepth: 2 + :maxdepth: 2 - introduction - guides/index - faq/index - code_reference/index - presets - usage - deprecation_notices + introduction + guides/index + faq/index + code_reference/index + presets + usage + deprecation_notices .. note:: End goal similar to: https://picard-docs.musicbrainz.org/en/functions/list_by_type.html - Initial plans: + Initial plans: - - step-by-step noob install instructions for each platform - - pages for each prebuilt preset, showing which variables that can be overridden to do different things (i.e. episode_title) - - new wiki walkthrough that uses the README config as a starting point, and gradually adds custom changes - - pages for how to enable custom metadata agents for Kodi/Plex/jellyfin - - page dedicated to explaining the structure of a config (it's only lightly touched on now, many folks struggle to understand the 'pattern' of presets/plugins/overrides) + - step-by-step noob install instructions for each platform + - pages for each prebuilt preset, showing which variables that can be overridden to do different things (i.e. episode_title) + - new wiki walkthrough that uses the README config as a starting point, and gradually adds custom changes + - pages for how to enable custom metadata agents for Kodi/Plex/jellyfin + - page dedicated to explaining the structure of a config (it's only lightly touched on now, many folks struggle to understand the 'pattern' of presets/plugins/overrides) diff --git a/docs/source/introduction.rst b/docs/source/introduction.rst index 22be9c0b..0126202a 100644 --- a/docs/source/introduction.rst +++ b/docs/source/introduction.rst @@ -14,24 +14,24 @@ Visual examples =============== .. figure:: https://user-images.githubusercontent.com/10107080/182677243-b4184e51-9780-4094-bd40-ea4ff58555d0.PNG - :alt: The Jellyfin web interface, showing the thumbnails of various YouTube shows. + :alt: The Jellyfin web interface, showing the thumbnails of various YouTube shows. - Youtube channels as TV shows in Jellyfin + Youtube channels as TV shows in Jellyfin .. figure:: https://user-images.githubusercontent.com/10107080/182677256-43aeb029-0c3f-4648-9fd2-352b9666b262.PNG - :alt: The Jellyfin web interace, showing the thumbnails of various music videos starring the Red Hot Chili Peppers + :alt: The Jellyfin web interace, showing the thumbnails of various music videos starring the Red Hot Chili Peppers - Music videos and concerts in Jellyfin + Music videos and concerts in Jellyfin .. figure:: https://user-images.githubusercontent.com/10107080/182677268-d1bf2ff0-9b9c-4a04-98ec-443a67ada734.png - :alt: The Kodi app interface, showing a list of artists available to watch under the "Music videos" heading + :alt: The Kodi app interface, showing a list of artists available to watch under the "Music videos" heading - Music videos and concerts in Kodi + Music videos and concerts in Kodi .. figure:: https://user-images.githubusercontent.com/10107080/182685415-06adf477-3dd3-475d-bbcd-53b0152b9f0a.PNG - :alt: The MusicBee app interface, showing a list of album artists and the thumbnails of all downloaded songs produced by the currently selected artist + :alt: The MusicBee app interface, showing a list of album artists and the thumbnails of all downloaded songs produced by the currently selected artist - SoundCloud albums and singles in MusicBee + SoundCloud albums and singles in MusicBee Why ytdl-sub? diff --git a/docs/source/presets.rst b/docs/source/presets.rst index 10c25b1f..6eb7b708 100644 --- a/docs/source/presets.rst +++ b/docs/source/presets.rst @@ -44,31 +44,31 @@ and overriding the following variables: .. code-block:: yaml - rick_a_tv_show_by_date: - preset: - - "jellyfin_tv_show_by_date" - - "season_by_year__episode_by_month_day" - overrides: - # required - tv_show_name: "Rick A" - tv_show_directory: "/path/to/youtube_shows" - url: "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw" - # can be modified from their default value - # tv_show_genre: "ytdl-sub" - # tv_show_content_rating: "TV-14" - # episode_title: "{upload_date_standardized} - {title}" - # episode_description: "{webpage_url}" + rick_a_tv_show_by_date: + preset: + - "jellyfin_tv_show_by_date" + - "season_by_year__episode_by_month_day" + overrides: + # required + tv_show_name: "Rick A" + tv_show_directory: "/path/to/youtube_shows" + url: "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw" + # can be modified from their default value + # tv_show_genre: "ytdl-sub" + # tv_show_content_rating: "TV-14" + # episode_title: "{upload_date_standardized} - {title}" + # episode_description: "{webpage_url}" In addition, you can add additional URLs to create a single TV by using the override variables ``url2``, ``url3``, ..., ``url20``: .. code-block:: yaml - overrides: - tv_show_name: "Rick A" - tv_show_directory: "/path/to/youtube_shows" - url: "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw" - url2: "https://www.youtube.com/@just.rick_6" + overrides: + tv_show_name: "Rick A" + tv_show_directory: "/path/to/youtube_shows" + url: "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw" + url2: "https://www.youtube.com/@just.rick_6" TV Show Collection @@ -121,24 +121,24 @@ one or more season presets, with the following override variables: .. code-block:: yaml - rick_a_tv_show_collection: - preset: - - "jellyfin_tv_show_collection" - - "season_by_collection__episode_by_year_month_day_reversed" - - "collection_season_1" - - "collection_season_2" - overrides: - # required - tv_show_name: "Rick A" - tv_show_directory: "/path/to/youtube_shows" - collection_season_1_url: "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw" - collection_season_1_name: "All Videos" - collection_season_2_url: "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc" - collection_season_2_name: "Official Music Videos" - # can be modified from their default value - # tv_show_genre: "ytdl-sub" - # episode_title: "{upload_date_standardized} - {title}" - # episode_description: "{webpage_url}" + rick_a_tv_show_collection: + preset: + - "jellyfin_tv_show_collection" + - "season_by_collection__episode_by_year_month_day_reversed" + - "collection_season_1" + - "collection_season_2" + overrides: + # required + tv_show_name: "Rick A" + tv_show_directory: "/path/to/youtube_shows" + collection_season_1_url: "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw" + collection_season_1_name: "All Videos" + collection_season_2_url: "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc" + collection_season_2_name: "Official Music Videos" + # can be modified from their default value + # tv_show_genre: "ytdl-sub" + # episode_title: "{upload_date_standardized} - {title}" + # episode_description: "{webpage_url}" Common ------ @@ -175,8 +175,8 @@ change this number by setting: .. code-block:: yaml - ytdl_options: - max_downloads: 30 # Desired number to download per invocation + ytdl_options: + max_downloads: 30 # Desired number to download per invocation Once the entire channel is downloaded, remove this preset. Then it will pull metadata from newest to oldest again, and stop pulling additional metadata once it reaches a video that has already been diff --git a/docs/source/usage.rst b/docs/source/usage.rst index b0d01cb9..0a9f1d3e 100644 --- a/docs/source/usage.rst +++ b/docs/source/usage.rst @@ -3,7 +3,7 @@ Usage .. code-block:: - ytdl-sub [GENERAL OPTIONS] {sub,dl,view} [COMMAND OPTIONS] + ytdl-sub [GENERAL OPTIONS] {sub,dl,view} [COMMAND OPTIONS] For Windows users, it would be ``ytdl-sub.exe`` @@ -43,28 +43,28 @@ Download a single subscription in the form of CLI arguments. .. code-block:: - ytdl-sub [GENERAL OPTIONS] dl [SUBSCRIPTION ARGUMENTS] + ytdl-sub [GENERAL OPTIONS] dl [SUBSCRIPTION ARGUMENTS] ``SUBSCRIPTION ARGUMENTS`` are exactly the same as YAML arguments, but use periods (``.``) instead of indents for specifying YAML from the CLI. For example, you can represent this subscription: .. code-block:: yaml - rick_a: - preset: - - "tv_show" - overrides: - tv_show_name: "Rick A" - url: "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw" + rick_a: + preset: + - "tv_show" + overrides: + tv_show_name: "Rick A" + url: "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw" Using the command: .. code-block:: bash - ytdl-sub dl \ - --preset "tv_show" \ - --overrides.tv_show_name "Rick A" \ - --overrides.url: "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw" + ytdl-sub dl \ + --preset "tv_show" \ + --overrides.tv_show_name "Rick A" \ + --overrides.url: "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw" See how to shorten commands using `download aliases `_.