A Twitter bot that tweets the color of the sky in Berlin.
This bot fetches the latest image of the sky in Berlin, crops and places it on an HTML5 Canvas, picks the color and matches it against a color list, fills a new Canvas with the color that was matched, then tweets the color name, image, and HEX value.
- Node
- npm
- Twitter account, Twitter developer account, and Twitter developer app
- Twitter app API keys and user access tokens
- Clone the project:
git clone [email protected]:laurendorman/color-of-berlin.git
- Change to the project directory:
cd color-of-berlin
- Install the project dependencies:
npm install
In the project root, create an .env
file or make a copy of the .env.example
file, containing the following environment variables with the required values:
TWITTER_API_CONSUMER_KEY=
TWITTER_API_CONSUMER_SECRET=
TWITTER_API_TOKEN=
TWITTER_API_TOKEN_SECRET=
SOURCE_IMAGE=
LOCATION=
- In the project directory, run
node index.js
from the command line to send a tweet.
Meteorology/sky photos sourced from Berlin's official tourism and congress organization webcams at visitBerlin.
Forked color list provided by @gekidoslair.