This project uses uv
After uv setup it can be run as:
uv run weather.py ./FEED_FILE_PATH ./IMAGE_STORAGE_PATH SLACK_WEBHOOK SLACK_API_KEY SLACK_CHANNEL DISCORD_WEBHOOKYou can also use a .env file to store your configuration instead of passing all arguments on the command line:
-
Copy the example environment file:
cp .env.example .env
-
Edit
.envwith your actual values -
Run with the env file:
uv run weather.py --env-file .env
The following environment variables are supported:
RSS_FILE_PATH- Path to save the RSS feed fileIMAGE_FILE_PATH- Path to save image filesSLACK_WEBHOOK_URL- Slack webhook URLSLACK_TOKEN- Slack API tokenUPLOAD_CHANNEL- Slack channel ID for uploading filesDISCORD_WEBHOOK_URL- Discord webhook URLLOG_FILE- Path to log file (optional)
You can mix command line arguments and environment variables - command line arguments take precedence over environment variables.