From 02af08edb01f0667a9b20236459a942ca4f05135 Mon Sep 17 00:00:00 2001 From: Chaz Larson Date: Tue, 13 Dec 2022 09:35:28 -0600 Subject: [PATCH 1/2] restore lost chat about python 3.11 --- docs/home/guides/docker.md | 27 +++++++++++++++++++++ docs/home/guides/local.md | 49 ++++++++++++++++++++++++-------------- 2 files changed, 58 insertions(+), 18 deletions(-) diff --git a/docs/home/guides/docker.md b/docs/home/guides/docker.md index ebe2e0d2..24800dae 100644 --- a/docs/home/guides/docker.md +++ b/docs/home/guides/docker.md @@ -47,6 +47,33 @@ You may want to take an hour to get familiar with Docker fundamentals with the [ DO NOT MAKE ANY CHANGES BELOW if you want this to just work. Don't change the docker image [`linuxserver.io` will not work for this, for example]; don't change the paths, etc. +### Prepare a small test library [optional] + +```{include} wt/wt-test-library.md +``` + +### Starting up your terminal. + +Since most of this is typing commands into a terminal, you'll need to have a terminal open. + +````{tab} Linux +
+If your Linux system is remote to your computer, connect to it via SSH. That SSH session is the terminal you will be using, so leave it open. + +If you are running this on a desktop Linux machine, start up the Terminal application. That window will be the terminal you will type commands into throughout this walkthrough, so leave it open. +
+```` +````{tab} OS X: +Open the Terminal app; this window will be the place you type commands throughout this walkthrough, so leave it open. The Terminal app is in Applications -> Utilities. + +You can also use iTerm or some other terminal app if you wish. If you don't know what that means, use Terminal. +
+```` +````{tab} Windows: +Use the Start menu to open PowerShell. This will be the window into which you type commands throughout this walkthrough, so leave it open. +
+```` + ### Installing Docker. To run Docker images, you need to have Docker installed. It is not typically installed on new Mac, Linux, or Windows machines. diff --git a/docs/home/guides/local.md b/docs/home/guides/local.md index a7e9e649..34eebe5a 100644 --- a/docs/home/guides/local.md +++ b/docs/home/guides/local.md @@ -45,23 +45,10 @@ This walkthrough involves typing commands into a command window. On Mac OS X or IMPORTANT: This walkthrough is assuming you are doing the entire process on the same platform; i.e. you're installing PMM and editing its config files on a single Linux, Windows, or OS X machine. It doesn't account for situations like running PMM on a Linux machine while editing the config files on your Windows box. -### Prepare a small test library +### Prepare a small test library [optional] -While going through this process, Plex-Meta-Manager is going to load the movies in your library, create some collections, and apply some overlays. If you have a large library, this will be very time-consuming. - -For learning and testing, you would be well-advised to create a small test library of a reasonable size, where reasonable it probably below a thousand. - -The author has a small library of 10 movies that is used for fast tests. - -For best results, your test library will contain: - -At least two comedy movies released since 2012. -At least two movies from the IMDB top 250. -At least two movies from IMDB's Popular list. -At least two movies from IMDB's Lowest Rated. -A couple different resolutions among the movies. - -That will ensure there's something to go into each of the example collections that will be created. +```{include} wt/wt-test-library.md +``` ### Starting up your terminal. @@ -108,11 +95,15 @@ Follow the instructions here: [Installing Python 3 on Mac OS X](https://docs.pyt
```` ````{tab} Windows: -Go to http://www.python.org/download and download the latest version of Python for Windows in 32 or 64-bit as appropriate for your system [probably 64-bit]. As this is written, that's 3.10.4. +Go to http://www.python.org/download and download the next-to-latest minor version of Python for Windows in 32 or 64-bit as appropriate for your system [probably 64-bit]. As this is written, that's 3.10, while the latest is 3.11. + +#### Why the next-to-latest? + +There is one dependency [`lxml`] that lags behind new Python releases; this will cause a failure when installing requirements in a moment if the newest Python version is too new [at time of writing the current is 3.11, and the requirements install fails on the lxml library]. You can avoid this by using the next-to-latest release. At some point this will no longer be a problem, but that is outside the control of PMM. Once downloaded, run the installer. Tick “Add to path” checkbox at the bottom and click “Install Now”. -For Windows 10, you will need to enable scripts in PowerShell. Follow the instructions [here](https://windowsloop.com/enable-powershell-scripts-execution-windows-10) to do so. If you skip this step you're going to hit a hard stop in a little bit. +For Windows 10, you will need to enable scripts in PowerShell. Follow the instructions [here](https://windowsloop.com/enable-powershell-scripts-execution-windows-10) to do so. If you skip this step you're going to hit a hard stop in a moment.
```` @@ -435,6 +426,28 @@ You should consider upgrading via the '/Users/mroche/Plex-Meta-Manager/pmm-venv/ Don't worry about the WARNING about `pip version thus-and-such` if it comes up. +
+ `Encountered error while trying to install package.` +
+ + If you see an error that ends in something like this: + +``` + ... + building 'lxml.etree' extension + error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ + [end of output] + + note: This error originates from a subprocess, and is likely not a problem with pip. + error: legacy-install-failure + + × Encountered error while trying to install package. + ╰─> lxml +``` + You've hit the error we were referring to above with the Python version being too recent. Probably you are running Python 3.11 in late 2022 or Python 3.12 shortly after its release. Deactivate and delete the virtual environment and create one based on the previous Python release [which may involve removing Python and reinstalling the older version depending on platform], then try this step again. + +
+
What did that do?
From b011878e3fa2d09f725e39a4a057557cb18e6056 Mon Sep 17 00:00:00 2001 From: Chaz Larson Date: Tue, 13 Dec 2022 14:00:53 -0600 Subject: [PATCH 2/2] More formatting tweaks --- docs/home/guides/local.md | 56 ---------------------- docs/home/guides/wt/wt-04-default-intro.md | 10 ++-- docs/home/guides/wt/wt-05-local-file.md | 6 --- docs/home/guides/wt/wt-10-scheduling.md | 16 ++++--- docs/home/guides/wt/wt-editor.md | 6 --- docs/home/guides/wt/wt-save.md | 7 +-- docs/home/guides/wt/wt-test-library.md | 21 ++++++++ 7 files changed, 36 insertions(+), 86 deletions(-) create mode 100644 docs/home/guides/wt/wt-test-library.md diff --git a/docs/home/guides/local.md b/docs/home/guides/local.md index 34eebe5a..e9e4c3cc 100644 --- a/docs/home/guides/local.md +++ b/docs/home/guides/local.md @@ -56,21 +56,17 @@ Since most of this is typing commands into a terminal, you'll need to have a ter ````{tab} Linux -
If your Linux system is remote to your computer, connect to it via SSH. That SSH session is the terminal you will be using, so leave it open. If you are running this on a desktop Linux machine, start up the Terminal application. That window will be the terminal you will type commands into throughout this walkthrough, so leave it open. -
```` ````{tab} OS X: Open the Terminal app; this window will be the place you type commands throughout this walkthrough, so leave it open. The Terminal app is in Applications -> Utilities. You can also use iTerm or some other terminal app if you wish. If you don't know what that means, use Terminal. -
```` ````{tab} Windows: Use the Start menu to open PowerShell. This will be the window into which you type commands throughout this walkthrough, so leave it open. -
```` ### Installing Python. @@ -86,13 +82,10 @@ python3 --version If this doesn't return `3.7.0` or higher, you'll need to get Python 3 installed. ````{tab} Linux -
Describing a python install for any arbitrary linux is out of scope here, but if you're using Ubuntu, [this](https://techviewleo.com/how-to-install-python-on-ubuntu-linux/) might be useful. -
```` ````{tab} OS X: Follow the instructions here: [Installing Python 3 on Mac OS X](https://docs.python-guide.org/starting/install3/osx/) -
```` ````{tab} Windows: Go to http://www.python.org/download and download the next-to-latest minor version of Python for Windows in 32 or 64-bit as appropriate for your system [probably 64-bit]. As this is written, that's 3.10, while the latest is 3.11. @@ -104,7 +97,6 @@ There is one dependency [`lxml`] that lags behind new Python releases; this will Once downloaded, run the installer. Tick “Add to path” checkbox at the bottom and click “Install Now”. For Windows 10, you will need to enable scripts in PowerShell. Follow the instructions [here](https://windowsloop.com/enable-powershell-scripts-execution-windows-10) to do so. If you skip this step you're going to hit a hard stop in a moment. -
```` --- @@ -122,17 +114,12 @@ git --version If this doesn't return a version number, you'll need to get git installed. ````{tab} Linux -
The git install is discussed here: [Download for Linux and Unix](https://git-scm.com/download/linux) -
```` ````{tab} OS X: -
The git install is discussed here: [Git - Downloading Package](https://git-scm.com/download/mac) -
```` ````{tab} Windows: -
Download the installer from [here](https://git-scm.com/download/windows) Run the install; you can probably just accept the defaults and click through except for the step that asks you to choose an editor; you probably want to choose something other than the default there: @@ -140,7 +127,6 @@ Run the install; you can probably just accept the defaults and click through exc ![Git Install](git-install.png) This install comes with its own command line interface. **Do not use this interface in this walkthrough**. Continue to do everything here in Powershell. -
```` --- @@ -228,7 +214,6 @@ Later on you can move it elsewhere if you want, but for now put it there. This This walkthrough is going to use a "virtual environment", since that provides a simple way to keep the requirements for a given thing self-contained; think of it as a "sandbox" for this script. It also provides a clean way to recover from mistakes, and keeps the host system clean. ````{tab} Linux -
[type this into your terminal] ``` @@ -249,20 +234,16 @@ sudo apt-get install python3.9-venv ``` Then try the original venv command above again. -
```` ````{tab} OS X: -
[type this into your terminal] ``` python3 -m venv pmm-venv ``` -
```` ````{tab} Windows: -
[type this into your terminal] ``` @@ -276,7 +257,6 @@ Python was not found; run without arguments to install from the Microsoft Store, ``` You apparently didn't check the “Add to path” checkbox above under [installing Python](#installing-python). "Repair" your Python install and check "add python to environment variables". -
````
@@ -303,25 +283,20 @@ If you aren't looking at an error, you're ready to move on. That will create the virtual environment, and then you need to activate it: ````{tab} Linux -
[type this into your terminal] ``` source pmm-venv/bin/activate ``` -
```` ````{tab} OS X: -
[type this into your terminal] ``` source pmm-venv/bin/activate ``` -
```` ````{tab} Windows: -
[type this into your terminal] ``` @@ -343,7 +318,6 @@ You apparently skipped the "enable scripts in Powershell" step above under [inst You will need to take care of that before moving on. Follow the instructions [here](https://windowsloop.com/enable-powershell-scripts-execution-windows-10). Once you have done that, try the activation step again. -
```` That command will not produce any output if it works; it will display an error if a problem occurs. @@ -370,31 +344,25 @@ An advantage of doing this in a virtual environment is that in the event somethi **IMPORTANT: In the future, when you want to run the script, you will need to do this "activation" step every time. Not the venv creation, just the activation**: ````{tab} Linux -
[type this into your terminal] ``` source pmm-venv/bin/activate ``` -
```` ````{tab} OS X: -
[type this into your terminal] ``` source pmm-venv/bin/activate ``` -
```` ````{tab} Windows: -
[type this into your terminal] ``` .\pmm-venv\Scripts\activate ``` -
```` ### Installing requirements @@ -478,31 +446,25 @@ The default config file contains a reference to a directory that will show an er We'll create it here so the error doesn't show up later. ````{tab} Linux -
[type this into your terminal] ``` mkdir config/assets ``` -
```` ````{tab} OS X: -
[type this into your terminal] ``` mkdir config/assets ``` -
```` ````{tab} Windows: -
[type this into your terminal] ``` mkdir config\assets ``` -
```` ### Setting up the initial config file @@ -515,31 +477,25 @@ mkdir config\assets First, make a copy of the template. This is going to create a copy of the base template that you can then edit. You only need to do this once. ````{tab} Linux -
[type this into your terminal] ``` cp config/config.yml.template config/config.yml ``` -
```` ````{tab} OS X: -
[type this into your terminal] ``` cp config/config.yml.template config/config.yml ``` -
```` ````{tab} Windows: -
[type this into your terminal] ``` copy .\config\config.yml.template .\config\config.yml ``` -
```` Now open the copy in an editor: @@ -637,7 +593,6 @@ deactivate ### I want to update to the latest version of PMM ````{tab} Linux -
[type this into your terminal] ``` @@ -646,10 +601,8 @@ git pull source pmm-venv/bin/activate python -m pip install -r requirements.txt ``` -
```` ````{tab} OS X: -
[type this into your terminal] ``` @@ -658,10 +611,8 @@ git pull source pmm-venv/bin/activate python -m pip install -r requirements.txt ``` -
```` ````{tab} Windows: -
[type this into your terminal] ``` @@ -670,13 +621,11 @@ git pull .\pmm-venv\Scripts\activate python -m pip install -r requirements.txt ``` -
```` ### I want to use the develop branch ````{tab} Linux -
[type this into your terminal] ``` @@ -686,10 +635,8 @@ git pull source pmm-venv/bin/activate python -m pip install -r requirements.txt ``` -
```` ````{tab} OS X: -
[type this into your terminal] ``` @@ -699,10 +646,8 @@ git pull source pmm-venv/bin/activate python -m pip install -r requirements.txt ``` -
```` ````{tab} Windows: -
[type this into your terminal] ``` @@ -712,7 +657,6 @@ git pull .\pmm-venv\Scripts\activate python -m pip install -r requirements.txt ``` -
```` ### I want to use the nightly branch diff --git a/docs/home/guides/wt/wt-04-default-intro.md b/docs/home/guides/wt/wt-04-default-intro.md index ffb75d7a..88c05e0b 100644 --- a/docs/home/guides/wt/wt-04-default-intro.md +++ b/docs/home/guides/wt/wt-04-default-intro.md @@ -11,11 +11,11 @@ The default config links to two of them: The first will create: - Newly Released - New Episodes + - Newly Released + - New Episodes [TV libraries only] The second will create: - IMDb Popular - IMDb Top 250 - IMDb Lowest Rated + - IMDb Popular + - IMDb Top 250 + - IMDb Lowest Rated diff --git a/docs/home/guides/wt/wt-05-local-file.md b/docs/home/guides/wt/wt-05-local-file.md index 868fad43..5c9b8933 100644 --- a/docs/home/guides/wt/wt-05-local-file.md +++ b/docs/home/guides/wt/wt-05-local-file.md @@ -3,31 +3,25 @@ If the default metadata files do not allow you to create the collections you wan First, open the metadata file [this will create the file if it doesn't already exist]: ````{tab} Linux -
[type this into your terminal] ``` nano "config/Movies.yml" ``` -
```` ````{tab} OS X: -
[type this into your terminal] ``` nano "config/Movies.yml" ``` -
```` ````{tab} Windows: -
[type this into your terminal] ``` notepad "config\Movies.yml" ``` -
```` In this file, add the following, exactly as it is shown here: diff --git a/docs/home/guides/wt/wt-10-scheduling.md b/docs/home/guides/wt/wt-10-scheduling.md index 9bc44334..f3934a00 100644 --- a/docs/home/guides/wt/wt-10-scheduling.md +++ b/docs/home/guides/wt/wt-10-scheduling.md @@ -1,13 +1,15 @@ -The commands you've been using in this walkthrough runn Plex-Meta-Manager immediately. +The commands you've been using in this walkthrough run Plex-Meta-Manager immediately then quit. -Plex Meta Manager also features multiple layers of scheduling, which you can leverage to +Plex Meta Manager also features multiple layers of scheduling, which you can leverage to control when various activities take place. -You can run PMM in the background, telling it to wake up and process your libraries at fixed times during the day. The default behavior in this regard is to wake up at 5AM and process the config. + - You can run PMM in the background, telling it to wake up and process your libraries at fixed times during the day. The default behavior in this regard is to wake up at 5AM and process the config. If you leave the `-r` off the commands you have been using in this walkthrough, that's what will happen. -You can skip using that internal schedule and just do manual runs as you have been doing throughout this walkthrough using standard tools available in your OS. + You can control when PMM wakes up with the [time-to-run](../../../home/environmental.md) env-var/runtime flag. -Details on setting this up are found [here](../scheduling.md). + - You can skip using that internal schedule and just do manual runs as you have been doing throughout this walkthrough using standard tools available in your OS. -In addition, individual items *within* the configuration can be scheduled to take place at certain times *provided PMM is running at that time*. For example, you can tell PMM only to apply overlays on Tuesdays or the like. YOu can then schedule manual runs every day at noon and overlays will only get processed when it runs on Tuesday. This sort of schedule *will not* make PMM start up if it is not already running. If you don't arrange for PMM to be run on Tuesday, your overlays would never be processed in this example. + Details on setting this up are found [here](../../../home/guides/scheduling.md). -Details on this level of scheduling are found [here](../../../metadata/details/schedule.md) + - In addition, individual items *within* the configuration can be scheduled to take place at certain times *provided PMM is running at that time*. For example, you can tell PMM only to apply overlays on Tuesdays or the like. YOu can then schedule manual runs every day at noon and overlays will only get processed when it runs on Tuesday. This sort of schedule *will not* make PMM start up if it is not already running. If you don't arrange for PMM to be run on Tuesday, your overlays would never be processed in this example. + + Details on this level of scheduling are found [here](../../../metadata/details/schedule.md) diff --git a/docs/home/guides/wt/wt-editor.md b/docs/home/guides/wt/wt-editor.md index fd0097d7..273fb81f 100644 --- a/docs/home/guides/wt/wt-editor.md +++ b/docs/home/guides/wt/wt-editor.md @@ -1,5 +1,4 @@ ````{tab} Linux -
[type this into your terminal] ``` @@ -23,10 +22,8 @@ sudo apt install nano ``` You can use any other text editor you wish, provided it saves files as PLAIN TEXT. `vi`, `emacs`, etc. -
```` ````{tab} OS X: -
[type this into your terminal] ``` @@ -36,17 +33,14 @@ nano config/config.yml I’m using `nano` here simply because it’s built into OSX. You can use any other text editor you wish, provided it saves files as PLAIN TEXT. BBedit, TextMate, VSCode, etc. A common mistake is using TextEdit.app, which saves files as RTF by default. -
```` ````{tab} Windows: -
[type this into your terminal] ``` notepad .\config\config.yml ``` I’m using `notepad` here simply because it’s built into Windows. You can use any other text editor you wish, provided it saves files as PLAIN TEXT. -
```` From here on in, when this walkthrough says "open the config file", I mean this `nano` or `notepad` command. **Don't copy the template again**. diff --git a/docs/home/guides/wt/wt-save.md b/docs/home/guides/wt/wt-save.md index 59d4d7e1..c3a2a720 100644 --- a/docs/home/guides/wt/wt-save.md +++ b/docs/home/guides/wt/wt-save.md @@ -1,14 +1,9 @@ ````{tab} Linux -
If you're using `nano`, type control-`x`, then `y`, then the enter key. -
```` ````{tab} OS X: -
-If you're using `nano`, type control-`x`, then `y`, then the enter key.
+If you're using `nano`, type control-`x`, then `y`, then the enter key. ```` ````{tab} Windows: -
If you're using `notepad`, type control-`s` or choose `Save` from the `File` menu. -
```` diff --git a/docs/home/guides/wt/wt-test-library.md b/docs/home/guides/wt/wt-test-library.md new file mode 100644 index 00000000..95992bf5 --- /dev/null +++ b/docs/home/guides/wt/wt-test-library.md @@ -0,0 +1,21 @@ +### Prepare a small test library [optional] + +While going through this process, Plex-Meta-Manager is going to load the movies in your library, create some collections, and apply some overlays. If you have a large library, this will be very time-consuming. + +For learning and testing, you would be well-advised to create a small test library of a reasonable size, where reasonable it probably below a thousand. + +The author has a small library of 10 movies that is used for fast tests. + +For best results with this walkthrough, your test library will contain: + + - At least two comedy movies released since 2012. + - At least two movies from the [IMDB top 250](https://www.imdb.com/chart/top/). + - At least two movies from [IMDB's Popular list](https://www.imdb.com/chart/moviemeter). + - At least two movies from [IMDB's Lowest Rated](https://www.imdb.com/chart/bottom). + - A couple different resolutions among the movies. + +That will ensure there's something to go into each of the example collections that will be created. + +The advantage of the small test library is that it will reduce the time needed to see results. Running some of these default collections against a library of a few thousand movies can take hours, and for iterative testing it's useful to have something that will run in a few minutes or seconds. + +You can set up a test library like this using symlinks without copying files.