Skip to content

Latest commit

Β 

History

History
307 lines (272 loc) Β· 12.1 KB

walkthrough.md

File metadata and controls

307 lines (272 loc) Β· 12.1 KB

Getting Started

Tip

If you are an unRAID user, just use the Community app from @nwithan8 it is listed in Store.

  1. Make sure to obtain all the api keys and tokens as you will need them later on for the config.json.

  2. For Docker please continue here: Docker

  3. For Linux/ARM please Start here: ARM

  4. Please install Powershell

  5. If you are on Windows/Linux next step is to clone the repo.

    • switch into the directory on your server where you want the project to land. (Make sure you have git installed)

      Linux:

      cd /opt/appdata

      Windows:

      cd C:\Github
    • Clone the Repo:

      git clone https://github.com/fscorrupt/Posterizarr.git
    • After that you can switch into the cloned Repo/Folder

      cd Posterizarr
    • You should see something like this:

      .
      β”œβ”€β”€ backgroundoverlay.png
      β”œβ”€β”€ config.example.json
      β”œβ”€β”€ docker-compose.yml
      β”œβ”€β”€ images
      β”‚   β”œβ”€β”€ backgroundtesting.png
      β”‚   β”œβ”€β”€ folder.png
      β”‚   β”œβ”€β”€ imagecsv.png
      β”‚   β”œβ”€β”€ kometa-overview.png
      β”‚   β”œβ”€β”€ output.png
      β”‚   β”œβ”€β”€ posterizarr-overview.png
      β”‚   β”œβ”€β”€ posterizarr-xlsm.gif
      β”‚   β”œβ”€β”€ testing.png
      β”‚   β”œβ”€β”€ titlecardtesting.png
      β”‚   β”œβ”€β”€ versioning.png
      β”‚   β”œβ”€β”€ webhook.png
      β”‚   └── webhookexample.png
      β”œβ”€β”€ overlay.png
      β”œβ”€β”€ Posterizarr.ps1
      β”œβ”€β”€ README.md
      β”œβ”€β”€ Release.txt
      └── Rocky.ttf
      
  6. Copy the config.example.json to config.json and adjust the settings.

    • Enter all the api keys and tokens from Getting Started - Step 1 under the ApiPart Detailed Config Description
      • tvdbapi
      • tmdbtoken
      • FanartTvAPIKey
      • PlexToken
    • If you are happy with the default values, you should still ensure that the AssetPath value is set properly.
      • On Linux, like this: /PathToAsset/Dir
      • On Windows, like this: C:\\PathToAsset\\Dir
        • Important - you have to use double \\ in Json.
  7. Please start the Script (On first run, ensure its run as Administrator/Sudo, because it has to install a Powershell Module)

    • Linux:

      cd /opt/appdata/Posterizarr
      sudo pwsh Posterizarr.ps1
      
    • Windows:

      Open the Start menu, type Windows PowerShell, select Windows PowerShell, and then select Run as administrator

      cd C:\Github\Posterizarr
      .\Posterizarr.ps1
      
  8. After that it is recommended to run the script in -Testing Mode.

    In this Mode, the script will create sample posters according to the config settings so you can see how it would look before you mass run it against your libraries. These samples will be created in the test directory

    You can find examples and more information here:

    Info about Testing mode

    Example Images

    • Linux:
      cd /opt/appdata/Posterizarr
      pwsh Posterizarr.ps1 -Testing
      
    • Windows:
      cd C:\Github\Posterizarr
      .\Posterizarr.ps1 -Testing
      
  9. You can now fine tune all the width, height, color of borders, text boxes and text in config.json

    • After each change of a setting just rerun the script in -Testing mode so you can see how it looks.
  10. The final step is to set a schedule and let the script run.

    • You can also trigger the poster creation on-demand, like this:

      • Linux:
        cd /opt/appdata/Posterizarr
        pwsh Posterizarr.ps1
        
      • Windows:
        cd C:\Github\Posterizarr
        .\Posterizarr.ps1
        
    • Configure Scheduled runs:

      Linux:

      • Cron example:

        sudo crontab -e
        

        add a new line like this (every 2 hours):

        0 */2 * * * docker exec posterizarr s6-setuidgid abc pwsh /config/Posterizarr.ps1 >/dev/null 2>&1
        

      Windows:

      • You can create a schedule task -> How-To

Note

Have a look at the Assets Tip

Docker

  1. Adjust the docker-compose.yml to fit your environment.

    • Required environment variables and descriptions can be found here

      Docker-Compose example on Linux:

      ---
      version: "3"
      services:
        posterizarr:
          hostname: "posterizarr"
          container_name: "posterizarr"
          environment:
            - "PGID=1000"
            - "PUID=1000"
            - "TZ=Europe/Berlin"
            - "UMASK=022"
            - "TERM=xterm"
            - "RUN_TIME=10:30,19:30"
          image: "ghcr.io/fscorrupt/docker-posterizarr:latest"
          restart: "unless-stopped"
          volumes:
            - "/opt/appdata/posterizarr:/config:rw"
            - "/opt/appdata/posterizarr/assets:/assets:rw"

      Docker-Compose example on Windows:

      ---
      version: "3"
      services:
        posterizarr:
          hostname: "posterizarr"
          container_name: "posterizarr"
          environment:
            - "TZ=Europe/Berlin"
            - "TERM=xterm"
            - "RUN_TIME=10:30,19:30"
          image: "ghcr.io/fscorrupt/docker-posterizarr:latest"
          restart: "unless-stopped"
          volumes:
            - "C:/Docker/Posterizarr:/config:rw"
            - "C:/Docker/Posterizarr/assets:/assets:rw"
  2. Switch to the Directory where you want to build/start the container and place the docker-compose.yml there.

    πŸŽ₯How-To Video:

    docker

    • Linux:
      cd /opt/appdata
      mkdir Posterizarr
      cd Posterizarr
      docker compose up -d
      
    • Windows:
      cd C:\Github
      mkdir Posterizarr
      cd Posterizarr
      docker compose up -d
      
    • Now it should download everything and start up your container.
  3. On first run the container will download the required files and also create the folder structure for you.

  4. Copy the config.example.json to config.json and adjust the settings.

    • Enter all the api keys and tokens from Getting Started - Step 1 under the ApiPart Detailed Config Description
      • tvdbapi
      • tmdbtoken
      • FanartTvAPIKey
      • PlexToken
    • If you are happy with the default values, you should still ensure that the AssetPath value is set properly.
      • On Linux, like this: /PathToAsset/Dir
      • On Docker you have to use the binded volume path you specified in docker-compose.yml. If you use /assets without an extra volume binding it will create a folder in your scriptroot where all the artwork lands.
        • In the case from above, do not use C:/Docker/Posterizarr/assets or /opt/appdata/posterizarr/assets as asset path, you have to use /assets as path.
      • On Windows, like this: C:\\PathToAsset\\Dir
        • Important - you have to use double \\ in json.
  5. After that it is recommended to run the script in -Testing Mode.

Tip

In this Mode, the script will create sample posters according to the config settings so you can see how it would look before you mass run it against your libraries. These samples will be created in the test directory

You can find examples and more information here:

Info about Testing mode

Example Images

In this example posterizarr is the container name

docker exec -it posterizarr s6-setuidgid abc pwsh /config/Posterizarr.ps1 -Testing
  1. You can now fine tune all the width, height, color of borders, text boxes and text in config.json
    • After each change of a setting just rerun the script in -Testing mode so you can see how it looks.
  2. The final step is to set a schedule and let the script run.
    • You can also trigger the poster creation on-demand, like this:

      docker exec -it posterizarr s6-setuidgid abc pwsh /config/Posterizarr.ps1

ARM Prerequisites

  1. Install Powershell (make an sh file and run it) - Official Link:
    # Prerequisites
    # Update package lists
    sudo apt-get update
    
    # Install dependencies
    sudo apt-get install jq libssl1.1 libunwind8 -y
    
    # Download and extract PowerShell
    # Grab the latest tar.gz
    bits=$(getconf LONG_BIT)
    release=$(curl -sL https://api.github.com/repos/PowerShell/PowerShell/releases/latest)
    package=$(echo $release | jq -r ".assets[].browser_download_url" | grep "linux-arm${bits}.tar.gz")
    wget $package
    
    # Make folder to put powershell
    mkdir ~/powershell
    
    # Unpack the tar.gz file
    tar -xvf "./${package##*/}" -C ~/powershell
    
    # Make Powershell executable PowerShell
    sudo chmod +x ~/powershell/pwsh
    
    # Create Symlink
    sudo ~/powershell/pwsh -command 'New-Item -ItemType SymbolicLink -Path "/usr/bin/pwsh" -Target "$PSHOME/pwsh" -Force'
  2. Install ImageMagick 7:
    # Prerequisites
    sudo apt update 
    sudo apt install build-essential
    apt install libjpeg-dev
    apt install libpng-dev
    apt install libfreetype-dev
    
    # Download/extract
    wget https://imagemagick.org/archive/ImageMagick.tar.gz
    tar xvzf ImageMagick.tar.gz
    cd ImageMagick-7.1.1-34 # Version can differ
    
    # Compilation and Installation
    ./configure 
    make
    sudo make install 
    sudo ldconfig /usr/local/lib
    
    # Check if it is working
    magick -version
  3. Now you can Contuine on Step 5 here: Getting Started

Note

Have a look at the Assets Tip