Added new yml

This commit is contained in:
Guillem Hernandez Sola
2026-04-05 09:04:46 +02:00
parent cce6ff558c
commit 6fdd588179
2 changed files with 164 additions and 61 deletions

119
README.md
View File

@@ -1,37 +1,104 @@
RSS to Bluesky - in Python
--------------------------
# post2bsky
This is a proof-of-concept implementation for posting RSS/Atom content to Bluesky. Some hacking may be required. Issues and pull requests welcome to improve the system.
post2bsky is a Python-based tool for automatically posting content from RSS feeds and Twitter accounts to Bluesky (AT Protocol). It supports both RSS-to-Bluesky and Twitter-to-Bluesky synchronization, with configurable workflows for various sources.
## Features
## Built with:
- **RSS to Bluesky**: Parse RSS feeds and post new entries to Bluesky with proper formatting and media handling.
- **Twitter to Bluesky**: Scrape tweets from specified Twitter accounts and repost them to Bluesky, including media attachments.
- **Daemon Mode**: Run as a background service for continuous monitoring and posting.
- **Configurable Workflows**: Use YAML-based workflows to define sources, schedules, and posting rules.
- **Media Support**: Handle images, videos, and other media from feeds and tweets.
- **Deduplication**: Prevent duplicate posts using state tracking.
- **Logging**: Comprehensive logging for monitoring and debugging.
* [arrow](https://arrow.readthedocs.io/) - Time handling for humans
* [atproto](https://github.com/MarshalX/atproto) - AT protocol implementation for Python. The API of the library is still unstable, but the version is pinned in requirements.txt
* [fastfeedparser](https://github.com/kagisearch/fastfeedparser) - For feed parsing with a unified API
* [httpx](https://www.python-httpx.org/) - For grabbing remote media
## Installation
1. Clone the repository:
```bash
git clone https://github.com/yourusername/post2bsky.git
cd post2bsky
```
## Features:
2. Install Python dependencies:
```bash
pip install -r requeriments.txt
```
* Deduplication: The script queries the target timeline and only posts RSS items that are more recent than the latest top-level post by the handle.
* Filters: Easy to extend code to support filters on RSS contents for simple transformations and limiting cross-posts.
* Minimal rich-text support (links): Rich text is represented in a typed hierarchy in the AT protocol. This script currently performs post-processing on filtered string content of the input feeds to support links as long as they stand as a single line in the text. This definitely needs some improvement.
* Threading for long posts
* Tags
* Image references: Can forward image links from RSS to Bsky
3. Set up environment variables:
Create a `.env` file with your Bluesky credentials:
```
BSKY_USERNAME=your_bluesky_handle
BSKY_PASSWORD=your_bluesky_password
```
## Usage and configuration
For Twitter scraping, additional setup may be required (see Configuration).
1. Start by installing the required libraries `pip install -r requirements.txt`
2. Copy the configuration file and then edit it `cp config.json.sample config.json`
3. Run the script like `python rss2bsky.py`
## Configuration
The configuration file accepts the configuration of:
### RSS Feeds
Use `rss2bsky.py` to post from RSS feeds. Configure the feed URL and other options via command-line arguments.
* a feed URL
* bsky parameters for a handle, username, and password
* Handle is like name.bsky.social
* Username is the email address associated with the account.
* Password is your password. If you have a literal quote it can be escaped with a backslash like `\"`
* sleep - the amount of time to sleep while running
Example:
```bash
python rss2bsky.py --feed-url https://example.com/rss --bsky-handle your_handle
```
### Twitter Accounts
Use `twitter2bsky_daemon.py` for Twitter-to-Bluesky posting. It requires browser automation for scraping.
Configure Twitter accounts in the script or via environment variables.
### Workflows
The `workflows/` directory contains Jenkins pipeline configurations for automated runs. Each `.yml` file defines a pipeline for a specific source (e.g., `324.yml` for 324 RSS feed).
To run a workflow manually, use the `sync_runner.sh` script or execute the Python scripts directly.
## Usage
### Running RSS Sync
```bash
python rss2bsky.py [options]
```
Options:
- `--feed-url`: URL of the RSS feed
- `--bsky-handle`: Your Bluesky handle
- Other options for filtering, formatting, etc.
### Running Twitter Daemon
```bash
python twitter2bsky_daemon.py [options]
```
Options:
- Configure Twitter accounts and Bluesky credentials
- Run in daemon mode for continuous operation
### Using Sync Runner
```bash
./sync_runner.sh
```
This script can be used to run multiple syncs or integrate with cron jobs.
## Dependencies
All Python dependencies are listed in `requeriments.txt`. Key packages include:
- `atproto`: For Bluesky API interaction
- `fastfeedparser`: For RSS parsing
- `playwright`: For browser automation (Twitter scraping)
- `beautifulsoup4`: For HTML parsing
- And many others for media processing, logging, etc.
## License
This project is licensed under the GNU General Public License v3.0. See [LICENSE](LICENSE) for details.
## Contributing
Contributions are welcome! Please open issues or submit pull requests on GitHub.
## Disclaimer
This tool is for personal use and automation. Ensure compliance with the terms of service of Bluesky, Twitter, and any RSS sources you use. Respect rate limits and avoid spamming.