Skip to content
/ clweather Public

a small weather forecast script with Unicode symbols for the command line

License

Notifications You must be signed in to change notification settings

0vv1/clweather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

clweather.py

small weather forecast script for the command line
license: GPL v3 script: Python AUR: clweather

cl-weather py.compact   cl-weather py.text

description

Shows 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

install

Just 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