Skip to content

CLI that outputs suitable clothing depending on your location

Notifications You must be signed in to change notification settings

cemalokten/sweater-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sweater CLI

A simple command-line interface (CLI) written in Go, which outputs coat, sweater or t-shirt depending on your location and weather.

Sweater CLI (London, UK)

Requirements

  • Go 1.13 or later
  • An API key for OpenWeatherMap

Usage

  1. Clone the repository:

git clone https://github.com/cemalokten/sweater

  1. Run the program with the following flags:

go run sweater.go -apikey YOUR_API_KEY -town TOWN_NAME -country COUNTRY_CODE

For example:

go run sweater.go -apikey 1234567890 -town London -country UK

Configuration

The program stores the API key, town, and country in a config.json file. If you provide these values as flags, the program will update the configuration file accordingly.

You can also edit the config.json file manually to set the default API key, town, and country for the application:

{
  "api_key": "123456789",
  "town": "London",
  "country": "UK"
}

Replace YOUR_API_KEY, TOWN_NAME, and COUNTRY_CODE with your desired values.

About

CLI that outputs suitable clothing depending on your location

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages