An experimental bot that posts a rundown of your musical week on Mastodon and/or Bluesky.
This clever bot does the following:
- Phones the last.fm API 📲, exchanges pleasantries, asks how their cat is doing 🐈...
- Oh yeah, "can you tell me what has listened to this week?" 🎶
- API kindly hands over the info (or gives us a whack of the handbag if we have no API key).
- We sneakily scrape the last.fm website for the artist pictures 🤫 (better solutions welcome).
- We do some arts and crafts wizardary 🪄 to formulate a collage picture.
- Lastly, the app phones up Mastodon/Bluesky 📞, asks how their turtle is hanging 🐢, and posts the info and picture.
⭐ Collage is made using the power of Python using Pillow for image manipulation, Mastodon and urllib3 for API communication, and lxml for scraping the internet.
There's no official service or method of usage yet! Watch this space 👀
docker run -v ${PWD}/config.json:/opt/app/config.json soupbowl/hot-this-week:latest
The command above uses the Dockerhub image. You can swap soupbowl
out for ghcr.io/soup-bowl
for GitHub container registry.
Append -h
right at the end to see usage instructions. Change 'latest' for 'edge' to get the latest development version (possibly unstable).
The project depends on having Python 3 installed, and don't forget to run poetry install
to grab the project dependencies.
See the configuration example to see how to setup the tool. The following configurations are required for this to work in your own environment:
- last.fm: global
LASTFM_KEY
,LASTFM_SECRET
, and per-userLASTFM_SCAN_USER_NAME
.- You can register an API key here.
- Mastodon: global
MASTODON_URL
,MASTODON_KEY
andMASTODON_SECRET
.- Easily register an application in Preferences, then Development.
- Permissions needed are write:media and write:statuses.
With everything set, you can just run poetry run python -m htw
from CLI, and all the magic should happen. You can see the optional arguments by running poetry run python -m htw --help
.