From b8e153178b4acb4d4e0d612077b264a230dcf612 Mon Sep 17 00:00:00 2001 From: Jesse Bannon Date: Thu, 29 Jun 2023 23:43:53 -0700 Subject: [PATCH] docs --- docs/config.rst | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/config.rst b/docs/config.rst index 225034a3..99ce10cc 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -306,6 +306,32 @@ by using the file-wide ``__preset__``: This ``subscription.yaml`` is equivalent to the one above it because all subscriptions automatically set ``__preset__`` as a `parent preset`_. +File Subscription Value +^^^^^^^^^^^^^^^^^^^^^^^ +With a clever config and use of ``__preset__``, your subscriptions can typically boil +down to a name and url. You can set ``__value__`` to the name of an override variable, +and use the override variable ``subscription_name`` to achieve one-liner subscriptions. +Using the example above, we can do: + +.. code-block:: yaml + :caption: subscription.yaml + + __preset__: + preset: "playlist_preset_ex" + overrides: + playlist_name: "{subscription_name}" + + __value__: "url" + + # single-line subscription + "diy-playlist": "https://youtube.com/playlist?list=UCsvn_Po0SmunchJYtttWpOxMg" + +``"diy-playlist"`` gets assigned to the ``playlist_name`` override variable by setting +it with ``subscription_name`` , and the url gets assigned to ``url`` by setting ``__value__`` +to write values to it. + +Traditional subscriptions that can override presets will still work when using ``__value__``. + ------------------------------------------------------------------------------- .. _source-variables: