This is a small Python bot that fetches the picture of the day from Belarusian Wikipedia and posts it to Mastodon. It also generates suitable hashtags from the image caption using ChatGPT. It's implemented as an AWS Lambda function which is scheduled to run daily. Also it can be run locally.
- Python 3.13 or higher
- AWS SAM
1 configure and activate Python virtual environment:
python -m venv venv
source venv/bin/activate2 install Python dependencies:
pip install -r lambda/requirements.txt3 configure required environment variables:
export MASTODON_URL=your_value
export MASTODON_TOKEN=your_value
export OPENAI_API_KEY=your_value4 run the script:
python lambda/app.pysam build
sam deploy --guided