animated WebP "now playing" widgets powered by Last.fm
This repo renders Last.fm "now playing" widgets in headless Chrome, captures per-frame screenshots, and encodes animated WebP files for light and dark themes. The output can be saved locally or uploaded to S3.
docker run \
--rm \
-e LASTFM_USERNAME='your-lastfm-username' \
-e LASTFM_API_KEY='your-lastfm-api-key' \
-e S3_BUCKET_NAME='an-s3-bucket-you-own' \
-e AWS_ACCESS_KEY_ID='access-key-to-upload-to-the-bucket' \
-e AWS_SECRET_ACCESS_KEY='secret-key-to-upload-to-the-bucket' \
-e AWS_REGION='us-east-1' \
ghcr.io/caian-org/lastfm-widget-now-playing:latestjust run lastfm-now-playingRequired env vars:
LASTFM_USERNAME,LASTFM_API_KEY— for all runs.S3_BUCKET_NAME,AWS_REGION,AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY— when built withsave_s3.CHROMIUM_BROWSER_BINARY_PATH(optional) — bypass go-rod's Chromium auto-download for local runs.
devbox shell # enter pinned dev environment
just list # list available targets under cmd/
just build lastfm-now-playing
just test # go test -tags exec_local,save_s3 ./...
just cover # coverage profile
just lint # go vet with build tagsSee AGENTS.md for the build-tag matrix (exec_local/exec_lambda,
save_disk/save_s3) and vendor boundaries.
To the extent possible under law, Caian Ertl has waived all copyright
and related or neighboring rights to this work. In the spirit of freedom of
information, I encourage you to fork, modify, change, share, or do whatever
you like with this project! ^C ^V