Skip to content

SimpleForecast is a command line utility that displays the forecast or the current weather from anywhere in the world inside your terminal

License

Notifications You must be signed in to change notification settings

AlexMercan/SimpleForecast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleForecast

SimpleForecast is a command line utility that displays the forecast or the current weather from anywhere in the world inside your terminal.

Install

First, you need to add $GOPATH/bin to your path.

$ git clone https://github.com/AlexMercan/SimpleForecast/
$ cd SimpleForecast
$ go install

Create an account on WeatherApi to obtain your API key.
Add that API key as an environment variable with the name MY_WEATHER_API_KEY

Platforms

  • Windows
  • Linux
  • macOS

Usage examples

To display forecast for the next 2 days in New York, in English:

$ simpleforecast -days 2 -location "New York" -lang en

Output:

ForecastUsageSample

To display the current weather at a certain location, in French:

$ simpleforecast -location "Boston" -lang fr

Output:

image

Command line options

-days     Number of days for the forecast(1 to 3)
-lang     Language for the condition status(sunny, heavy snow, etc.) ( default: en )
-location Location for the weather data(this can be a city name e.g Paris; an ip address e.g:100.0.0.1; latitude and longitude e.g:48.8567,2.3508) (default is location via your ip)

Configuration file

After you run the app for the first time it will create a configuration file called config.json where you can write a default location and language.
On a Windows system this file is located at %AppData%/simpleforecast/config.json .
On a Unix system this file is located either at $XDG_CONFIG_HOME/simpleforecast/config.json or $HOME/.config/simpleforecast/config.json .

About

SimpleForecast is a command line utility that displays the forecast or the current weather from anywhere in the world inside your terminal

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages