Skip to content

piavalentin/mood-of-berlin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mood of Berlin 🌤️

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.


Prerequisites

Initial set-up and installation

  • 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

Create .env file

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=

Detect color and store it

In the project directory, run node index.js from the command line.

Credits and Inspiration

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.

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%