Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/j-jith/forecast.sh
Bash script for obtaining weather forecast from yr.no <http://www.yr.no>
https://github.com/j-jith/forecast.sh
weather weather-forecast
Last synced: about 1 month ago
JSON representation
Bash script for obtaining weather forecast from yr.no <http://www.yr.no>
- Host: GitHub
- URL: https://github.com/j-jith/forecast.sh
- Owner: j-jith
- License: mit
- Created: 2017-03-03T16:14:43.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-03T16:42:16.000Z (almost 8 years ago)
- Last Synced: 2023-10-19T18:54:04.269Z (about 1 year ago)
- Topics: weather, weather-forecast
- Language: Shell
- Size: 13.7 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
forecast.sh
===========Bash script for obtaining weather forecast from `yr.no `_.
Prerequisites
-------------- `curl `_
- `xsltproc `_Usage
-----Copy the script ``forecast.sh`` to a location in your ``$PATH`` and run
.. code:: bash
forecast.sh -l location -p period-offset
location
~~~~~~~~Country/State/City (Visit http://www.yr.no to find your ``location``).
**Example**
.. code:: bash
forecast.sh -l India/Tamil_Nadu/Chennai
period-offset (optional)
~~~~~~~~~~~~~~~~~~~~~~~~Forecast is available for the following time periods:
1. 23:30-05:30
2. 05:30-11:30
3. 11:30-17:30
4. 17:30-23:30.``period-offset`` of 0 (default) gives the forecast for the current period. A
value of 1 gives the forecast for the next period and so on.**Example**
.. code:: bash
forecast.sh -l India/Tamil_Nadu/Chennai -p 1
Sample output
~~~~~~~~~~~~~.. code:: bash
[user@host]$ forecast.sh -l India/Tamil_Nadu/Chennai
Chennai, India
Sunrise: 06:23 Sunset: 18:17
Forecast:
From 2017-03-03 23:30 to 2017-03-04 05:30
Outlook: Cloudy 27°C
Wind: Light breeze 2.9 m/s SE
Precipitation: 0 mm
Pressure: 1010.1 hPa