Skip to content

Hiumee/square-posters

Repository files navigation

Sqare posters

This is a web application that returns square posters for movies and tv shows. It uses the TMDB API and gets the top part of the poster to a size of 512x512 including a 6-pixels wide border.

The search is based on the name or an id (only IMDB and TMDB currently, for TMDB media type has to be set). If both are given, the id will be checked first and then the name if none was found. An aditional media type parameter can be passed to filter between movies and tv.

Used mainly with this Kodi addon to give Discord an endpoint for its rich presence feature.

Example

Path /?name=godfather /?name=avatar /?name=avatar&type=tv /?id=tt0944947
Result

Build

Setup

Go 1.17 or newer is needed

A TMDB API key is needed in the TMDB_APIKEY environment variable.

Local

An optional PORT environment variable can be supplied. Defaults to 8080

The program can be executed with

go run .
# OR
go build .
./square-posters

Deploy

This repository supports deployment to Heroku and AWS Lambda

The repository can be simply linked to a Heroku application.

For AWS Lambda execute one of the build-aws.sh or build-aws.ps1 depending on your platform. Then uploaded the resuling main.zip file to a lambda function.

About

A tool that creates sqare images from movie or tv posters

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published