Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/0vv1/clweather
a small weather forecast script with Unicode symbols for the command line
https://github.com/0vv1/clweather
api-client command-line command-line-tool weather weather-conditions weather-forecast
Last synced: 2 days ago
JSON representation
a small weather forecast script with Unicode symbols for the command line
- Host: GitHub
- URL: https://github.com/0vv1/clweather
- Owner: 0vv1
- License: gpl-3.0
- Created: 2019-04-26T23:24:35.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-21T17:07:49.000Z (8 months ago)
- Last Synced: 2024-03-21T18:28:21.732Z (8 months ago)
- Topics: api-client, command-line, command-line-tool, weather, weather-conditions, weather-forecast
- Language: Python
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# clweather.py
small weather forecast script for the command line
[![license: GPL v3](https://img.shields.io/badge/license-GPL--3.0-3da638.svg?style=flat-square&logo=gnu)](https://opensource.org/licenses/GPL-3.0)
[![script: Python](https://img.shields.io/badge/script-Python-3776ab.svg?style=flat-square&logo=python)](https://python.org)
[![AUR: clweather](https://img.shields.io/badge/AUR-clweather-1793d1.svg?style=flat-square&logo=arch-linux)](#install)
![cl-weather py.compact](https://0vv1.net/assets/img/cl-weather.2019-11-22_tint2-compact.png) ![cl-weather py.text](https://0vv1.net/assets/img/cl-weather.2019-11-22_tint2-text.png)
## descriptionShows weather forecast on the command line. Defaults to the next coming measuring point in time.
Uses the forecast API of OpenWeatherMap and therefore needs an API key from OWM.
Free of charge for personal use at https://openweathermap.org.
## features* shows __Unicode symbol__ by default depending on weather condition and daytime..
* in order to show (the correct) Unicode symbols the used font needs to be patched with Weather Icons e.g. NerdFonts containing the nf-weather group icons
* Weather Icons originally designed by Lukas Bischoff (https://artill.de)
(see https://github.com/ryanoasis/nerd-fonts for details)
* ..but has a switch to toggle to '__text mode__ only'
* if no geo location is provided via cl argument the API of a location provider is called to determine the __current location__
* has a switch to use __imperial__ units instead of (default) __metric__
* shows __location__ of the used __weather station__ if the parameter `-p` is set
## installJust put the executable script anywhere inside your `$PATH` or link to it from elsewhere.
There also is an AUR package at https://aur.archlinux.org/packages/clweather.
### depends on* `python` to interpret the script
* python lib `argparse` for use of command line parameters
* python lib `requests` to grab JSON data from online APIs
## synopsis
execute `clweather.py [option(-s) ..] KEY`
or `clweather [option(-s) ..] KEY` (if installed systemwide via `PKGBUILD`)### mandatory argumenent
`KEY` to access weather forecast API
### options
`-h, --help` shows help message and exits
`-i, --imperial` switches to imperial units
`--latitude LAT` uses latitude of a location
`--longitude LONG` uses longitude of a location
`-p, --place` shows location of weather station
`-t, --text` prints text instead of symbols