Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/konekoya/weather-forecaster
A bot that sends weather forecast to LINE chat
https://github.com/konekoya/weather-forecaster
Last synced: about 2 months ago
JSON representation
A bot that sends weather forecast to LINE chat
- Host: GitHub
- URL: https://github.com/konekoya/weather-forecaster
- Owner: konekoya
- Created: 2022-01-07T00:40:32.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-19T14:07:07.000Z (3 months ago)
- Last Synced: 2024-07-05T06:20:37.752Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 33.2 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Weather forecaster
A simple app that fetches weather data from [Taiwan Center Weather Bureau](https://www.cwb.gov.tw/V8/C/) and sends the weather forecast to a [LINE](https://notify-bot.line.me/en/) chat via [Notify API](https://notify-bot.line.me/doc/en/). And is triggered and run on a [scheduled cron](https://github.com/konekoya/weather-forecaster/actions) by GitHub Actions
### Usage
1. Copy and rename the `example.env` to `.env` and then replace the keys inside it with your own. You will need to register a API key from [Taiwan Center Weather Bureau](https://www.cwb.gov.tw/V8/C/) and an API key from [Notify API](https://notify-bot.line.me/doc/en/)
2. Run the app via `npm`: `npm run start`
3. You can then hook this up with [GitHub action](https://docs.github.com/en/actions) to trigger the run and send the forecast at specific timesExample output:
![Imgur](https://imgur.com/e6aMPRU.png)
Note that the forecast location is currently hardcoded in the source ([East district, Hsinchu](https://en.wikipedia.org/wiki/East_District,_Hsinchu)), as this is a very simple app built for my own. I'm not planning to expose any configuration just yet
### Third-party API docs
for more info about their API, see the [docs](https://opendata.cwa.gov.tw/dataset/forecast/F-D0047-055), you can even test the API on [Swagger](https://opendata.cwa.gov.tw/dist/opendata-swagger.html?urls.primaryName=openAPI#/%E9%A0%90%E5%A0%B1/get_v1_rest_datastore_F_D0047_055)