Misc scripts and tools. Undocumented scripts probably do what I need them to but aren't finished yet.
-
A system that can run Python 3.7 [or newer]
-
Python 3.7 [or newer] installed on that system
One of the requirements of these scripts is alive-progress 2.4.1, which requires Python 3.7.
-
A basic knowledge of how to run Python scripts.
if you use direnv
:
- clone the repo
- cd into the repo dir
- run
direnv allow
as the prompt will tell you to - direnv will build the virtual env and keep requirements up to date
if you don't use direnv
:
- install direnv
- go to the previous section
ok no
-
clone repo
git clone https://github.com/chazlarson/Media-Scripts.git
-
cd to repo directory
cd Media-Scripts
-
Install requirements with
python3 -m pip install -r requirements.txt
[I'd suggest doing this in a virtual environment]Creating a virtual environment is described here; there's also a step-by-step in the local walkthrough in the Kometa wiki.
Once you have the requirements installed via whatever means, you are ready to set up the script-specific stuff.
-
cd to script directory [
Plex
,Kometa
,TMDB
, etc] for example:cd Plex
-
Copy
.env.example
to.env
Linux or Mac:
cp .env.example .env
Windows:
copy .env.example .env
-
Edit .env to suit your environment [plex url, token, libraries] and your requirements [what to do, where to download things, etc.]; the settings for each script are detailed in the readme within each folder as shown below.
Edit the file with whatever text editor you wish.
-
Run the desired script.
All these scripts use the same .env
and requirements.
- adjust-added-dates.py - fix broken added and perhaps originally available dates in your library
- user-emails.py - extract user emails from your shares
- reset-posters-tmdb.py - reset all artwork in a library to TMDB default
- reset-posters-plex.py - reset all artwork in a library to Plex default
- grab-all-IDs.py - grab [into a sqlite DB] ratingKey, IMDB ID, TMDB ID, TVDB ID for everything in a library from plex
- grab-all-posters.py - grab some or all of the artwork for a library from plex
- image_picker.py - simple web app to make choosing active art from the images downloaded by grab-all-posters simpler
- grab-all-status.py - grab watch status for all users all libraries from plex
- apply-all-status.py - apply watch status for all users all libraries to plex from the file emitted by the previous script
- show-all-playlists.py - Show contents of all user playlists
- delete-collections.py - delete most or all collections from one or more libraries
- refresh-metadata.py - Refresh metadata individually on items in a library
- list-item-ids.py - Generate a list of IDs in libraries and/or collections
- actor-count.py - Generate a list of actor credit counts
- crew-count.py - Generate a list of crew credit counts
- list-low-poster-counts.py - Generate a list of items that have fewer than some number of posters in Plex
See the Plex Scripts README for details.
- extract-collections.py - extract collections from a library
- kometa-trakt-auth.py - generate trakt auth block for Kometa config.yml
- kometa-mal-auth.py - generate mal auth block for Kometa config.yml
- original-to-assets.py - Copy image files from an "Original Posters" directory to an asset directory
- metadata-extractor.py - Back up all metadata into a Kometa-compatible metadata file
See the Kometa Scripts README for details.
- tmdb-people.py - retrieve TMDB images for a list of people
See the TMDB Scripts README for details.