All Projects → fcambus → Ansiweather

fcambus / Ansiweather

Licence: bsd-2-clause
Weather in terminal, with ANSI colors and Unicode symbols

Programming Languages

shell
77523 projects
Roff
2310 projects

Projects that are alternatives of or similar to Ansiweather

Wego
weather app for the terminal
Stars: ✭ 6,918 (+316%)
Mutual labels:  terminal, weather
Asciichart
Nice-looking lightweight console ASCII line charts ╭┈╯ for NodeJS, browsers and terminal, no dependencies
Stars: ✭ 1,107 (-33.43%)
Mutual labels:  terminal, ansi
Unicute
💙 Cute Unicode symbols. Make the terminal GREAT AGAIN
Stars: ✭ 35 (-97.9%)
Mutual labels:  terminal, ansi
Chafa
📺🗿 Terminal graphics for the 21st century.
Stars: ✭ 774 (-53.46%)
Mutual labels:  terminal, ansi
Terminal Canvas
Manipulate the cursor in your terminal via high-performant, low-level, canvas-like API
Stars: ✭ 125 (-92.48%)
Mutual labels:  terminal, ansi
Pixterm
Draw images in your ANSI terminal with true color
Stars: ✭ 782 (-52.98%)
Mutual labels:  terminal, ansi
Rang
A Minimal, Header only Modern c++ library for terminal goodies 💄✨
Stars: ✭ 1,080 (-35.06%)
Mutual labels:  terminal, ansi
Termenv
Advanced ANSI style & color support for your terminal applications
Stars: ✭ 555 (-66.63%)
Mutual labels:  terminal, ansi
Unicode Display width
Monospace Unicode character width in Ruby
Stars: ✭ 98 (-94.11%)
Mutual labels:  terminal, unicode
Lehar
Visualize data using relative ordering
Stars: ✭ 81 (-95.13%)
Mutual labels:  terminal, unicode
Unibits
Visualize different Unicode encodings in the terminal
Stars: ✭ 125 (-92.48%)
Mutual labels:  terminal, unicode
Tendo
Official repository of python tendo library, always welcoming new contributions.
Stars: ✭ 113 (-93.21%)
Mutual labels:  unicode, ansi
Unicodeplots.jl
Unicode-based scientific plotting for working in the terminal
Stars: ✭ 724 (-56.46%)
Mutual labels:  terminal, unicode
Git Praise
A nicer git blame.
Stars: ✭ 24 (-98.56%)
Mutual labels:  terminal, unicode
Imgcat
It's like cat, but for images.
Stars: ✭ 577 (-65.3%)
Mutual labels:  terminal, ansi
Colorette
Easily set the color and style of text in the terminal.
Stars: ✭ 1,047 (-37.04%)
Mutual labels:  terminal, ansi
Colorful
Terminal string styling done right, in Python 🐍 🎉
Stars: ✭ 456 (-72.58%)
Mutual labels:  terminal, ansi
Termplay
GitLab: https://gitlab.com/jD91mZM2/termplay
Stars: ✭ 500 (-69.93%)
Mutual labels:  terminal, ansi
Progress.c
Progress display lib for c
Stars: ✭ 67 (-95.97%)
Mutual labels:  terminal, ansi
Plotille
Plot in the terminal using braille dots.
Stars: ✭ 99 (-94.05%)
Mutual labels:  terminal, unicode

Description

AnsiWeather is a Shell script for displaying the current weather conditions in your terminal, with support for ANSI colors and Unicode symbols.

AnsiWeather Screenshot

Weather data comes from the OpenWeatherMap free weather API.

Requirements

AnsiWeather requires the following dependencies:

  • A command to fetch HTTP data such as FTP, cURL or wget
  • jq (lightweight and flexible command-line JSON processor)
  • bc (arbitrary precision numeric processing language), for doing float arithmetic

Installation

After cloning the repository, simply invoke the script by typing:

./ansiweather

AnsiWeather packages are available for:

Usage

Synopsis

ansiweather [-l location] [-u system] [-f days] [-F] [-a value]
            [-s value] [-k key] [-i value] [-w value] [-h value]
            [-H value] [-p value] [-d value] [-v]

Options

-l location
        Specify location.

-u system
        Specify unit system to use ( metric or imperial ).

-f days
        Toggle forecast mode for the specified number of upcoming days.

-F      Toggle forecast mode for the next five days.

-a value
        Toggle ANSI colors display ( true or false ).

-s value
        Toggle symbols display ( true or false ).

-k key  Specify OpenWeatherMap API key.

-i value
        Toggle UV Index display ( true or false ).

-w value
        Toggle wind data display ( true or false ).

-h value
        Toggle humidity data display ( true or false ).

-H value
        Toggle Feels like display ( true or false ).

-p value
        Toggle pressure data display ( true or false ).

-d value
        Toggle daylight data display ( true or false ).

-v      Display version.

Examples

Display forecast using metric units for the next five days (showing symbols and daylight data) for Rzeszow, Poland:

ansiweather -l Rzeszow,PL -u metric -s true -f 5 -d true

Configuration

The default config file is ~/.ansiweatherrc. The environment variable ANSIWEATHERRC can be set to override this. The following configuration options (detailed below) are available and should be set according to your location and preferences.

Example: ~/.ansiweatherrc

location:Rzeszow,PL
fetch_cmd:ftp -V -o -
units:metric
show_daylight:true

The file ansiweatherrc.example contains all available configuration variables.

Location

Location format is city,CC where CC is a two-letter ISO 3166-1 alpha-2 country code. A list of country codes is available here. Alternatively, it's also possible to specify locations by their ID, a city list is available here.

In case no location is specified, AnsiWeather will fallback to the default location.

Example: Rzeszow,PL

location:Rzeszow,PL

Fetch Command

Various tools can be used to fetch data: curl, wget, ftp.

Please note that ftp flags and options might differ among implementations and versions, and the example provided here is known to work only on OpenBSD and NetBSD.

Example: curl -sf

fetch_cmd:curl -sf

Example: wget -qO-

fetch_cmd:wget -qO-

Example: ftp -V -o -

fetch_cmd:ftp -V -o -

Default: curl -sf

System of Units

Both metric and imperial systems are supported.

units:metric

Default: metric

Display ANSI sequences

Toggle ANSI sequences display. Value can be either true (requires an ANSI capable display) or false.

ansi:true

Default: true

Display symbols

Toggle Unicode symbols display. Value can be either true (requires a Unicode capable display) or false.

symbols:true

Default: false

Symbols can be configured or replaced by custom text using the following configuration variables: sun, moon, clouds, rain, fog, mist, haze, snow, thunderstorm.

Display forecast

Show upcoming forecast for the next N days (for 0 <= N <= 7). 0 will show standard output.

forecast:5

Default: 0

Display wind / humidity / pressure

Toggle UV Index, wind, humidity, and/or pressure display. Values can be either true or false.

show_uvi:true
show_wind:true
show_humidity:true
show_pressure:true

Default: true

Display sunrise / sunset

Toggle daylight display. Value can be either true or false.

show_daylight:false

Default: false

Date and Time format

Configure date and time format display. See Unix date formatting docs for details.

dateformat:%a %b %d

Default: %a %b %d

timeformat:%b %d %r

Default: %b %d %r

OpenWeatherMap API key

Specify an OpenWeatherMap API key. By default AnsiWeather uses its own key, but users can optionally get their own one by creating a free OpenWeatherMap account.

api_key:85a4e3c55b73909f42c6a23ec35b7147

License

AnsiWeather is released under the BSD 2-Clause license. See LICENSE file for details.

Author

AnsiWeather is developed by Frederic Cambus.

Resources

GitHub: https://github.com/fcambus/ansiweather

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].