A Twitter bot that tweets the color of the sky in Berlin that was forked to tweet the color of the sky in Montréal.
- Translated colors to French (couleurs.js)
- Added a connection to Web3 to bring these colours onchain on Optimism
This bot fetches the latest image of the sky in Montréal, 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 git@github.com: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. -
Currently tweeting the color of the sky in Montreal with the following account @vncntxyz
Currently using images from Montreal's Traffic camera infrastructure.
Thanks to Lauren Dorman's Color of Berlin
Original repository used Meteorology/sky photos sourced from Berlin's official tourism and congress organization webcams at visitBerlin.
Forked color list provided by @gekidoslair.