ytdl2rss 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ytdl2rss-0.1.0/.ignore +120 -0
- ytdl2rss-0.1.0/.vulture/whitelists/ytdl2rss_whitelist.py +4 -0
- ytdl2rss-0.1.0/CONTRIBUTING.rst +56 -0
- ytdl2rss-0.1.0/LICENSE.txt +24 -0
- ytdl2rss-0.1.0/MANIFEST.in +24 -0
- ytdl2rss-0.1.0/PKG-INFO +222 -0
- ytdl2rss-0.1.0/README.rst +191 -0
- ytdl2rss-0.1.0/docs/api/modules.rst +7 -0
- ytdl2rss-0.1.0/docs/api/ytdl2rss.rst +10 -0
- ytdl2rss-0.1.0/docs/cli.rst +8 -0
- ytdl2rss-0.1.0/docs/conf.py +230 -0
- ytdl2rss-0.1.0/docs/contributing.rst +1 -0
- ytdl2rss-0.1.0/docs/index.rst +26 -0
- ytdl2rss-0.1.0/generate_golden.py +109 -0
- ytdl2rss-0.1.0/pyproject.toml +386 -0
- ytdl2rss-0.1.0/setup.cfg +4 -0
- ytdl2rss-0.1.0/src/ytdl2rss/__init__.py +962 -0
- ytdl2rss-0.1.0/src/ytdl2rss/__main__.py +8 -0
- ytdl2rss-0.1.0/src/ytdl2rss/py.typed +0 -0
- ytdl2rss-0.1.0/src/ytdl2rss.egg-info/PKG-INFO +222 -0
- ytdl2rss-0.1.0/src/ytdl2rss.egg-info/SOURCES.txt +31 -0
- ytdl2rss-0.1.0/src/ytdl2rss.egg-info/dependency_links.txt +1 -0
- ytdl2rss-0.1.0/src/ytdl2rss.egg-info/entry_points.txt +2 -0
- ytdl2rss-0.1.0/src/ytdl2rss.egg-info/requires.txt +3 -0
- ytdl2rss-0.1.0/src/ytdl2rss.egg-info/top_level.txt +1 -0
- ytdl2rss-0.1.0/src/ytdl2rss.egg-info/zip-safe +1 -0
- ytdl2rss-0.1.0/tests/__init__.py +1 -0
- ytdl2rss-0.1.0/tests/fixtures/README.rst +19 -0
- ytdl2rss-0.1.0/tests/test_argcomplete.py +133 -0
- ytdl2rss-0.1.0/tests/test_get_entry_media_type.py +130 -0
- ytdl2rss-0.1.0/tests/test_golden.py +76 -0
- ytdl2rss-0.1.0/tests/test_ymd_to_rfc2822.py +40 -0
- ytdl2rss-0.1.0/tox.ini +174 -0
ytdl2rss-0.1.0/.ignore
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# List of path globs for git to ignore. See gitignore(5).
|
|
2
|
+
# Based on https://github.com/github/gitignore/blob/866572d/Python.gitignore
|
|
3
|
+
|
|
4
|
+
# Byte-compiled / optimized / DLL files
|
|
5
|
+
__pycache__/
|
|
6
|
+
*.py[cod]
|
|
7
|
+
*$py.class
|
|
8
|
+
|
|
9
|
+
# C extensions
|
|
10
|
+
*.so
|
|
11
|
+
|
|
12
|
+
# Distribution / packaging
|
|
13
|
+
.Python
|
|
14
|
+
build/
|
|
15
|
+
develop-eggs/
|
|
16
|
+
dist/
|
|
17
|
+
downloads/
|
|
18
|
+
eggs/
|
|
19
|
+
.eggs/
|
|
20
|
+
lib/
|
|
21
|
+
lib64/
|
|
22
|
+
parts/
|
|
23
|
+
sdist/
|
|
24
|
+
var/
|
|
25
|
+
wheels/
|
|
26
|
+
pip-wheel-metadata/
|
|
27
|
+
share/python-wheels/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg
|
|
31
|
+
MANIFEST
|
|
32
|
+
|
|
33
|
+
# PyInstaller
|
|
34
|
+
# Usually these files are written by a python script from a template
|
|
35
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
36
|
+
*.manifest
|
|
37
|
+
*.spec
|
|
38
|
+
|
|
39
|
+
# Installer logs
|
|
40
|
+
pip-log.txt
|
|
41
|
+
pip-delete-this-directory.txt
|
|
42
|
+
|
|
43
|
+
# Unit test / coverage reports
|
|
44
|
+
htmlcov/
|
|
45
|
+
.tox/
|
|
46
|
+
.nox/
|
|
47
|
+
.coverage
|
|
48
|
+
.coverage.*
|
|
49
|
+
.cache
|
|
50
|
+
nosetests.xml
|
|
51
|
+
coverage.xml
|
|
52
|
+
*.cover
|
|
53
|
+
.hypothesis/
|
|
54
|
+
.pytest_cache/
|
|
55
|
+
|
|
56
|
+
# Translations
|
|
57
|
+
*.mo
|
|
58
|
+
*.pot
|
|
59
|
+
|
|
60
|
+
# Django stuff:
|
|
61
|
+
*.log
|
|
62
|
+
local_settings.py
|
|
63
|
+
db.sqlite3
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/api/
|
|
74
|
+
docs/_build/
|
|
75
|
+
|
|
76
|
+
# PyBuilder
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
.python-version
|
|
88
|
+
|
|
89
|
+
# celery beat schedule file
|
|
90
|
+
celerybeat-schedule
|
|
91
|
+
|
|
92
|
+
# SageMath parsed files
|
|
93
|
+
*.sage.py
|
|
94
|
+
|
|
95
|
+
# Environments
|
|
96
|
+
.env
|
|
97
|
+
.venv
|
|
98
|
+
env/
|
|
99
|
+
venv/
|
|
100
|
+
ENV/
|
|
101
|
+
env.bak/
|
|
102
|
+
venv.bak/
|
|
103
|
+
|
|
104
|
+
# Spyder project settings
|
|
105
|
+
.spyderproject
|
|
106
|
+
.spyproject
|
|
107
|
+
|
|
108
|
+
# Rope project settings
|
|
109
|
+
.ropeproject
|
|
110
|
+
|
|
111
|
+
# mkdocs documentation
|
|
112
|
+
/site
|
|
113
|
+
|
|
114
|
+
# mypy
|
|
115
|
+
.mypy_cache/
|
|
116
|
+
.dmypy.json
|
|
117
|
+
dmypy.json
|
|
118
|
+
|
|
119
|
+
# Pyre type checker
|
|
120
|
+
.pyre/
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
=======================
|
|
2
|
+
Contributing Guidelines
|
|
3
|
+
=======================
|
|
4
|
+
|
|
5
|
+
Thanks for your interest in contributing to this project! If this is your first
|
|
6
|
+
time contributing to a Free and Open Source Software project, consider reading
|
|
7
|
+
`How to Contribute to Open Source`_ in the Open Source Guides. Additionally, to
|
|
8
|
+
maximize the chance that your contribution will be accepted and minimize wasted
|
|
9
|
+
effort, consider the following guidelines:
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
Keep ytdl2rss Minimal
|
|
13
|
+
=====================
|
|
14
|
+
|
|
15
|
+
``ytdl2rss`` aims to be a simple tool for creating RSS from ``youtube-dl``
|
|
16
|
+
metadata. If a task can be easily accomplished by another tool, operating on
|
|
17
|
+
``ytdl2rss`` input or output, it is likely not a good candidate for inclusion.
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
Tests Must Pass
|
|
21
|
+
===============
|
|
22
|
+
|
|
23
|
+
In order for a pull request to be accepted, it must build and test successfully
|
|
24
|
+
on the continuous integration systems. GitHub displays a build status
|
|
25
|
+
indicator on the pull request. If the build is broken, please fix it (or add a
|
|
26
|
+
comment if you think the pull request is not the cause of the breakage).
|
|
27
|
+
|
|
28
|
+
The CI build runs several linters and tests. These can be run locally by
|
|
29
|
+
invoking ``tox``. Disabling linter rules using inline configuration is
|
|
30
|
+
acceptable, where justified. Disable specific rules where possible (i.e.
|
|
31
|
+
``# noqa: F401`` rather than just ``# noqa``).
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
Add Tests Where Reasonable
|
|
35
|
+
==========================
|
|
36
|
+
|
|
37
|
+
If the pull request fixes a bug or adds a feature, consider adding a test to
|
|
38
|
+
ensure the bug does not reoccur and the feature works as expected. If testing
|
|
39
|
+
is not straightforward, feel free to submit the pull request without tests.
|
|
40
|
+
How to test and whether testing is required can be discussed during the review
|
|
41
|
+
process.
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
Consider Discussing Big Changes First
|
|
45
|
+
=====================================
|
|
46
|
+
|
|
47
|
+
If the desired change is large, complex, backwards-incompatible, can have
|
|
48
|
+
significantly differing implementations, or may not be in scope for this
|
|
49
|
+
project, opening an issue to discuss the change before writing the code can
|
|
50
|
+
avoid frustration and save a lot of time and effort.
|
|
51
|
+
|
|
52
|
+
This is not a hard requirement. If you'd rather start discussing a big change
|
|
53
|
+
with a proposed implementation, feel free. Be aware that the code may be
|
|
54
|
+
rejected outright, or require many changes before it is acceptable.
|
|
55
|
+
|
|
56
|
+
.. _How to Contribute to Open Source: https://opensource.guide/how-to-contribute/
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
This is free and unencumbered software released into the public domain.
|
|
2
|
+
|
|
3
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
4
|
+
distribute this software, either in source code form or as a compiled
|
|
5
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
|
6
|
+
means.
|
|
7
|
+
|
|
8
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
|
9
|
+
of this software dedicate any and all copyright interest in the
|
|
10
|
+
software to the public domain. We make this dedication for the benefit
|
|
11
|
+
of the public at large and to the detriment of our heirs and
|
|
12
|
+
successors. We intend this dedication to be an overt act of
|
|
13
|
+
relinquishment in perpetuity of all present and future rights to this
|
|
14
|
+
software under copyright law.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
20
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
21
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
|
|
24
|
+
For more information, please refer to <https://unlicense.org/>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Additional files to include in package source distribution
|
|
2
|
+
# https://packaging.python.org/en/latest/guides/using-manifest-in/
|
|
3
|
+
|
|
4
|
+
include *.rst *.txt
|
|
5
|
+
|
|
6
|
+
# Include any PEP 0561 inline type information marker files
|
|
7
|
+
recursive-include src py.typed
|
|
8
|
+
|
|
9
|
+
# Include documentation, tests, and test configuration in source package
|
|
10
|
+
# See https://github.com/PyCQA/pydocstyle/pull/252#issuecomment-297987794
|
|
11
|
+
recursive-include .vulture *.py
|
|
12
|
+
recursive-include docs *.py *.rst
|
|
13
|
+
recursive-include tests *.py *.rst
|
|
14
|
+
include generate_golden.py
|
|
15
|
+
include tox.ini
|
|
16
|
+
|
|
17
|
+
# Include .gitignore as .ignore for ruff, since it will only use .gitignore if
|
|
18
|
+
# .git dir exists in the same or ancestor directory:
|
|
19
|
+
# https://github.com/astral-sh/ruff/issues/5930
|
|
20
|
+
# However, it treats .ignore file like .gitignore unconditionally:
|
|
21
|
+
# https://docs.rs/ignore/latest/ignore/struct.WalkBuilder.html#ignore-rules
|
|
22
|
+
# Note: .ignore is a symlink to .gitignore to avoid duplication.
|
|
23
|
+
# setuptools includes the content in the sdist tarball, not a link.
|
|
24
|
+
include .ignore
|
ytdl2rss-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ytdl2rss
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Create podcast RSS from youtube-dl info JSON.
|
|
5
|
+
Author-email: Kevin Locke <kevin@kevinlocke.name>
|
|
6
|
+
License-Expression: Unlicense
|
|
7
|
+
Project-URL: Homepage, https://github.com/kevinoid/ytdl2rss
|
|
8
|
+
Project-URL: Documentation, https://ytdl2rss.readthedocs.io/
|
|
9
|
+
Project-URL: GitHub, https://github.com/kevinoid/ytdl2rss
|
|
10
|
+
Project-URL: Tracker, https://github.com/kevinoid/ytdl2rss/issues
|
|
11
|
+
Keywords: podcast,rss,youtube,youtube-dl
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
22
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
23
|
+
Classifier: Topic :: Multimedia :: Sound/Audio
|
|
24
|
+
Classifier: Topic :: Multimedia :: Video
|
|
25
|
+
Requires-Python: >=3.11
|
|
26
|
+
Description-Content-Type: text/x-rst
|
|
27
|
+
License-File: LICENSE.txt
|
|
28
|
+
Provides-Extra: argcomplete
|
|
29
|
+
Requires-Dist: argcomplete; extra == "argcomplete"
|
|
30
|
+
Dynamic: license-file
|
|
31
|
+
|
|
32
|
+
========
|
|
33
|
+
ytdl2rss
|
|
34
|
+
========
|
|
35
|
+
|
|
36
|
+
.. image:: https://img.shields.io/github/actions/workflow/status/kevinoid/ytdl2rss/tox.yml.svg?branch=main&style=flat&label=build
|
|
37
|
+
:alt: Build Status
|
|
38
|
+
:target: https://github.com/kevinoid/ytdl2rss/actions/workflows/tox.yml?query=branch%3Amain
|
|
39
|
+
.. image:: https://img.shields.io/codecov/c/github/kevinoid/ytdl2rss.svg?style=flat
|
|
40
|
+
:alt: Coverage
|
|
41
|
+
:target: https://codecov.io/github/kevinoid/ytdl2rss?branch=main
|
|
42
|
+
.. image:: https://img.shields.io/librariesio/release/pypi/ytdl2rss.svg?style=flat
|
|
43
|
+
:alt: Dependency Status
|
|
44
|
+
:target: https://libraries.io/github/kevinoid/ytdl2rss
|
|
45
|
+
.. image:: https://readthedocs.org/projects/ytdl2rss/badge/?version=latest
|
|
46
|
+
:target: https://ytdl2rss.readthedocs.io/en/latest/
|
|
47
|
+
:alt: Documentation Status
|
|
48
|
+
.. image:: https://img.shields.io/pypi/pyversions/ytdl2rss.svg?style=flat
|
|
49
|
+
:alt: Python Versions
|
|
50
|
+
:target: https://pypi.org/project/ytdl2rss/
|
|
51
|
+
.. image:: https://img.shields.io/pypi/v/ytdl2rss.svg?style=flat
|
|
52
|
+
:alt: Version on PyPI
|
|
53
|
+
:target: https://pypi.org/project/ytdl2rss/
|
|
54
|
+
|
|
55
|
+
Create podcast_ RSS_ of media downloaded from YouTube_, Vimeo_, Twitch_ or
|
|
56
|
+
any other site supported by youtube-dl_ (or yt-dlc_, yt-dlp_, or other forks).
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
Introductory Example
|
|
60
|
+
====================
|
|
61
|
+
|
|
62
|
+
To create an audio podcast from videos in GoogleTechTalks_ `Make the Web
|
|
63
|
+
Faster`_ playlist:
|
|
64
|
+
|
|
65
|
+
.. code:: sh
|
|
66
|
+
|
|
67
|
+
youtube-dl --write-info-json --no-clean-info-json -f bestaudio https://www.youtube.com/playlist?list=PLE0E03DF19D90B5F4
|
|
68
|
+
ytdl2rss *.info.json >podcast.rss
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
Features
|
|
72
|
+
========
|
|
73
|
+
|
|
74
|
+
* Attempts to produce RSS which complies with guidelines from:
|
|
75
|
+
|
|
76
|
+
* `Apple <https://help.apple.com/itc/podcasts_connect/#/itcb54353390>`_
|
|
77
|
+
* `Spotify <https://providersupport.spotify.com/article/podcast-delivery-specification-1-9>`_
|
|
78
|
+
* `W3C <https://validator.w3.org/feed/>`_
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
Installation
|
|
82
|
+
============
|
|
83
|
+
|
|
84
|
+
`This package`_ can be installed using Python package managers (pip_, pipx_,
|
|
85
|
+
uv_, conda_, pixi_, etc.), in the usual ways. For example, by running:
|
|
86
|
+
|
|
87
|
+
.. code:: sh
|
|
88
|
+
|
|
89
|
+
pip install ytdl2rss
|
|
90
|
+
|
|
91
|
+
Or by saving `<src/ytdl2rss/__init__.py>`_ as ``ytdl2rss.py`` in ``$PATH`` and,
|
|
92
|
+
on Unix-like platforms, making it executable (``chmod +x ytdl2rss.py``).
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
Recipes
|
|
96
|
+
=======
|
|
97
|
+
|
|
98
|
+
Periodic Updates
|
|
99
|
+
----------------
|
|
100
|
+
|
|
101
|
+
A podcast can be periodically updated by running ``youtube-dl`` and ``ytdl2rss``
|
|
102
|
+
from cron_. Using ``--download-archive`` is recommended. For example, to
|
|
103
|
+
update the introductory example daily at 5 a.m., the following can be added to
|
|
104
|
+
``crontab``:
|
|
105
|
+
|
|
106
|
+
.. code::
|
|
107
|
+
|
|
108
|
+
0 5 * * * cd path/to/podcast && youtube-dl --download-archive ytdl-archive.txt --write-info-json --no-clean-info-json -f bestaudio https://www.youtube.com/playlist?list=PLE0E03DF19D90B5F4 && ytdl2rss *.info.json >|podcast.rss
|
|
109
|
+
|
|
110
|
+
Hosted Thumbnails
|
|
111
|
+
-----------------
|
|
112
|
+
|
|
113
|
+
Episode thumbnail images can be hosted alongside downloaded media, so
|
|
114
|
+
podcatchers will not download them from the original host, by using
|
|
115
|
+
``--write-thumbnail`` and modifying the ``.info.json`` files to use the
|
|
116
|
+
downloaded thumbnails:
|
|
117
|
+
|
|
118
|
+
.. code:: sh
|
|
119
|
+
|
|
120
|
+
youtube-dl --write-info-json --no-clean-info-json --write-thumbnail -f bestaudio https://www.youtube.com/playlist?list=PLE0E03DF19D90B5F4
|
|
121
|
+
for info in *.info.json; do
|
|
122
|
+
jq --arg t "${info%.info.json}.webp" '.thumbnail = $t' "$info" >"$info.new"
|
|
123
|
+
mv -f "$info.new" "$info"
|
|
124
|
+
done
|
|
125
|
+
ytdl2rss *.info.json >podcast.rss
|
|
126
|
+
|
|
127
|
+
See `<contrib/ytdl-thumbnails.sh>`_ for an example that includes conversion from
|
|
128
|
+
WebP to JPEG.
|
|
129
|
+
|
|
130
|
+
Podcast Metadata
|
|
131
|
+
----------------
|
|
132
|
+
|
|
133
|
+
In addition to JSON for individual videos, ``ytdl2rss`` accepts JSON for
|
|
134
|
+
playlists (produced by ``youtube-dl --print-json`` for channel/playlist/user
|
|
135
|
+
URLs). This can be used to define a podcast metadata not currently saved by ``youtube-dl``, such as a description, thumbnail, and webpage URL. To
|
|
136
|
+
combine info JSON into a playlist with custom metadata:
|
|
137
|
+
|
|
138
|
+
.. code:: sh
|
|
139
|
+
|
|
140
|
+
jq -s \
|
|
141
|
+
--arg desc "My awesome podcast." \
|
|
142
|
+
--arg thumb "channel_thumbnail.jpg" \
|
|
143
|
+
--arg url "http://example.com/podcast-home.html" \
|
|
144
|
+
'{
|
|
145
|
+
_type: "playlist",
|
|
146
|
+
entries: .,
|
|
147
|
+
# Copy playlist metadata from info for first video
|
|
148
|
+
id: .[0].playlist_id,
|
|
149
|
+
title: .[0].playlist_title,
|
|
150
|
+
uploader: .[0].playlist_uploader,
|
|
151
|
+
uploader_id: .[0].playlist_uploader_id,
|
|
152
|
+
# Add custom playlist metadata
|
|
153
|
+
webpage_url: $url,
|
|
154
|
+
description: $desc,
|
|
155
|
+
thumbnail: $thumb
|
|
156
|
+
}' ./*.info.json | ytdl2rss - >|podcast.rss
|
|
157
|
+
|
|
158
|
+
See `<contrib/ytdl-playlist-meta.sh>`_ for an example which gets playlist
|
|
159
|
+
metadata from `Open Graph Metadata`_ in the playlist HTML.
|
|
160
|
+
|
|
161
|
+
.. === End of Sphinx index content ===
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
Documentation
|
|
165
|
+
=============
|
|
166
|
+
|
|
167
|
+
The `project documentation`_ is hosted on `Read the Docs`_. See the `CLI
|
|
168
|
+
documentation`_ for command-line options and usage, and the `API documentation`_
|
|
169
|
+
for the Python API.
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
Contributing
|
|
173
|
+
============
|
|
174
|
+
|
|
175
|
+
Contributions are welcome and appreciated! See the `contributing
|
|
176
|
+
guidelines`_ for recommendations.
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
Alternatives
|
|
180
|
+
============
|
|
181
|
+
|
|
182
|
+
If you are looking for an all-in-one podcast media download, conversion, and hosting tool, you may be interested in:
|
|
183
|
+
|
|
184
|
+
- Podsync_
|
|
185
|
+
- YouCast_
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
License
|
|
189
|
+
=======
|
|
190
|
+
|
|
191
|
+
This project is available under the terms of the `Unlicense`_, like youtube-dl_,
|
|
192
|
+
yt-dlc_, yt-dlp_, or other forks. See the `summary at TLDRLegal`_.
|
|
193
|
+
|
|
194
|
+
.. === Begin reference names ===
|
|
195
|
+
|
|
196
|
+
.. _API documentation: https://ytdl2rss.readthedocs.io/en/latest/api/ytdl2rss.html
|
|
197
|
+
.. _CLI documentation: https://ytdl2rss.readthedocs.io/en/latest/cli.html
|
|
198
|
+
.. _Open Graph Metadata: https://ogp.me/
|
|
199
|
+
.. _Podsync: https://github.com/mxpv/podsync
|
|
200
|
+
.. _Read the Docs: https://readthedocs.org/
|
|
201
|
+
.. _RSS: https://en.wikipedia.org/wiki/RSS
|
|
202
|
+
.. _Twitch: https://www.twitch.tv/
|
|
203
|
+
.. _Unlicense: https://unlicense.org/
|
|
204
|
+
.. _Vimeo: https://vimeo.com/
|
|
205
|
+
.. _YouCast: https://github.com/i3arnon/YouCast
|
|
206
|
+
.. _YouTube: https://www.youtube.com/
|
|
207
|
+
.. _conda: https://docs.conda.io/
|
|
208
|
+
.. _contributing guidelines: https://github.com/kevinoid/ytdl2rss/blob/main/CONTRIBUTING.rst
|
|
209
|
+
.. _cron: https://help.ubuntu.com/community/CronHowto
|
|
210
|
+
.. _pip: https://pip.pypa.io/
|
|
211
|
+
.. _pipx: https://pipx.pypa.io/
|
|
212
|
+
.. _pixi: https://pixi.prefix.dev/
|
|
213
|
+
.. _project documentation: https://ytdl2rss.readthedocs.io/
|
|
214
|
+
.. _podcast: https://en.wikipedia.org/wiki/Podcast
|
|
215
|
+
.. _summary at TLDRLegal: https://www.tldrlegal.com/license/unlicense
|
|
216
|
+
.. _this package: https://pypi.org/project/ytdl2rss/
|
|
217
|
+
.. _GoogleTechTalks: https://www.youtube.com/c/googletechtalks
|
|
218
|
+
.. _Make the Web Faster: https://www.youtube.com/playlist?list=PLE0E03DF19D90B5F4
|
|
219
|
+
.. _youtube-dl: https://ytdl-org.github.io/youtube-dl/
|
|
220
|
+
.. _yt-dlc: https://github.com/blackjack4494/yt-dlc
|
|
221
|
+
.. _yt-dlp: https://github.com/yt-dlp/yt-dlp
|
|
222
|
+
.. _uv: https://docs.astral.sh/uv/
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
========
|
|
2
|
+
ytdl2rss
|
|
3
|
+
========
|
|
4
|
+
|
|
5
|
+
.. image:: https://img.shields.io/github/actions/workflow/status/kevinoid/ytdl2rss/tox.yml.svg?branch=main&style=flat&label=build
|
|
6
|
+
:alt: Build Status
|
|
7
|
+
:target: https://github.com/kevinoid/ytdl2rss/actions/workflows/tox.yml?query=branch%3Amain
|
|
8
|
+
.. image:: https://img.shields.io/codecov/c/github/kevinoid/ytdl2rss.svg?style=flat
|
|
9
|
+
:alt: Coverage
|
|
10
|
+
:target: https://codecov.io/github/kevinoid/ytdl2rss?branch=main
|
|
11
|
+
.. image:: https://img.shields.io/librariesio/release/pypi/ytdl2rss.svg?style=flat
|
|
12
|
+
:alt: Dependency Status
|
|
13
|
+
:target: https://libraries.io/github/kevinoid/ytdl2rss
|
|
14
|
+
.. image:: https://readthedocs.org/projects/ytdl2rss/badge/?version=latest
|
|
15
|
+
:target: https://ytdl2rss.readthedocs.io/en/latest/
|
|
16
|
+
:alt: Documentation Status
|
|
17
|
+
.. image:: https://img.shields.io/pypi/pyversions/ytdl2rss.svg?style=flat
|
|
18
|
+
:alt: Python Versions
|
|
19
|
+
:target: https://pypi.org/project/ytdl2rss/
|
|
20
|
+
.. image:: https://img.shields.io/pypi/v/ytdl2rss.svg?style=flat
|
|
21
|
+
:alt: Version on PyPI
|
|
22
|
+
:target: https://pypi.org/project/ytdl2rss/
|
|
23
|
+
|
|
24
|
+
Create podcast_ RSS_ of media downloaded from YouTube_, Vimeo_, Twitch_ or
|
|
25
|
+
any other site supported by youtube-dl_ (or yt-dlc_, yt-dlp_, or other forks).
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
Introductory Example
|
|
29
|
+
====================
|
|
30
|
+
|
|
31
|
+
To create an audio podcast from videos in GoogleTechTalks_ `Make the Web
|
|
32
|
+
Faster`_ playlist:
|
|
33
|
+
|
|
34
|
+
.. code:: sh
|
|
35
|
+
|
|
36
|
+
youtube-dl --write-info-json --no-clean-info-json -f bestaudio https://www.youtube.com/playlist?list=PLE0E03DF19D90B5F4
|
|
37
|
+
ytdl2rss *.info.json >podcast.rss
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
Features
|
|
41
|
+
========
|
|
42
|
+
|
|
43
|
+
* Attempts to produce RSS which complies with guidelines from:
|
|
44
|
+
|
|
45
|
+
* `Apple <https://help.apple.com/itc/podcasts_connect/#/itcb54353390>`_
|
|
46
|
+
* `Spotify <https://providersupport.spotify.com/article/podcast-delivery-specification-1-9>`_
|
|
47
|
+
* `W3C <https://validator.w3.org/feed/>`_
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
Installation
|
|
51
|
+
============
|
|
52
|
+
|
|
53
|
+
`This package`_ can be installed using Python package managers (pip_, pipx_,
|
|
54
|
+
uv_, conda_, pixi_, etc.), in the usual ways. For example, by running:
|
|
55
|
+
|
|
56
|
+
.. code:: sh
|
|
57
|
+
|
|
58
|
+
pip install ytdl2rss
|
|
59
|
+
|
|
60
|
+
Or by saving `<src/ytdl2rss/__init__.py>`_ as ``ytdl2rss.py`` in ``$PATH`` and,
|
|
61
|
+
on Unix-like platforms, making it executable (``chmod +x ytdl2rss.py``).
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
Recipes
|
|
65
|
+
=======
|
|
66
|
+
|
|
67
|
+
Periodic Updates
|
|
68
|
+
----------------
|
|
69
|
+
|
|
70
|
+
A podcast can be periodically updated by running ``youtube-dl`` and ``ytdl2rss``
|
|
71
|
+
from cron_. Using ``--download-archive`` is recommended. For example, to
|
|
72
|
+
update the introductory example daily at 5 a.m., the following can be added to
|
|
73
|
+
``crontab``:
|
|
74
|
+
|
|
75
|
+
.. code::
|
|
76
|
+
|
|
77
|
+
0 5 * * * cd path/to/podcast && youtube-dl --download-archive ytdl-archive.txt --write-info-json --no-clean-info-json -f bestaudio https://www.youtube.com/playlist?list=PLE0E03DF19D90B5F4 && ytdl2rss *.info.json >|podcast.rss
|
|
78
|
+
|
|
79
|
+
Hosted Thumbnails
|
|
80
|
+
-----------------
|
|
81
|
+
|
|
82
|
+
Episode thumbnail images can be hosted alongside downloaded media, so
|
|
83
|
+
podcatchers will not download them from the original host, by using
|
|
84
|
+
``--write-thumbnail`` and modifying the ``.info.json`` files to use the
|
|
85
|
+
downloaded thumbnails:
|
|
86
|
+
|
|
87
|
+
.. code:: sh
|
|
88
|
+
|
|
89
|
+
youtube-dl --write-info-json --no-clean-info-json --write-thumbnail -f bestaudio https://www.youtube.com/playlist?list=PLE0E03DF19D90B5F4
|
|
90
|
+
for info in *.info.json; do
|
|
91
|
+
jq --arg t "${info%.info.json}.webp" '.thumbnail = $t' "$info" >"$info.new"
|
|
92
|
+
mv -f "$info.new" "$info"
|
|
93
|
+
done
|
|
94
|
+
ytdl2rss *.info.json >podcast.rss
|
|
95
|
+
|
|
96
|
+
See `<contrib/ytdl-thumbnails.sh>`_ for an example that includes conversion from
|
|
97
|
+
WebP to JPEG.
|
|
98
|
+
|
|
99
|
+
Podcast Metadata
|
|
100
|
+
----------------
|
|
101
|
+
|
|
102
|
+
In addition to JSON for individual videos, ``ytdl2rss`` accepts JSON for
|
|
103
|
+
playlists (produced by ``youtube-dl --print-json`` for channel/playlist/user
|
|
104
|
+
URLs). This can be used to define a podcast metadata not currently saved by ``youtube-dl``, such as a description, thumbnail, and webpage URL. To
|
|
105
|
+
combine info JSON into a playlist with custom metadata:
|
|
106
|
+
|
|
107
|
+
.. code:: sh
|
|
108
|
+
|
|
109
|
+
jq -s \
|
|
110
|
+
--arg desc "My awesome podcast." \
|
|
111
|
+
--arg thumb "channel_thumbnail.jpg" \
|
|
112
|
+
--arg url "http://example.com/podcast-home.html" \
|
|
113
|
+
'{
|
|
114
|
+
_type: "playlist",
|
|
115
|
+
entries: .,
|
|
116
|
+
# Copy playlist metadata from info for first video
|
|
117
|
+
id: .[0].playlist_id,
|
|
118
|
+
title: .[0].playlist_title,
|
|
119
|
+
uploader: .[0].playlist_uploader,
|
|
120
|
+
uploader_id: .[0].playlist_uploader_id,
|
|
121
|
+
# Add custom playlist metadata
|
|
122
|
+
webpage_url: $url,
|
|
123
|
+
description: $desc,
|
|
124
|
+
thumbnail: $thumb
|
|
125
|
+
}' ./*.info.json | ytdl2rss - >|podcast.rss
|
|
126
|
+
|
|
127
|
+
See `<contrib/ytdl-playlist-meta.sh>`_ for an example which gets playlist
|
|
128
|
+
metadata from `Open Graph Metadata`_ in the playlist HTML.
|
|
129
|
+
|
|
130
|
+
.. === End of Sphinx index content ===
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
Documentation
|
|
134
|
+
=============
|
|
135
|
+
|
|
136
|
+
The `project documentation`_ is hosted on `Read the Docs`_. See the `CLI
|
|
137
|
+
documentation`_ for command-line options and usage, and the `API documentation`_
|
|
138
|
+
for the Python API.
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
Contributing
|
|
142
|
+
============
|
|
143
|
+
|
|
144
|
+
Contributions are welcome and appreciated! See the `contributing
|
|
145
|
+
guidelines`_ for recommendations.
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
Alternatives
|
|
149
|
+
============
|
|
150
|
+
|
|
151
|
+
If you are looking for an all-in-one podcast media download, conversion, and hosting tool, you may be interested in:
|
|
152
|
+
|
|
153
|
+
- Podsync_
|
|
154
|
+
- YouCast_
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
License
|
|
158
|
+
=======
|
|
159
|
+
|
|
160
|
+
This project is available under the terms of the `Unlicense`_, like youtube-dl_,
|
|
161
|
+
yt-dlc_, yt-dlp_, or other forks. See the `summary at TLDRLegal`_.
|
|
162
|
+
|
|
163
|
+
.. === Begin reference names ===
|
|
164
|
+
|
|
165
|
+
.. _API documentation: https://ytdl2rss.readthedocs.io/en/latest/api/ytdl2rss.html
|
|
166
|
+
.. _CLI documentation: https://ytdl2rss.readthedocs.io/en/latest/cli.html
|
|
167
|
+
.. _Open Graph Metadata: https://ogp.me/
|
|
168
|
+
.. _Podsync: https://github.com/mxpv/podsync
|
|
169
|
+
.. _Read the Docs: https://readthedocs.org/
|
|
170
|
+
.. _RSS: https://en.wikipedia.org/wiki/RSS
|
|
171
|
+
.. _Twitch: https://www.twitch.tv/
|
|
172
|
+
.. _Unlicense: https://unlicense.org/
|
|
173
|
+
.. _Vimeo: https://vimeo.com/
|
|
174
|
+
.. _YouCast: https://github.com/i3arnon/YouCast
|
|
175
|
+
.. _YouTube: https://www.youtube.com/
|
|
176
|
+
.. _conda: https://docs.conda.io/
|
|
177
|
+
.. _contributing guidelines: https://github.com/kevinoid/ytdl2rss/blob/main/CONTRIBUTING.rst
|
|
178
|
+
.. _cron: https://help.ubuntu.com/community/CronHowto
|
|
179
|
+
.. _pip: https://pip.pypa.io/
|
|
180
|
+
.. _pipx: https://pipx.pypa.io/
|
|
181
|
+
.. _pixi: https://pixi.prefix.dev/
|
|
182
|
+
.. _project documentation: https://ytdl2rss.readthedocs.io/
|
|
183
|
+
.. _podcast: https://en.wikipedia.org/wiki/Podcast
|
|
184
|
+
.. _summary at TLDRLegal: https://www.tldrlegal.com/license/unlicense
|
|
185
|
+
.. _this package: https://pypi.org/project/ytdl2rss/
|
|
186
|
+
.. _GoogleTechTalks: https://www.youtube.com/c/googletechtalks
|
|
187
|
+
.. _Make the Web Faster: https://www.youtube.com/playlist?list=PLE0E03DF19D90B5F4
|
|
188
|
+
.. _youtube-dl: https://ytdl-org.github.io/youtube-dl/
|
|
189
|
+
.. _yt-dlc: https://github.com/blackjack4494/yt-dlc
|
|
190
|
+
.. _yt-dlp: https://github.com/yt-dlp/yt-dlp
|
|
191
|
+
.. _uv: https://docs.astral.sh/uv/
|