Subscribe and post RSS feeds to Bluesky
rss bluesky
1# Bluesky RSS Post 2 3Tool to automatically post on Bluesky when new items are added to RSS/Atom feeds. 4 5Supports: 6 7- Multiple feeds posting to a single account 8- Different feeds posting to different accounts 9- Flexible configuration via YAML config file 10 11## Installation 12 13### Go Binary 14 15```bash 16go install pkg.rbrt.fr/bskyrss@latest 17``` 18 19### Docker 20 21```bash 22docker run -d \ 23 --name bksyrss \ 24 -v $(pwd)/config.yaml:/config.yaml \ 25 -v $(pwd)/data:/data \ 26 -e BSKY_PASSWORD="your-app-password" \ 27 bksyrss \ 28 -config /config.yaml 29``` 30 31## Usage 32 33### Basic Setup 34 35bskyrss requires a YAML configuration file to run. Create a `config.yaml` file: 36 37```yaml 38accounts: 39 - handle: "your-handle.bsky.social" 40 password: "${BSKY_PASSWORD}" 41 feeds: 42 - "https://example.com/feed.xml" 43``` 44 45Set your password as an environment variable: 46 47```bash 48export BSKY_PASSWORD="your-app-password" 49``` 50 51Run bskyrss: 52 53```bash 54./bskyrss -config config.yaml 55``` 56 57### Multiple Feeds to One Account 58 59```yaml 60accounts: 61 - handle: "your-handle.bsky.social" 62 password: "${BSKY_PASSWORD}" 63 feeds: 64 - "https://example.com/feed.xml" 65 - "https://blog.example.com/rss" 66 - "https://news.example.com/atom.xml" 67``` 68 69### Multiple Accounts with Different Feeds 70 71Map different feeds to different Bluesky accounts: 72 73```yaml 74accounts: 75 - handle: "tech-news.bsky.social" 76 password: "${BSKY_PASSWORD_TECH}" 77 feeds: 78 - "https://hackernews.com/rss" 79 - "https://techcrunch.com/feed" 80 81 - handle: "personal.bsky.social" 82 password: "${BSKY_PASSWORD_PERSONAL}" 83 feeds: 84 - "https://personal-blog.com/feed.xml" 85 86interval: "15m" 87``` 88 89Set environment variables: 90 91```bash 92export BSKY_PASSWORD_TECH="tech-app-password" 93export BSKY_PASSWORD_PERSONAL="personal-app-password" 94./bskyrss -config config.yaml 95``` 96 97See [`config.example.yaml`](config.example.yaml) for a complete example with all options. 98 99## Bluesky Authentication 100 101### App Passwords (Recommended) 102 103It's recommended to use an App Password instead of your main account password: 104 1051. Go to Bluesky Settings → App Passwords 1062. Create a new App Password 1073. Use this password in your config file (via environment variable) 108 109### Environment Variables 110 111Passwords should be provided via environment variables for security: 112 113```yaml 114accounts: 115 - handle: "user.bsky.social" 116 password: "${BSKY_PASSWORD}" # References $BSKY_PASSWORD env var 117``` 118 119Supported formats: 120 121- `${VAR_NAME}` - Standard format 122- `$VAR_NAME` - Short format 123 124### Self-hosted PDS 125 126If you're using a self-hosted Personal Data Server: 127 128```yaml 129accounts: 130 - handle: "your-handle.your-pds.com" 131 password: "${BSKY_PASSWORD}" 132 pds: "https://your-pds.com" 133 feeds: 134 - "https://example.com/feed.xml" 135``` 136 137## Post Format 138 139Posts are formatted as follows: 140 141``` 142{Title} 143 144{Link} 145``` 146 147- Posts are automatically truncated if they exceed Bluesky character limit 148- Links are automatically detected and formatted as clickable links 149- If the title is too long, it will be intelligently truncated at word boundaries 150 151## Storage 152 153The tool maintains a simple text file (default: `posted_items.txt`) containing the GUIDs of all posted items. This ensures that items are not posted multiple times, even if the tool is restarted. 154 155The storage file contains one GUID per line and is safe to manually edit if needed. 156 157### Multiple Accounts 158 159When using multiple accounts, separate storage files are automatically created for each account (e.g., `posted_items_user1_bsky_social.txt`, `posted_items_user2_bsky_social.txt`). This ensures that each account tracks its own posted items independently. 160 161You can also specify custom storage files per account in the configuration file: 162 163```yaml 164accounts: 165 - handle: "user1.bsky.social" 166 storage: "custom_storage_user1.txt" 167 password: "${BSKY_PASSWORD_1}" 168 feeds: 169 - "https://feed1.com/rss" 170``` 171 172### First Run Behavior 173 174To prevent spam when starting the tool for the first time: 175 176- **First Run (empty storage file)**: All existing feed items are marked as "seen" without posting. Only new items that appear _after_ the program starts will be posted. 177- **Subsequent Runs**: New items since the last check are posted normally (backfill from last posted item). 178 179This ensures you don't flood Bluesky with the entire feed history when you first set up the tool. 180 181## License 182 183[MIT](license).