This project makes your Twitter header behave like a clock. Internally, it
-
creates a image in which a date string is displayed,
-
and uploads the image as a header image
every 60 seconds.
Fig: An example result. The Sun or the Moon does move as time passes. |
Each created image has the size shown below. Thus it is estimated that the application will upload tens of megabytes of data to Twitter per day.
png without the Sun (grayscale) | jpg with the Sun (RGB) |
---|---|
10KB | 30KB |
- An account for Twitter Developer (see Preparations)
-
Credentials
-
Create an account for Twitter Developer.
-
Get API keys from the developer center.
-
Create a file
twitter_credentials.json
in this project directory. It shall be of the form
{ "api_key": "<api key>", "api_secret_key": "<api secret key>", "access_token": "<access token>", "access_token_secret": "<access token secret>" }
-
-
Parameters
- Change the contents of
./config.json
as you like. This file specifies a directory for temporary files, the name of a font, and so on.
- Change the contents of
$ python3 ./twitter_header_clock.py
or
$ docker compose build
$ docker compose up -d