commit 73b4b15cd6661bcdbb3c6de9b2b81dd5a532a269
parent d13934cc964390c68284c7aaba1bc57a3a705fee
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date: Sat, 29 Jun 2024 21:20:24 +0200
feat: transform readme to markdown
Diffstat:
D | README | | | 93 | ------------------------------------------------------------------------------- |
A | README.md | | | 89 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
2 files changed, 89 insertions(+), 93 deletions(-)
diff --git a/README b/README
@@ -1,93 +0,0 @@
-yt2rss
-======
-
-Please send patches or remarks to <jayvii[AT]posteo[DOT]de>
-
-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:
-
-* index.php?channel=UCt_Y3j8CpXx366et1RaHACA
-* index.php?video=TV8tEq56vHI
-
-Assuming you host this service under the URL "https://yt2rss.example.com",
-insert following RSS link into your podcatcher:
-
-https://yt2rss.example.com/?channel=UCt_Y3j8CpXx366et1RaHACA
-
-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.
-
-Videos within a feed can be included or excluded based on title-matches:
-
-Include only videos whose title contain "example":
-
-https://yt2rss.example.com/?channel=UCt_Y3j8CpXx366et1RaHACA&include=example
-
-Exclude all videos whose title contain "example":
-
-https://yt2rss.example.com/?channel=UCt_Y3j8CpXx366et1RaHACA&exclude=example
-
-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:
-
-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.
-
-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).
-
-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
-(downloaded) over 7 days ago.
-
-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
diff --git a/README.md b/README.md
@@ -0,0 +1,89 @@
+# yt2rss
+
+Please send patches or remarks to
+[jayvii[AT]posteo[DOT]de](mailto:jayvii[AT]posteo[DOT]de)
+
+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:
+
+* index.php?channel=UCt_Y3j8CpXx366et1RaHACA
+* index.php?video=TV8tEq56vHI
+
+Assuming you host this service under the URL "https://yt2rss.example.com",
+insert following RSS link into your podcatcher:
+
+https://yt2rss.example.com/?channel=UCt_Y3j8CpXx366et1RaHACA
+
+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.
+
+Videos within a feed can be included or excluded based on title-matches:
+
+Include only videos whose title contain "example":
+
+https://yt2rss.example.com/?channel=UCt_Y3j8CpXx366et1RaHACA&include=example
+
+Exclude all videos whose title contain "example":
+
+https://yt2rss.example.com/?channel=UCt_Y3j8CpXx366et1RaHACA&exclude=example
+
+## 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:
+
+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.
+
+## 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).
+
+### 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
+(downloaded) over 7 days ago.
+
+Crontab Entry:
+```cron
+# |----------- 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
+
+- [getID3](https://github.com/JamesHeinrich/getID3)
+- [yt-dlp](https://github.com/yt-dlp/yt-dlp)
+- PHP-7.2 or higher