2020-12-16 16:14:16 +01:00
|
|
|
= download-yt-feeds
|
2020-12-16 16:52:53 +01:00
|
|
|
:url-zsh: https://www.zsh.org/
|
|
|
|
:url-ytdl: https://github.com/ytdl-org/youtube-dl
|
|
|
|
:url-ytdl-format: {url-ytdl}/#format-selection
|
2020-12-16 16:14:16 +01:00
|
|
|
|
2020-12-16 19:30:35 +01:00
|
|
|
Download YouTube-feeds as if they are podcasts. Files will be put in
|
2020-12-16 19:28:24 +01:00
|
|
|
`<download_dir>/uploader/title.extension`.
|
|
|
|
|
|
|
|
This should work for all sites `youtube-dl` supports, but I only tested YouTube.
|
|
|
|
|
|
|
|
== Features
|
|
|
|
|
|
|
|
* Downloads newest videos from a list of channels.
|
|
|
|
* Creates playlist with newest videos.
|
|
|
|
* Deletes old videos.
|
|
|
|
* Passes extra arguments to youtube-dl.
|
2020-12-16 16:14:16 +01:00
|
|
|
|
2020-12-16 16:52:53 +01:00
|
|
|
== Install
|
|
|
|
|
|
|
|
Put `download-yt-feeds` somewhere in your `${PATH}` and make it executable.
|
|
|
|
|
|
|
|
=== Dependencies
|
|
|
|
|
2020-12-16 16:56:02 +01:00
|
|
|
* Linux (*BSD and other UNIXes should work, but I haven't tested)
|
2020-12-16 16:52:53 +01:00
|
|
|
* link:{url-zsh}[Zsh]
|
|
|
|
* link:{url-ytdl}[youtube-dl]
|
|
|
|
|
2020-12-16 16:14:16 +01:00
|
|
|
== Configuration
|
|
|
|
|
|
|
|
The configuration directory is `${XDG_CONFIG_HOME}/download-yt-feeds` or, if
|
|
|
|
`${XDG_CONFIG_HOME}` is not set, `${HOME}/.config/download-yt-feeds`. You need 2
|
|
|
|
files in this directory, `config` and `feedlist`.
|
|
|
|
|
|
|
|
=== config
|
|
|
|
|
|
|
|
.Example configuration file
|
|
|
|
[source,shell]
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
# This file will be source-d.
|
|
|
|
download_dir="/home/user/Podcasts/youtube"
|
|
|
|
keep_for_days="14"
|
|
|
|
ytdl_format="bestvideo[height<=1080]+bestaudio/best[height<=1080]"
|
2020-12-16 18:55:12 +01:00
|
|
|
max_videos="10"
|
|
|
|
ytdl_extra_args="--quiet"
|
2020-12-16 16:14:16 +01:00
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|===============================================================================
|
2020-12-16 17:22:33 +01:00
|
|
|
| *download_dir* | The directory to which the videos will be downloaded.
|
|
|
|
| *keep_for_days* | Download only videos newer than this many days and delete older videos.
|
|
|
|
| *ytdl_format* | Same syntax as link:{url-ytdl-format}[youtube-dl --format]. Default is "best".
|
2020-12-16 18:55:12 +01:00
|
|
|
| *max_videos* | Maximum number of videos to consider. Default is to consider all.
|
2020-12-16 17:22:33 +01:00
|
|
|
| *ytdl_extra_args* | Extra arguments for `youtube-dl`. Optional.
|
2020-12-16 16:14:16 +01:00
|
|
|
|===============================================================================
|
|
|
|
|
|
|
|
|
|
|
|
=== feedlist
|
|
|
|
|
2020-12-16 16:29:29 +01:00
|
|
|
A "feed" in this context is a URL to a page that lists YouTube-videos, not an
|
|
|
|
RSS or Atom feed.
|
|
|
|
|
2020-12-16 16:14:16 +01:00
|
|
|
.Example feed list
|
|
|
|
[source,cfg]
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
# Everything that doesn't start with "http" will be skipped.
|
2020-12-16 16:29:29 +01:00
|
|
|
https://www.youtube.com/channel/UCyczvB_IvA7V1a5BXXu3CRg/videos # Karakaya Talks
|
|
|
|
https://www.youtube.com/user/lefticus1/videos # C++ Weekly
|
2020-12-16 16:14:16 +01:00
|
|
|
--------------------------------------------------------------------------------
|