Added Run Commands & Environmental Variables Page

master
meisnate12 2 years ago
parent 7d6c0a2424
commit ea16e2088f

@ -59,6 +59,7 @@ Before posting on GitHub about an enhancement, error, or configuration question
## Table of Contents
- [Home](Home)
- [Installation](Installation)
- [Run Commands & Environmental Variables](Run-Commands-&-Environmental-Variables)
- [Local Walkthrough](Local-Walkthrough)
- [Docker Walkthrough](Docker-Walkthrough)
- [unRAID Walkthrough](unRAID-Walkthrough)

@ -51,349 +51,4 @@ services:
volumes:
- /path/to/config:/config
restart: unless-stopped
```
## Run Commands
| Name | Shell Command | Environmental<br>Variable | Allowed Values | Default Value |
| :--- | :--- | :--- | :--- | :--- |
| [Config](#config) | `-c` or `--config` | `PMM_CONFIG` | Path to YAML config file | `config/config.yml` alongside<br>`plex_meta_manager.py` |
| [Time to Run](#time-to-run) | `-t` or `--time` | `PMM_TIME` | comma-separated list of times to update each day<br>**Format:** HH:MM | `03:00` |
| [Run](#run) | `-r` or `--run` | `PMM_RUN` | Run without the scheduler | `False` |
| [Run Tests](#run-tests) | `-rt`, `--tests`, or `--run-tests` | `PMM_TEST` | Run in debug mode with only collections that have `test: true` | `False` |
| [Run Collections Only](#collections-only) | `-co` or `--collections-only` | `PMM_COLLECTIONS_ONLY` | Process only collections during the run | `False` |
| [Run Libraries Only](#libraries-only) | `-lo` or `--libraries-only` | `PMM_LIBRARIES_ONLY` | Process everything but collections during the run | `False` |
| [Run Collections](#run-collections) | `-rc` or `--run-collections` | `PMM_COLLECTIONS` | comma-separated list of collection names to process | All Collections |
| [Run Libraries](#run-libraries) | `-rl` or `--run-libraries` | `PMM_LIBRARIES` | comma-separated list of library names to process | All libraries |
| [Run Libraries First](#run-libraries-first) | `-lf` or `--libraries-first` | `PMM_LIBRARIES_FIRST` | Run library operations first before collections during the run | `False` |
| [Ignore Schedules](#ignore-schedules) | `-is` or `--ignore-schedules` | `PMM_IGNORE_SCHEDULES` | Ignore all schedules during the run except for range schedules | `False` |
| [Delete Collections](#delete-collections) | `-dc` or `--delete-collections` | `PMM_DELETE_COLLECTIONS` | Delete all collections in a Library before a run | `False` |
| [Resume Run](#resume-run) | `-re` or `--resume` | `PMM_RESUME` | Name of the Collection you want to resume the run at | ` ` |
| [No Countdown](#no-countdown) | `-nc` or `--no-countdown` | `PMM_NO_COUNTDOWN` | Run without displaying the countdown | `False` |
| [No Missing](#no-missing) | `-nm` or `--no-missing` | `PMM_NO_MISSING` | Run without any of the missing movie/show functions | `False` |
| [Read Only Config](#read-only-config) | `-ro` or `--read-only-config` | `PMM_READ_ONLY_CONFIG` | Run without writing to the config | `False` |
| [Divider Character](#divider-character--screen-width) | `-d` or `--divider` | `PMM_DIVIDER` | Character that divides the sections | `=` |
| [Screen Width](#divider-character--screen-width) | `-w` or `--width` | `PMM_WIDTH` | Integer between 90 and 300 | `100` |
* Environmental Variable values are used over Shell Command values
### Config
To choose the location of the YAML config file use the `--config` option.
<details>
<summary>Local</summary>
```shell
python plex_meta_manager.py --config <path_to_config>
```
</details>
<details>
<summary>Docker</summary>
```shell
docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager --config <path_to_config>
```
</details>
### Time to Run
To choose the times when the script will run each day use a comma-separated list with the `--time` option.
<details>
<summary>Local</summary>
```shell
python plex_meta_manager.py --time 22:00,03:00
```
</details>
<details>
<summary>Docker</summary>
```shell
docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager --time 22:00,03:00
```
</details>
### Run
To just run the script without having it continuously run use the `--run` option.
<details>
<summary>Local</summary>
```shell
python plex_meta_manager.py --run
```
</details>
<details>
<summary>Docker</summary>
```shell
docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager --run
```
</details>
### Run Tests
To run the script in debug mode while only running collections that have `test: true` use the `--run-tests` option.
<details>
<summary>Local</summary>
```shell
python plex_meta_manager.py --run-tests
```
</details>
<details>
<summary>Docker</summary>
```shell
docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager --run-tests
```
</details>
### Collections Only
To have the script run only collections and not any library operations use the `--collections-only` option.
<details>
<summary>Local</summary>
```shell
python plex_meta_manager.py --collections-only
```
</details>
<details>
<summary>Docker</summary>
```shell
docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager --collections-only
```
</details>
### Libraries Only
To have the script run only library operations and not any collections use the `--libraries-only` option.
<details>
<summary>Local</summary>
```shell
python plex_meta_manager.py --libraries-only
```
</details>
<details>
<summary>Docker</summary>
```shell
docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager --libraries-only
```
</details>
### Run Collections
To have the script run only using the collections in the comma-separated list use the `--run-collections` option.
<details>
<summary>Local</summary>
```shell
python plex_meta_manager.py --run-collections "Harry Potter, Star Wars"
```
</details>
<details>
<summary>Docker</summary>
```shell
docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager --run-collections "Harry Potter, Star Wars"
```
</details>
### Run Libraries
To have the script run only the libraries in the comma-separated list use the `--run-libraries` option.
<details>
<summary>Local</summary>
```shell
python plex_meta_manager.py --run-libraries "TV Shows"
```
</details>
<details>
<summary>Docker</summary>
```shell
docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager --run-libraries "TV Shows"
```
</details>
### Run Libraries First
To have the script run library operations first before collections during the run use the `--libraries-first` option.
<details>
<summary>Local</summary>
```shell
python plex_meta_manager.py --libraries-first
```
</details>
<details>
<summary>Docker</summary>
```shell
docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager --libraries-first
```
</details>
### Ignore Schedules
To have the script ignore all schedules during the run except for range schedules use the `--ignore-schedules` option.
<details>
<summary>Local</summary>
```shell
python plex_meta_manager.py --ignore-schedules
```
</details>
<details>
<summary>Docker</summary>
```shell
docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager --ignore-schedules
```
</details>
### Delete Collections
To have the script delete all collections in a Library before a run use the `--delete-collections` option.
<details>
<summary>Local</summary>
```shell
python plex_meta_manager.py --delete-collections
```
</details>
<details>
<summary>Docker</summary>
```shell
docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager --delete-collections
```
</details>
### Resume Run
To have the script resume a run from a specific collection use the `--resume` option.
<details>
<summary>Local</summary>
```shell
python plex_meta_manager.py --resume "Star Wars"
```
</details>
<details>
<summary>Docker</summary>
```shell
docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager --resume "Star Wars"
```
</details>
### No Countdown
To have the script run without displaying a countdown use the `--no-countdown` option.
<details>
<summary>Local</summary>
```shell
python plex_meta_manager.py --no-countdown
```
</details>
<details>
<summary>Docker</summary>
```shell
docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager --no-countdown
```
</details>
### No Missing
To have the script run without any of the missing movie/show functions use the `--no-missing` option.
<details>
<summary>Local</summary>
```shell
python plex_meta_manager.py --no-missing
```
</details>
<details>
<summary>Docker</summary>
```shell
docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager --no-missing
```
</details>
### Read Only Config
To have the script run without writing to the config use the `--read-only-config` option.
<details>
<summary>Local</summary>
```shell
python plex_meta_manager.py --read-only-config
```
</details>
<details>
<summary>Docker</summary>
```shell
docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager --read-only-config
```
</details>
### Divider Character & Screen Width
To change the terminal output divider character or width use the `--divider` and `--width` options.
<details>
<summary>Local</summary>
```shell
python plex_meta_manager.py --divider * --width 200
```
</details>
<details>
<summary>Docker</summary>
```shell
docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager --divider * --width 200
```
</details>
```

@ -44,4 +44,4 @@ To authenticate MyAnimeList the first time, you need run the container with the
#### OAuth Flow using unRAID Docker
Directions on how to authenticate MyAnimeList on unRAID can be found on the [unRAID Installation](https://github.com/meisnate12/Plex-Meta-Manager/wiki/unRAID-Walkthrough#advanced-installation-authenticating-trakt-or-myanimelist) page.
Directions on how to authenticate MyAnimeList on unRAID can be found on the [unRAID Walkthrough](https://github.com/meisnate12/Plex-Meta-Manager/wiki/unRAID-Walkthrough#advanced-installation-authenticating-trakt-or-myanimelist) page.

@ -1,60 +1,3 @@
## Local Installation
Testing has been done only on Python 3.7, 3.8, and 3.9 on Linux and Windows. Dependencies must be installed by running:
```shell
pip install -r requirements.txt
```
If there are issues installing dependencies try:
```shell
pip install -r requirements.txt --ignore-installed
```
To run the script in an interactive terminal run:
```shell
python plex_meta_manager.py
```
## Docker Installation
A simple `Dockerfile` is available in this repo if you'd like to build it yourself. The official build is also available from dockerhub here: https://hub.docker.com/r/meisnate12/plex-meta-manager
```shell
docker run -it -v <PATH_TO_CONFIG>:/config:rw meisnate12/plex-meta-manager
```
* The `-it` allows you to interact with the script when needed.
* For example, it's required in order to go through the OAuth flow while connecting to Trakt or MyAnimeList.
* The `-v <PATH_TO_CONFIG>:/config:rw` mounts the location you choose as a persistent volume to store your files.
* Change `<PATH_TO_CONFIG>` to a folder where your config.yml and other files are.
* The docker image defaults to running the config named `config.yml` in your persistent volume.
* Use quotes around the whole thing if your path has spaces i.e. `-v "<PATH_TO_CONFIG>:/config:rw"`
Example
```shell
docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager
```
### Docker Compose Example
```yaml
version: "2.1"
services:
plex-meta-manager:
image: meisnate12/plex-meta-manager
container_name: plex-meta-manager
environment:
- TZ=TIMEZONE #optional
volumes:
- /path/to/config:/config
restart: unless-stopped
```
## Run Commands & Environmental Variables
| Name | Shell Command | Environmental<br>Variable | Allowed Values | Default Value |
| :--- | :--- | :--- | :--- | :--- |
| [Config](#config) | `-c` or `--config` | `PMM_CONFIG` | Path to YAML config file | `config/config.yml` alongside<br>`plex_meta_manager.py` |

@ -50,6 +50,6 @@ The scheduling options are:
| Never | Never updates | never | `never` |
* `daily` is the default when `schedule` isn't specified.
* You can run the script multiple times per day but using the `--time` command line argument detailed on the [Local Installation Page](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Installation#time-to-run).
* You can run the script multiple times per day but using the `--time` command line argument detailed on the [Run Commands & Environmental Variables Page](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Run-Commands-&-Environmental-Variables#time-to-run).
* You can have multiple scheduling options just make them a list or comma-separated values.
* You can use the `delete_not_scheduled` setting to delete Collections that are skipped due to not being scheduled.

@ -20,7 +20,7 @@ All the following attributes serve various functions as how the collection/playl
| Ignore IDs | `ignore_ids` | Collection/Playlist level `ignore_ids` which is combined with the library and global `ignore_ids`<br>**Default:** [settings library value](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Settings-Attributes) | List or comma-separated String of TMDb/TVDb IDs | :heavy_check_mark: |
| Ignore IMDb IDs | `ignore_imdb_ids` | Collection/Playlist level `ignore_imdb_ids` which is combined with the library and global `ignore_imdb_ids`<br>**Default:** [settings library value](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Settings-Attributes) | List or comma-separated String of IMDb IDs | :heavy_check_mark: |
| Name Mapping | `name_mapping` | Used to specify the folder name in the [Image Assets Directory](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Image-Asset-Directory) | Folder Name In Assets Directory | :heavy_check_mark: |
| Test Mode | `test` | When running in Test Mode (`--run-tests` [option](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Installation#run-tests)) only collections/playlists with `test: true` will be run<br>**Default:** `false` | **boolean:** `true` or `false` | :heavy_check_mark: |
| Test Mode | `test` | When running in Test Mode (`--run-tests` [option](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Run-Commands-&-Environmental-Variables#run-tests)) only collections/playlists with `test: true` will be run<br>**Default:** `false` | **boolean:** `true` or `false` | :heavy_check_mark: |
| Changes Webhooks | `changes_webhooks` | Used to specify a collection/playlist changes webhook for just this collection/playlist. | List of webhooks | :heavy_check_mark: |
* **Name Mapping:** If your collection/playlist name contains characters that are not allowed in file paths (i.e. for windows `<`, `>`, `:`, `"`, `/`, `\`, `|`, `?`, `*` cannot be in the file path), but you want them in your collection name you can use the `name_mapping` attribute to specific this collection's name in the file system.

@ -38,4 +38,4 @@ To authenticate Trakt the first time, you need run the container with the `-it`
#### OAuth Flow using unRAID Docker
Directions on how to authenticate Trakt on unRAID can be found on the [unRAID Installation](https://github.com/meisnate12/Plex-Meta-Manager/wiki/unRAID-Walkthrough#advanced-installation-authenticating-trakt-or-myanimelist) page.
Directions on how to authenticate Trakt on unRAID can be found on the [unRAID Walkthrough](https://github.com/meisnate12/Plex-Meta-Manager/wiki/unRAID-Walkthrough#advanced-installation-authenticating-trakt-or-myanimelist) page.

@ -1,6 +1,6 @@
- [Home](Home)
- [Installation](Installation)
- [Run Commands & Environmental Variables]()
- [Run Commands & Environmental Variables](Run-Commands-&-Environmental-Variables)
- [Local Walkthrough](Local-Walkthrough)
- [Docker Walkthrough](Docker-Walkthrough)
- [unRAID Walkthrough](unRAID-Walkthrough)

@ -7,7 +7,7 @@ To install a container from docker hub, you will need community applications - a
2. Click the download icon on the `plex meta manager` container by `meisnate12`.
3. Create your [Docker values](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Docker-Installation) using `Add another Path, Port, Variable, Label or Device`. Example config:
3. Create your [Docker values](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Run-Commands-&-Environmental-Variables) using `Add another Path, Port, Variable, Label or Device`. Example config:
| Config Type | Name | Key | Value | Container Path | Host Path | Access Mode | Description |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
@ -16,8 +16,8 @@ To install a container from docker hub, you will need community applications - a
| Variable | Screen Width | `PMM_WIDTH` | `100` | N/A | N/A | N/A | An integer between 90 and 300 |
| Path | Config Storage Path | N/A | N/A | `/config` | `/mnt/user/appdata/plex-meta-manager` | Read/Write | Translation from docker container path to host path |
* Full list of docker values can be found on the [Docker Installation](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Docker-Installation) page
* If you wish to enable one-time [Run](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Docker-Installation), add `-r` to `Post Arguments` by enabling Advanced View in the top right of unRAID.
* Full list of docker values can be found on the [Run Commands & Environmental Variables Page](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Run-Commands-&-Environmental-Variables).
* If you wish to enable one-time [Run]([Run Commands & Environmental Variables Page](https://github.com/meisnate12/Plex-Meta-Manager/wiki/Run-Commands-&-Environmental-Variables#run)), add `-r` to `Post Arguments` by enabling Advanced View in the top right of unRAID.
* The Image below shows the above values in the unRAID WebUI.
![Image](https://i.imgur.com/2y8RPTt.png)

Loading…
Cancel
Save