this repo has no description
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

*: add README.md

Gee Sawra c851bc5a 80ac5584

+102
+102
README.md
··· 1 + # Skeet.fm 2 + 3 + A Cloudflare Worker that automatically posts your currently playing Last.fm track to Bluesky. 4 + 5 + ## Overview 6 + 7 + This service monitors your Last.fm account for currently playing tracks and automatically creates posts on Bluesky with embedded album art and track information. 8 + 9 + It's designed to run as a scheduled Cloudflare Worker, checking periodically for new songs and avoiding duplicate posts. 10 + 11 + ## Prerequisites 12 + 13 + - A [Cloudflare Workers](https://workers.cloudflare.com/) account 14 + - A [Last.fm](https://www.last.fm/) account with API access 15 + - A [Bluesky](https://bsky.app/) account 16 + - Rust and `wrangler` CLI installed locally for deployment 17 + 18 + ## Configuration 19 + 20 + ### Environment Variables 21 + 22 + Set the following secrets in your Cloudflare Worker: 23 + 24 + | Variable | Description | Required | 25 + |----------|-------------|----------| 26 + | `LASTFM_API_KEY` | Your Last.fm API key | ✅ | 27 + | `LASTFM_USERNAME` | Your Last.fm username | ✅ | 28 + | `BSKY_USERNAME` | Your Bluesky handle (e.g., `user.bsky.social`) | ✅ | 29 + | `BSKY_PASSWORD` | Your Bluesky app password | ✅ | 30 + | `PDS_ADDRESS` | Bluesky PDS URL (defaults to `https://bsky.social`) | ❌ | 31 + 32 + ### KV Namespaces 33 + 34 + Create two KV namespaces in Cloudflare: 35 + 36 + 1. `skeetfm` - Stores posted track history 37 + 2. `skeetfm_blobcache` - Caches album artwork blobs 38 + 39 + ## Deployment 40 + 41 + 1. Clone the repository 42 + 2. Configure your `wrangler.toml` based on what's available in this repository: 43 + 44 + ```toml 45 + name = "skeetfm" 46 + main = "build/index.js" 47 + compatibility_date = "2025-09-19" 48 + 49 + [build] 50 + command = "cargo install -q worker-build && worker-build --release" 51 + 52 + [triggers] 53 + crons = [" * * * * *"] # runs every minute, change it however you prefer 54 + 55 + [observability] 56 + enabled = true 57 + 58 + [[kv_namespaces]] 59 + binding = "skeetfm" 60 + id = "1daf3d0198ef400e9ad03d8495955b03" 61 + preview_id = "1daf3d0198ef400e9ad03d8495955b03" 62 + 63 + [[kv_namespaces]] 64 + binding = "skeetfm_blobcache" 65 + id = "a60098e075e54b50814b2ae06f211c36" 66 + preview_id = "a60098e075e54b50814b2ae06f211c36" 67 + ``` 68 + 69 + 3. Set your secrets: 70 + ```bash 71 + wrangler secret put LASTFM_API_KEY 72 + wrangler secret put LASTFM_USERNAME 73 + wrangler secret put BSKY_USERNAME 74 + wrangler secret put BSKY_PASSWORD 75 + wrangler secret put PDS_ADDRESS # Optional 76 + ``` 77 + 78 + 4. Deploy: 79 + ```bash 80 + wrangler deploy 81 + ``` 82 + 83 + ## Post Format 84 + 85 + Posts appear on Bluesky with: 86 + - **Text**: "🎵🎶 Now Playing 🎤🎧🎸" 87 + - **Embedded Card**: 88 + - Album artwork thumbnail 89 + - Song title 90 + - Artist name 91 + - Link to the Last.fm track page 92 + 93 + ## Limitations 94 + 95 + - Only posts tracks that are currently playing (not recently played) 96 + - Requires active Last.fm scrobbling from your music player 97 + 98 + ## Security Notes 99 + 100 + - Store credentials as encrypted secrets, never in code 101 + - Use app passwords for Bluesky, not your main password 102 + - Consider the privacy implications of sharing your listening habits