Skip to content

hleb-kastseika/daily-wiki-pic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

daily-wiki-pic

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.

Requirements

  • Python 3.13 or higher
  • AWS SAM

How to run locally

1 configure and activate Python virtual environment:

python -m venv venv
source venv/bin/activate

2 install Python dependencies:

pip install -r lambda/requirements.txt

3 configure required environment variables:

export MASTODON_URL=your_value
export MASTODON_TOKEN=your_value
export OPENAI_API_KEY=your_value

4 run the script:

python lambda/app.py

How to build and deploy to AWS

sam build
sam deploy --guided

About

The bot that fetches the picture of the day from Belarusian Wikipedia and posts it to Mastodon.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages