The FIA F1 Docs Bot is an automated tool designed to fetch the latest Formula 1 decision documents from the FIA website and post them on a Threads account with AI summarization.
IMPORTANT NOTICE: This project is not affiliated with, endorsed by, or in any way officially connected to the Fédération Internationale de l'Automobile (FIA), Formula 1, Formula One Management (FOM), or any of their subsidiaries or affiliates. This is an independent, unofficial project created for informational purposes only. All product and company names are the registered trademarks of their original owners. The use of any trade name or trademark is for identification and reference purposes only and does not imply any association with the trademark holder of their product brand.
This bot aims to make FIA F1 decision documents more accessible by automatically posting them to a Threads account with AI summarization. It's designed for F1 fans and professionals who want quick access to official FIA communications.
- Automated Scraping: Periodically scrapes the FIA website for the latest decision documents.
- Automated Posting: Posts the fetched documents to a specified Threads account.
- Docker Support: Easily deployable using Docker for consistent environments.
- Scraping: The bot scrapes the FIA website at a user-defined interval to check for new decision documents.
- Processing: New documents are converted to images and uploaded to Imgur to get public URLs.
- Posting: The bot automatically posts the images to the configured Threads account.
- Docker and Docker Compose (for containerized deployment)
- Go 1.22+ (for local development)
- Threads API access (see Limitations section)
- Imgur account for image hosting
- Google Gemini API for AI summarization (Can be skipped if not needed)
-
Pull the Docker image:
docker pull ptirth/fia-f1-docs-bot:latest
-
Create a
.env
file with the following variables:FIA_URL=https://www.fia.com/documents/championships/fia-formula-one-world-championship-14/season/season-2024-2043 DOCUMENT=file.json IMGUR_CLIENT_ID=your_imgur_client_id_here SCRAPE_INTERVAL=300 THREADS_USER_ID=your_threads_user_id_here THREADS_ACCESS_TOKEN=your_threads_access_token_here GEMINI_API_KEY=your_google_gemini_api_key_here
-
Create a
docker-compose.yml
file:services: bot: image: ptirth/fia-f1-docs-bot:latest env_file: .env volumes: - ./data:/app/data restart: unless-stopped
-
Run the bot:
docker-compose up -d
-
Clone the repository:
git clone https://github.com/tirthpatell/fia-f1-docs-bot.git cd fia-f1-docs-bot
-
Install dependencies:
go mod download
-
Configure the bot:
- Create a
.env
file in the project root with the necessary environment variables (see Docker setup for required variables).
- Create a
-
Build the project:
go build -o bot ./cmd/svc/main.go
-
Run the bot:
./bot
The bot is configured using environment variables. See the Quick Start section for the required variables.
Contributions are welcome! Here's how you can contribute to the project:
- Fork the repository
- Create a new branch:
git checkout -b feature-branch-name
- Make your changes and commit them:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature-branch-name
- Submit a pull request
If you discover any security-related issues, please email [[email protected]] instead of using the issue tracker. All security vulnerabilities will be promptly addressed.
- This bot relies on the Threads API, which may have rate limits or require special access. Ensure you have the necessary permissions before deploying.
- The bot's functionality is dependent on the structure of the FIA website. Changes to their website may require updates to the scraping logic.
This project is licensed under the MIT License. See the LICENSE
file for details.