From 3b5ff800c5dd4c6dea2a822b5b41744190a23ea4 Mon Sep 17 00:00:00 2001 From: Robert Dailey Date: Sat, 17 Apr 2021 09:27:31 -0500 Subject: [PATCH] wiki: Move config examples to its own page --- wiki/Configuration-Examples.md | 82 ++++++++++++++++++++++++++++++ wiki/Configuration-Reference.md | 88 +-------------------------------- 2 files changed, 84 insertions(+), 86 deletions(-) create mode 100644 wiki/Configuration-Examples.md diff --git a/wiki/Configuration-Examples.md b/wiki/Configuration-Examples.md new file mode 100644 index 00000000..72af6e98 --- /dev/null +++ b/wiki/Configuration-Examples.md @@ -0,0 +1,82 @@ +Various scenarios supported using the flexible configuration support. + +## Update as much as possible in both Sonarr and Radarr with a single config + +Create a single configuration file (use the default `trash.yml` if you want to simplify your CLI +usage by not being required to specify `--config`) and put all of the configuration in there, like +this: + +```yml +sonarr: + - base_url: http://localhost:8989 + api_key: f7e74ba6c80046e39e076a27af5a8444 + quality_definition: hybrid + release_profiles: + - type: anime + strict_negative_scores: true + tags: + - anime + - type: series + strict_negative_scores: false + tags: + - tv + +radarr: + - base_url: http://localhost:7878 + api_key: bf99da49d0b0488ea34e4464aa63a0e5 + quality_definition: + type: movie + preferred_ratio: 0.5 +``` + +Even though it's all in one file, Radarr settings are ignored when you run `trash sonarr` and vice +versa. To update both, just chain them together in your terminal, like so: + +```bash +trash sonarr && trash radarr +``` + +This scenario is pretty ideal for a cron job you have running regularly and you want it to update +everything possible in one go. + +## Selectively update different parts of Sonarr + +Say you want to update Sonarr release profiles from the guide, but not the quality definitions. +There's no command line option to control this, so how do you do it? + +Simply create two YAML files: + +`sonarr-release-profiles.yml`: + +```yml +sonarr: + - base_url: http://localhost:8989 + api_key: f7e74ba6c80046e39e076a27af5a8444 + release_profiles: + - type: anime + tags: + - anime +``` + +`sonarr-quality-definition.yml`: + +```yml +sonarr: + - base_url: http://localhost:8989 + api_key: f7e74ba6c80046e39e076a27af5a8444 + quality_definition: hybrid +``` + +Then run the following command: + +```bash +trash sonarr --config sonarr-release-profiles.yml +``` + +This will only update release profiles since you have essentially moved the `quality_definition` +property to its own file. When you want to update both, you just specify both files the next time +you run the program: + +```bash +trash sonarr --config sonarr-release-profiles.yml sonarr-quality-definition.yml +``` diff --git a/wiki/Configuration-Reference.md b/wiki/Configuration-Reference.md index b0df1a29..ff9ba764 100644 --- a/wiki/Configuration-Reference.md +++ b/wiki/Configuration-Reference.md @@ -1,4 +1,5 @@ -Reference documentation for the YAML documentation. +Reference documentation for the YAML documentation. For various configuration examples, see the +[[Configuration Examples]] page. ## Summary @@ -126,88 +127,3 @@ radarr: result in a warning log printed and the value will be clamped. [radarr_quality]: https://trash-guides.info/Radarr/V3/Radarr-Quality-Settings-File-Size/ - -## Examples - -Various scenarios supported using the flexible configuration support. - -### Update as much as possible in both Sonarr and Radarr with a single config - -Create a single configuration file (use the default `trash.yml` if you want to simplify your CLI -usage by not being required to specify `--config`) and put all of the configuration in there, like -this: - -```yml -sonarr: - - base_url: http://localhost:8989 - api_key: f7e74ba6c80046e39e076a27af5a8444 - quality_definition: hybrid - release_profiles: - - type: anime - strict_negative_scores: true - tags: - - anime - - type: series - strict_negative_scores: false - tags: - - tv - -radarr: - - base_url: http://localhost:7878 - api_key: bf99da49d0b0488ea34e4464aa63a0e5 - quality_definition: - type: movie - preferred_ratio: 0.5 -``` - -Even though it's all in one file, Radarr settings are ignored when you run `trash sonarr` and vice -versa. To update both, just chain them together in your terminal, like so: - -```bash -trash sonarr && trash radarr -``` - -This scenario is pretty ideal for a cron job you have running regularly and you want it to update -everything possible in one go. - -### Selectively update different parts of Sonarr - -Say you want to update Sonarr release profiles from the guide, but not the quality definitions. -There's no command line option to control this, so how do you do it? - -Simply create two YAML files: - -`sonarr-release-profiles.yml`: - -```yml -sonarr: - - base_url: http://localhost:8989 - api_key: f7e74ba6c80046e39e076a27af5a8444 - release_profiles: - - type: anime - tags: - - anime -``` - -`sonarr-quality-definition.yml`: - -```yml -sonarr: - - base_url: http://localhost:8989 - api_key: f7e74ba6c80046e39e076a27af5a8444 - quality_definition: hybrid -``` - -Then run the following command: - -```bash -trash sonarr --config sonarr-release-profiles.yml -``` - -This will only update release profiles since you have essentially moved the `quality_definition` -property to its own file. When you want to update both, you just specify both files the next time -you run the program: - -```bash -trash sonarr --config sonarr-release-profiles.yml sonarr-quality-definition.yml -```