Gets current temperature from OpenWeatherMap.org and writes it to a text file. Can be useful for streaming.
- Register on OpenWeatherMap and get an API key (it's free!).
- Search for a city and copy the number after
https://openweathermap.org/city/
. For example, for Los Angeles it's5368361
. - Set a refresh interval in minutes, it has to be greater than 10.
- A file called
weather.txt
with the temperature in Celsius will be created at the same path as the executable. Use that file in OBS or any streaming software to show the current temperature in your stream! The file will be updated at the refresh interval you set before.
- Requisites: Node.js.
- Run
npm install
to download all dependencies. - Run
node index.js
.