mirror of
https://github.com/ewanc26/bluesky-avatar-updater.git
synced 2026-07-21 15:33:15 +00:00
Mirror of github.com/ewanc26/bluesky-avatar-updater
- Rust 92.3%
- Nix 7.7%
| .github/ISSUE_TEMPLATE | ||
| src | ||
| .gitattributes | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| AGENTS.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| flake.nix | ||
| LICENSE | ||
| README.md | ||
Bluesky Avatar Updater
Rotates your Bluesky avatar and banner every hour. Written in Rust.
Features
- Updates avatar and banner on an hourly schedule
- Loads config from
.env - Logs to file with 14-day rotation
- Self-installs as a cron job
Requirements
- Rust 1.85+
Install
git clone https://github.com/ewanc26/bluesky-avatar-updater.git
cd bluesky-avatar-updater
cargo build --release
Create .env in assets/ (or root):
ENDPOINT=https://bsky.social
HANDLE=your_handle.bsky.social
PASSWORD=your_app_password
DID=did:plc:your_did
UPDATE_BANNER=false
Create assets/cids.json with hourly blob mappings:
{
"00": { "avatar": "cid_for_midnight", "banner": "banner_cid_for_midnight" },
"01": { "avatar": "cid_for_1am", "banner": "banner_cid_for_1am" }
}
Usage
cargo run --release
On startup it:
- Loads config
- Checks the endpoint is healthy
- Reads CID mappings from
assets/cids.json - Picks the avatar/banner for the current hour
- Logs into Bluesky, updates the profile
- Makes sure an hourly cron job exists
Files
src/main.rs— Orchestrationsrc/bsky.rs— Bluesky API + blob handlingsrc/cron.rs— Cron job managementsrc/utils.rs— Utilities and env validationassets/cids.json— Hour-to-CID mappings
Licence
MIT