Based on Color of Berlin, a Twitter Bot by @laurendorman 🐦
Node script which fetches the latest image of the sky in Berlin, detects the color, logs and uploads it to a Firestore project.
- Node
- yarn (or npm)
- Firestore Project
- Clone the project:
git clone [email protected]:piavalentin/mood-of-berlin.git
- Change to the project directory:
cd mood-of-berlin
- Install the project dependencies:
yarn 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:
Depending on rules for Firestore project choose a. firebase-openreadwrite.js
or b. firebase.js
. Update .env
for both accordingly:
SOURCE_IMAGE=
LOCATION=
DB_PATH=
FS_ADMIN=
FS_APIKEY=
FS_AUTHDOMAIN=
FS_PROJECTID=
FS_STORAGEBUCKET=
FG_MESSAGINGSENDERID=
FS_APPID=
FS_MEASUREMENTID=
In the project directory, run node index.js
from the command line.
Idea based on and code forked from Color of Berlin by @laurendorman 🚀 ✨
Meteorology/sky photos sourced from Berlin's official tourism and congress organization webcams at visitBerlin.
Forked color list provided by @gekidoslair.