Intended as an accompaniment to RandomWallpaperGnome3, this micro-ish service serves up the wallpaper images from a local directory.
Currently it will resize images on the fly, as well as add a border to the image that is the mean colour in the image.
As simple as:
docker run \
-p <Port on host machine>:5000 \
-v <Path to directory of backgrounds>:/data/backgrounds \
--detach --restart always \
--name wallpaper_server \
gordonei/wallpaper_server:latest
- Change to this directory.
- Install python dependencies:
pip3 install -r requirements.txt
- Run the service
PYTHONPATH=. python3 wallpaper_server/server.py
NB this will serve up to any host that contacts it on port 5000
.
- Open the
Settings
menu, go to theWallpaper Sources
table. - Fill in the following settings:
- Select the
Generc JSON
option from the drop down menu. - Make the
Request URL
fieldhttp://127.0.0.1:<port on host machine>/?resolution=<desired resolution, e.g. 3840x2160>
- Make the
JSON Path
field$.backgrounds[@random]
- Make the
Image URL prefix
fieldhttp://127.0.0.1:<port on host machine>/backgrounds/
- Select the