pub / yt2rss

Transforms a youtube channel into a podcast RSS feed to insert into a podcatcher
git clone https://src.jayvii.de/pub/yt2rss.git
Home | Log | Files | Exports | Refs | Submodules | README | LICENSE | RSS

commit ce37f2d62ad70b1b89e938c13a8b580e5805fd97
parent c650dcd6e94c6c222f7c363b22302c06120a9ca2
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Sat, 27 Apr 2024 17:31:02 +0200

Update readme

Diffstat:
MREADME | 71+++++++++++++++++++++++++++++++++++++----------------------------------
1 file changed, 37 insertions(+), 34 deletions(-)

diff --git a/README b/README @@ -1,5 +1,5 @@ yt2rss ------ +====== Please send patches or remarks to <jayvii[AT]posteo[DOT]de> @@ -7,7 +7,7 @@ Transforms a youtube channel into a podcast RSS feed to insert into a podcatcher. Usage ------ +===== Currently, there are two endpoints for the yt2rss script/service: @@ -24,8 +24,8 @@ Individual video entries can be fetched via: https://yt2rss.example.com/?video=TV8tEq56vHI If the video has not been fetched before, this will take a few seconds, as the -server needs to download and convert the video to an `.opus` audio file before -it can serve it. +server needs to download and convert the video to an .opus audio file before it +can serve it. Videos within a feed can be included or excluded based on title-matches: @@ -37,8 +37,8 @@ Exclude all videos whose title contain "example": https://yt2rss.example.com/?channel=UCt_Y3j8CpXx366et1RaHACA&exclude=example -Additional configuration ------ +Advanced Usage +-------------- It is advised to only allow trusted parties to use your service. yt2rss uses a simple authentication key for this, which is included in the URL: @@ -46,45 +46,48 @@ simple authentication key for this, which is included in the URL: https://yt2rss.example.com/?auth=MY_KEY&channel=UCt_Y3j8CpXx366et1RaHACA https://yt2rss.example.com/?auth=MY_KEY&video=TV8tEq56vHI -You can set an auth-key in the `env.php` file. If the value is set to something -other than `null` (the default), authentication is enabled. - -Requirements ------ - -- https://github.com/JamesHeinrich/getID3 -- https://github.com/yt-dlp/yt-dlp -- PHP-7.2 or higher +You can set an auth-key in the "env.php" file. If the value is set to something +other than null (the default), authentication is enabled. Further notes ------ +============= Episode durations are not shown correctly on first load +------------------------------------------------------- Duration times of entries are unknown until they have been downloaded. The -podcast feed (`?channel=...`) will show episode durations as "00:00:00" unless -the according episode is already present in the webroot (has been accessed by -the podcatcher or any other client, like a webbrowser). +podcast feed (?channel=...) will show episode durations as "00:00:00" unless the +according episode is already present in the webroot (has been accessed by the +podcatcher or any other client, like a webbrowser). The webroot grows bigger / old episodes are never removed from the server +------------------------------------------------------------------------- The script will never "cleanup" audio files from the webdir root directory, after they have been downloaded by the client. Depending on your usecase scenario, it might be a good idea to setup a cronjob for that. The example -below will look every night at 00:00 for `.opus` files in the web-directory -(in this example `/var/www/yt2rss`, adjust accordingly) that have been created +below will look every night at 00:00 for .opus files in the web-directory (in +this example "/var/www/yt2rss", adjust accordingly) that have been created (downloaded) over 7 days ago. -# |----------- minutes -# | -# | |--------- hours -# | | -# | | |------- day of month -# | | | -# | | | |----- month -# | | | | -# | | | | |--- day of week -# | | | | | -# | | | | | |- command -# | | | | | | - 0 0 * * * find /var/www/yt2rss/ -type f -name "*.opus" ! -newermt $(date +%Y-%m-%d --date "-7 days") -exec rm {} \; +Crontab Entry: + # |----------- minutes + # | + # | |--------- hours + # | | + # | | |------- day of month + # | | | + # | | | |----- month + # | | | | + # | | | | |--- day of week + # | | | | | + # | | | | | |- command + # | | | | | | + 0 0 * * * find /var/www/yt2rss/ -type f -name "*.opus" ! -newermt $(date +%Y-%m-%d --date "-7 days") -exec rm {} \; + +Requirements +============ + +- https://github.com/JamesHeinrich/getID3 +- https://github.com/yt-dlp/yt-dlp +- PHP-7.2 or higher