This repository contains automation and assets for the bousetravels.world project, including:
- Automated RSS-to-Bluesky posting via the
rss2socialspackage. - Pre-commit hook for image resizing to ensure all JPGs in
assets/images/are web/social-media optimized.
- Fetches new entries from your RSS feed and posts them to Bluesky with rich social cards.
- Deduplication: Tracks already-posted links to avoid reposting.
- OpenAI Summarization: Generates concise, hashtagged summaries for each post.
- Open Graph Metadata Extraction: Fetches and attaches title, description, and image as a social card.
- Configurable via environment variables for easy CI/CD or scheduled automation.
- Robust error handling, Unicode support, and modular codebase.
The automation is designed to run via GitHub Actions or locally using the
rss2socialsPyPI package.
- Automatically resizes JPGs in
assets/images/to a maximum of 1200x630 pixels (maintaining aspect ratio) before every commit. - Prevents large images from being committed, ensuring fast load times and optimal display on social media.
- Uses pre-commit for seamless integration with git.
# Create and activate a Python virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Upgrade pip and install required packages
pip install --upgrade pip
pip install pre-commit rss2socials pillow
# Install pre-commit hooks
pre-commit installThis repository uses the following .pre-commit-config.yaml:
repos:
- repo: local
hooks:
- id: resize-jpgs
name: Resize JPGs in assets/images
entry: python assets/images/resize_jpgs.py
language: system
files: ^assets/images/.*\.jpg$
staged: true- The hook will run
assets/images/resize_jpgs.pyon any staged.jpgfiles inassets/images/and re-stage them if modified.
- The automation is intended to be run via GitHub Actions or a similar scheduler.
- Configure your environment variables (see below) in your CI/CD or local environment.
- The main automation logic is provided by the
rss2socialspackage.
- Any time you commit
.jpgfiles inassets/images/, the pre-commit hook will automatically resize them if needed. - No manual action is required—just commit as usual!
Set the following environment variables for the RSS-to-Bluesky automation:
RSS_FEED_URL: The URL of your RSS feed. (Required)BLUESKY_HANDLE: Your Bluesky handle (e.g.,user.bsky.social). (Required)BLUESKY_APP_PASSWORD: Your Bluesky app password. (Required)OPENAI_API_KEY: Your OpenAI API key. (Required)SEEN_FILE: (Optional) Path to the file used for deduplication. Defaults toseen_rss_posts.txtif not set.POST_AGE_LIMIT_DAYS: (Optional) Maximum age (in days) for RSS entries to be posted. Defaults to 7 if not set.
- Recommended size: 1200x630 pixels (1.91:1 aspect ratio)
- Recommended file size: Under 1 MB (ideally 200–500 KB)
- Format: JPEG
The pre-commit hook will help enforce these recommendations automatically.
MIT
- Fork and clone the repo.
- Set up your Python environment and install pre-commit as described above.
- Make your changes and commit—image resizing will happen automatically!
- Open a pull request.
Open an issue or contact the maintainer via bousetravels.world.