a simple web server serving (scaled) images and color palettes for slideshow.
Find a file
2023-11-28 16:34:10 +01:00
.vscode initial commit 2023-11-28 15:52:53 +01:00
internal fixed module name 2023-11-28 16:34:10 +01:00
.gitignore initial commit 2023-11-28 15:52:53 +01:00
go.mod fixed module name 2023-11-28 16:34:10 +01:00
go.sum initial commit 2023-11-28 15:52:53 +01:00
LICENSE.md initial commit 2023-11-28 15:52:53 +01:00
main.go fixed module name 2023-11-28 16:34:10 +01:00
README.md fixed title 2023-11-28 15:53:13 +01:00
slideshow-api.service initial commit 2023-11-28 15:52:53 +01:00

slideshow-api

a simple web server serving (scaled) images and color palettes for slideshow.

requirements

configuration

configuration is entirely done via environment variables.

variable default description
SLIDESHOW_ADDRESS "0.0.0.0" the listen address of the web server
SLIDESHOW_PORT 3000 the port of the web server
SLIDESHOW_DIRECTORY "$HOME" path to a directory containing images
SLIDESHOW_SCANINTERVAL 60 the interval for directory scans in seconds
SLIDESHOW_RESOLUTION the resolution to which images are scaled (i.e. 1920x1080)
SLIDESHOW_PALETTE_ALGORITHM "wsm" the algorithm used to generate the color palette
SLIDESHOW_PALETTE_COLORS 16 the amount of colors generated
SLIDESHOW_LOGLEVEL "info" the log level

note:
if SLIDESHOW_RESOLUTION is unset the images will served as they are (without any scaling).

available log levels:

  • debug
  • info
  • warning
  • error
  • fatal

color palette

available algorithms:

  • wsm
  • wu

for more information regarding the color palette see color-thief.