mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-11-13 13:05:13 +00:00
[cleanup] Misc (#14767)
Authored by: bashonly, sepro, matyb08 Co-authored-by: sepro <sepro@sepr0.com> Co-authored-by: matyb08 <suricate66@protonmail.com>
This commit is contained in:
@@ -10,6 +10,8 @@ Core Maintainers are responsible for reviewing and merging contributions, publis
|
|||||||
|
|
||||||
**You can contact the core maintainers via `maintainers@yt-dlp.org`.**
|
**You can contact the core maintainers via `maintainers@yt-dlp.org`.**
|
||||||
|
|
||||||
|
This is **NOT** a support channel. [Open an issue](https://github.com/yt-dlp/yt-dlp/issues/new/choose) if you need help or want to report a bug.
|
||||||
|
|
||||||
### [coletdjnz](https://github.com/coletdjnz)
|
### [coletdjnz](https://github.com/coletdjnz)
|
||||||
|
|
||||||
[](https://github.com/sponsors/coletdjnz)
|
[](https://github.com/sponsors/coletdjnz)
|
||||||
|
|||||||
44
README.md
44
README.md
@@ -360,7 +360,7 @@ Tip: Use `CTRL`+`F` (or `Command`+`F`) to search by keywords
|
|||||||
containing directory ("-" for stdin). Can be
|
containing directory ("-" for stdin). Can be
|
||||||
used multiple times and inside other
|
used multiple times and inside other
|
||||||
configuration files
|
configuration files
|
||||||
--plugin-dirs PATH Path to an additional directory to search
|
--plugin-dirs DIR Path to an additional directory to search
|
||||||
for plugins. This option can be used
|
for plugins. This option can be used
|
||||||
multiple times to add multiple directories.
|
multiple times to add multiple directories.
|
||||||
Use "default" to search the default plugin
|
Use "default" to search the default plugin
|
||||||
@@ -372,19 +372,28 @@ Tip: Use `CTRL`+`F` (or `Command`+`F`) to search by keywords
|
|||||||
with an optional path to the runtime
|
with an optional path to the runtime
|
||||||
location. This option can be used multiple
|
location. This option can be used multiple
|
||||||
times to enable multiple runtimes. Supported
|
times to enable multiple runtimes. Supported
|
||||||
runtimes: deno, node, bun, quickjs. By
|
runtimes are (in order of priority, from
|
||||||
default, only "deno" runtime is enabled.
|
highest to lowest): deno, node, quickjs,
|
||||||
|
bun. Only "deno" is enabled by default. The
|
||||||
|
highest priority runtime that is both
|
||||||
|
enabled and available will be used. In order
|
||||||
|
to use a lower priority runtime when "deno"
|
||||||
|
is available, --no-js-runtimes needs to be
|
||||||
|
passed before enabling other runtimes
|
||||||
--no-js-runtimes Clear JavaScript runtimes to enable,
|
--no-js-runtimes Clear JavaScript runtimes to enable,
|
||||||
including defaults and those provided by
|
including defaults and those provided by
|
||||||
previous --js-runtimes
|
previous --js-runtimes
|
||||||
--remote-components COMPONENT Remote components to allow yt-dlp to fetch
|
--remote-components COMPONENT Remote components to allow yt-dlp to fetch
|
||||||
when required. You can use this option
|
when required. This option is currently not
|
||||||
multiple times to allow multiple components.
|
needed if you are using an official
|
||||||
Supported values: ejs:npm (external
|
executable or have the requisite version of
|
||||||
JavaScript components from npm), ejs:github
|
the yt-dlp-ejs package installed. You can
|
||||||
(external JavaScript components from yt-dlp-
|
use this option multiple times to allow
|
||||||
ejs GitHub). By default, no remote
|
multiple components. Supported values:
|
||||||
components are allowed.
|
ejs:npm (external JavaScript components from
|
||||||
|
npm), ejs:github (external JavaScript
|
||||||
|
components from yt-dlp-ejs GitHub). By
|
||||||
|
default, no remote components are allowed
|
||||||
--no-remote-components Disallow fetching of all remote components,
|
--no-remote-components Disallow fetching of all remote components,
|
||||||
including any previously allowed by
|
including any previously allowed by
|
||||||
--remote-components or defaults.
|
--remote-components or defaults.
|
||||||
@@ -1105,11 +1114,12 @@ Make chapter entries for, or remove various segments (sponsor,
|
|||||||
for, separated by commas. Available
|
for, separated by commas. Available
|
||||||
categories are sponsor, intro, outro,
|
categories are sponsor, intro, outro,
|
||||||
selfpromo, preview, filler, interaction,
|
selfpromo, preview, filler, interaction,
|
||||||
music_offtopic, poi_highlight, chapter, all
|
music_offtopic, hook, poi_highlight,
|
||||||
and default (=all). You can prefix the
|
chapter, all and default (=all). You can
|
||||||
category with a "-" to exclude it. See [1]
|
prefix the category with a "-" to exclude
|
||||||
for descriptions of the categories. E.g.
|
it. See [1] for descriptions of the
|
||||||
--sponsorblock-mark all,-preview
|
categories. E.g. --sponsorblock-mark
|
||||||
|
all,-preview
|
||||||
[1] https://wiki.sponsor.ajay.app/w/Segment_Categories
|
[1] https://wiki.sponsor.ajay.app/w/Segment_Categories
|
||||||
--sponsorblock-remove CATS SponsorBlock categories to be removed from
|
--sponsorblock-remove CATS SponsorBlock categories to be removed from
|
||||||
the video file, separated by commas. If a
|
the video file, separated by commas. If a
|
||||||
@@ -1174,7 +1184,7 @@ Predefined aliases for convenience and ease of use. Note that future
|
|||||||
You can configure yt-dlp by placing any supported command line option in a configuration file. The configuration is loaded from the following locations:
|
You can configure yt-dlp by placing any supported command line option in a configuration file. The configuration is loaded from the following locations:
|
||||||
|
|
||||||
1. **Main Configuration**:
|
1. **Main Configuration**:
|
||||||
* The file given to `--config-location`
|
* The file given to `--config-locations`
|
||||||
1. **Portable Configuration**: (Recommended for portable installations)
|
1. **Portable Configuration**: (Recommended for portable installations)
|
||||||
* If using a binary, `yt-dlp.conf` in the same directory as the binary
|
* If using a binary, `yt-dlp.conf` in the same directory as the binary
|
||||||
* If running from source-code, `yt-dlp.conf` in the parent directory of `yt_dlp`
|
* If running from source-code, `yt-dlp.conf` in the parent directory of `yt_dlp`
|
||||||
@@ -1256,7 +1266,7 @@ yt-dlp --netrc-cmd 'gpg --decrypt ~/.authinfo.gpg' 'https://www.youtube.com/watc
|
|||||||
|
|
||||||
### Notes about environment variables
|
### Notes about environment variables
|
||||||
* Environment variables are normally specified as `${VARIABLE}`/`$VARIABLE` on UNIX and `%VARIABLE%` on Windows; but is always shown as `${VARIABLE}` in this documentation
|
* Environment variables are normally specified as `${VARIABLE}`/`$VARIABLE` on UNIX and `%VARIABLE%` on Windows; but is always shown as `${VARIABLE}` in this documentation
|
||||||
* yt-dlp also allows using UNIX-style variables on Windows for path-like options; e.g. `--output`, `--config-location`
|
* yt-dlp also allows using UNIX-style variables on Windows for path-like options; e.g. `--output`, `--config-locations`
|
||||||
* If unset, `${XDG_CONFIG_HOME}` defaults to `~/.config` and `${XDG_CACHE_HOME}` to `~/.cache`
|
* If unset, `${XDG_CONFIG_HOME}` defaults to `~/.config` and `${XDG_CACHE_HOME}` to `~/.cache`
|
||||||
* On Windows, `~` points to `${HOME}` if present; or, `${USERPROFILE}` or `${HOMEDRIVE}${HOMEPATH}` otherwise
|
* On Windows, `~` points to `${HOME}` if present; or, `${USERPROFILE}` or `${HOMEDRIVE}${HOMEPATH}` otherwise
|
||||||
* On Windows, `${USERPROFILE}` generally points to `C:\Users\<user name>` and `${APPDATA}` to `${USERPROFILE}\AppData\Roaming`
|
* On Windows, `${USERPROFILE}` generally points to `C:\Users\<user name>` and `${APPDATA}` to `${USERPROFILE}\AppData\Roaming`
|
||||||
|
|||||||
4
devscripts/update_ejs.py
Normal file → Executable file
4
devscripts/update_ejs.py
Normal file → Executable file
@@ -66,7 +66,9 @@ def list_wheel_contents(
|
|||||||
) -> str:
|
) -> str:
|
||||||
assert folders or files, 'at least one of "folders" or "files" must be True'
|
assert folders or files, 'at least one of "folders" or "files" must be True'
|
||||||
|
|
||||||
path_gen = (zinfo.filename for zinfo in zipfile.ZipFile(io.BytesIO(wheel_data)).infolist())
|
with zipfile.ZipFile(io.BytesIO(wheel_data)) as zipf:
|
||||||
|
path_gen = (zinfo.filename for zinfo in zipf.infolist())
|
||||||
|
|
||||||
filtered = filter(lambda path: path.startswith('yt_dlp_ejs/'), path_gen)
|
filtered = filter(lambda path: path.startswith('yt_dlp_ejs/'), path_gen)
|
||||||
if suffix:
|
if suffix:
|
||||||
filtered = filter(lambda path: path.endswith(f'.{suffix}'), filtered)
|
filtered = filter(lambda path: path.endswith(f'.{suffix}'), filtered)
|
||||||
|
|||||||
@@ -441,7 +441,7 @@ def create_parser():
|
|||||||
'("-" for stdin). Can be used multiple times and inside other configuration files'))
|
'("-" for stdin). Can be used multiple times and inside other configuration files'))
|
||||||
general.add_option(
|
general.add_option(
|
||||||
'--plugin-dirs',
|
'--plugin-dirs',
|
||||||
metavar='PATH',
|
metavar='DIR',
|
||||||
dest='plugin_dirs',
|
dest='plugin_dirs',
|
||||||
action='callback',
|
action='callback',
|
||||||
callback=_list_from_options_callback,
|
callback=_list_from_options_callback,
|
||||||
@@ -468,7 +468,10 @@ def create_parser():
|
|||||||
help=(
|
help=(
|
||||||
'Additional JavaScript runtime to enable, with an optional path to the runtime location. '
|
'Additional JavaScript runtime to enable, with an optional path to the runtime location. '
|
||||||
'This option can be used multiple times to enable multiple runtimes. '
|
'This option can be used multiple times to enable multiple runtimes. '
|
||||||
'Supported runtimes: deno, node, bun, quickjs. By default, only "deno" runtime is enabled.'))
|
'Supported runtimes are (in order of priority, from highest to lowest): deno, node, quickjs, bun. '
|
||||||
|
'Only "deno" is enabled by default. The highest priority runtime that is both enabled and '
|
||||||
|
'available will be used. In order to use a lower priority runtime when "deno" is available, '
|
||||||
|
'--no-js-runtimes needs to be passed before enabling other runtimes'))
|
||||||
general.add_option(
|
general.add_option(
|
||||||
'--no-js-runtimes',
|
'--no-js-runtimes',
|
||||||
dest='js_runtimes', action='store_const', const=[],
|
dest='js_runtimes', action='store_const', const=[],
|
||||||
@@ -484,9 +487,12 @@ def create_parser():
|
|||||||
default=[],
|
default=[],
|
||||||
help=(
|
help=(
|
||||||
'Remote components to allow yt-dlp to fetch when required. '
|
'Remote components to allow yt-dlp to fetch when required. '
|
||||||
|
'This option is currently not needed if you are using an official executable '
|
||||||
|
'or have the requisite version of the yt-dlp-ejs package installed. '
|
||||||
'You can use this option multiple times to allow multiple components. '
|
'You can use this option multiple times to allow multiple components. '
|
||||||
'Supported values: ejs:npm (external JavaScript components from npm), ejs:github (external JavaScript components from yt-dlp-ejs GitHub). '
|
'Supported values: ejs:npm (external JavaScript components from npm), '
|
||||||
'By default, no remote components are allowed.'))
|
'ejs:github (external JavaScript components from yt-dlp-ejs GitHub). '
|
||||||
|
'By default, no remote components are allowed'))
|
||||||
general.add_option(
|
general.add_option(
|
||||||
'--no-remote-components',
|
'--no-remote-components',
|
||||||
dest='remote_components', action='store_const', const=[],
|
dest='remote_components', action='store_const', const=[],
|
||||||
|
|||||||
Reference in New Issue
Block a user