This is a simple weather notification tool.
Once started, it fetches the weather information (current and forecast from MSN Weather) and displays that as a notification. Clicking the notification will open the Weather details page.
Don't forget to fetch the modules:
node app [Location] [Degree Types] [Language]
If parameters are not specified, default values are used:
- Location is a search string, defaults to Bratislava
- Degree Types specifies degree types, can be on of C (Celsius) and F (Fahrenheit), defaults to C
- Language specifies the language for textual information, defaults to sk
Notifications are supported on all operating systems supported by
node-notifier module. Check the node-notifier details here.
Weather information is fetched from MSN weather using the
weather-js module. Check the weather-js details here.
The notification displays:
- Title: Current temperature and location
- Subtitle: Today's forecast (Sky text, min and max temperatures and precipitation)
- Message: Tomorrow's forecast (Sky text, min and max temperatures and precipitation)
- Icon: Today's forecast sky icon
Icon is cached in the
cache subfolder so that future weather checks do not re-download it when not needed.
Scheduling is not part of the tool as there are so many options.
If you run *nix system, you can use cron.
First, edit the crontab with nano editor:
EDITOR=nano crontab -e
In the editor set up the scheduling plan, e.g. to run at every hour, you can specify:
0 * * * * /path/to/node /path/to/weather-notification/app.js
Not sure about cron syntax? Checkout the awesome http://crontab.guru/
To exit the editor simply press the
Ctrl+X and confirm you want to save the file.