Skip to content

Python program for automatically generating show images.

Notifications You must be signed in to change notification settings

UniversityRadioYork/URYShowImageGen

Folders and files

NameName
Last commit message
Last commit date
Feb 22, 2020
Dec 16, 2017
Oct 12, 2023
Sep 10, 2023
Nov 22, 2016
Sep 14, 2023
Sep 10, 2023
Nov 18, 2016
Nov 18, 2016
Nov 28, 2016
Oct 10, 2016
Feb 17, 2024
Jun 22, 2022
May 28, 2020
Sep 14, 2023
May 14, 2020

Repository files navigation

URYShowImageGen

Python program for automatically generating show images.

The show image is created by selecting a background image (dark filtered image currently manually croped to a square of 800px by 800px), it then has a branding image applied which is designed for each style (e.g. OB, Speech, Music, News).

Installation

Clone this repository. Run python3 -m venv venv, and venv/bin/pip install -r requirements.txt.

Usage

See run.sh for an example of running as a cron job task.

Parameters

--apikey The API key from MyRadio that can retrieve all shows for the current term, and set show images.

--debug Logs loads to the screen to show you what it screwed up.

--outputdir Where this script will create the images on the local filesystem.

--apidir MyRadio API requires images to already be on the API server, if this is different from --outputdir, enter this.

Docker

Docker will run the daemon.py file, calling the ShowImageGen once an hour.

  • Build the image: docker build -t show-image-gen .

  • Set the .env file. As DEBUG_MODE and DRY_RUN are booleans, set 1 for true, 0 for false.

  • Run the container, mounting the ouput directory to /tmp/showimages (not needed with direct myradio uploads), and adding the .env, i.e.:

    docker run -v /mnt/showimages:/tmp/showimages --env-file .env -d --name show-image-gen show-image-gen

About

Python program for automatically generating show images.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published