Wx Twitter Bot
Project description
Wx Twitter Bot
A bot that tweets about the weather.
Capabilities
- Solar Times (sunrise, noon, sunset)
- Lunar Times (moonrise, illumination, moonset)
- Air Quality
Quick Start
In order to use this application with Twitter, developer credentials are required. Get them here.
Command Line
To run this application via the command line, execute the following from the project root directory:
python src/main.py [options]
Options:
Name | Description |
---|---|
--app-root |
Path to the application root directory which contains the .env file. |
Docker
This application can be run in a docker container using a published image.
For example:
docker pull ghcr.io/karjanme/wx-twitter-bot:latest
Configure the TZ
environment variable when setting up the container.
Required volume mapping:
Volume | Description |
---|---|
/app |
Must point to a directory on your host which contains the .env file. The appliation will create subdirectories to facilitate runtime needs. |
Environment Variables
The following variables can be set using a .env
file placed in the application root directory.
Name | Description |
---|---|
LOG_LEVEL |
(optional) Specifies the level of logging to use when executing the application (Default = "INFO") |
LOCATION |
A label for the location associated the this instance of the application |
REGION |
A label for the location's region associated with this instance of the application |
TIMEZONE |
The timezone name for the location associated with this instance of the application from the "tz database" |
LATITUDE |
The latitude for the location associated with this application, decimal format |
LONGITUDE |
The longitude for the location associated with this application, decimal format |
AIR_NOW_API_KEY |
The key for the AirNow API |
TWITTER_CONSUMER_KEY |
The consumer key for the Twitter API |
TWITTER_CONSUMER_SECRET |
The consumer secret for the Twitter API |
TWITTER_ACCESS_TOKEN |
The access token for the Twitter API |
TWITTER_ACCESS_TOKEN_SECRET |
The access token secret for the Twitter API |
TWITTER_BEARER_TOKEN |
The bearer token for the Twitter API |
TWITTER_HASHTAG |
(optional) Text to be appended to all tweets as a hashtag |
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file wxtwitterbot-1.3.2-py3-none-any.whl
.
File metadata
- Download URL: wxtwitterbot-1.3.2-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f83e1fe20389fc135ebabf7c0395d62ca06355ddeaefafbae265639a44f4007f |
|
MD5 | b4eb81c775554a84f5a73235b8b79617 |
|
BLAKE2b-256 | 2ed69546995fdb76c5a2b5457480768102869c43cc634a79fa2880933c4b76a6 |