yandex-weather-cli

command module
v0.0.0-...-219a84f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2021 License: MIT Imports: 13 Imported by: 0

README

Command line interface for Yandex weather service

Go Coverage Status Homebrew formula exists yandex-weather-cli Report Card

Install

MacOS via homebrew:

brew tap msoap/tools
brew install yandex-weather-cli
# update:
brew upgrade yandex-weather-cli

Or download binaries from: releases (OS X/Linux/Windows/RaspberryPi)

Or build from source:

go install github.com/msoap/yandex-weather-cli@latest
ln -s $GOPATH/bin/yandex-weather-cli ~/bin/

Or use snap (Ubuntu or any Linux distribution with snap):

# install stable version:
sudo snap install yandex-weather-cli

# install the latest version:
sudo snap install --edge yandex-weather-cli

# update
sudo snap refresh yandex-weather-cli

Get it from the Snap Store

Usage

# weather client by default use your current location
yandex-weather-cli [options] [city]

# options:
-days int
        maximum days to show (default 10)
-json
        get JSON
-no-color
        disable colored output
-no-today
        disable today forecast
-version
        get version

# in another city
yandex-weather-cli kyiv
yandex-weather-cli london

# JSON out
yandex-weather-cli -json london
Environment variables

For setup own yandex.pogoda URL, you may set variables:

  • Y_WEATHER_URL
  • Y_WEATHER_MINI_URL

Screenshot

Screenshot

See also

Documentation

Overview

getColorWriter() for POSIX os-es

utility functions

Command line interface for Yandex weather service (https://pogoda.yandex.ru/)

usage:

go build yandex-weather.go

./yandex-weather
./yandex-weather -no-color
./yandex-weather kyiv

# JSON out
./yandex-weather -json london

https://github.com/msoap/yandex-weather-cli

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL