Coder Social home page Coder Social logo

ezzy77 / tempo Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 624 KB

tempo is a command-line tool built in Go using the Cobra framework for checking weather forecasts. Stay informed about the current weather conditions and upcoming forecasts right from your terminal.

License: Other

Go 100.00%
cli cobra command-line go golang weather weather-forecast

tempo's Introduction

tempo

tempo is a command-line tool built in Go using the Cobra framework for checking weather forecasts. Stay informed about the current weather conditions and upcoming forecasts right from your terminal.

Go Report Card License

Note

This cli has been developed on macOS and it works smothly on macOS and linux, however it has not been tested on a Windows machine, since the CLI create a file on your local machine to stores your weather API key I am not sure if it will create file on windows without an error due to windows filesystem being different.

Features

  • Current Weather: Get real-time information about the current weather conditions in your city or worldwide.
  • Forecast: Retrieve a detailed weather forecast for up to 14 days.
  • Location-Based: Search for weather information based on location given as an argument.

Table of Contents

Usage

To use tempo-cli on your machine follow these steps:

  1. Make sure you get your weather API Keys from https://www.weatherapi.com/ you will be prompt to provide your API key when using the CLI
  2. Clone the repository into your local machine and make sure you have Go installed
  3. Run the application with the commands you want to execute

Commands

  1. To set your Weather API Key run this command if the project is opened in VSCode:
     go run main.go setapikey -k <YOUR_API_KEY>

After setting your API key, the key will be saved in a file in your local machine

  1. Getting current weather information of provided city, run:
     go run main.go current -l <CITY>
  1. Getting weather forecast up to 14 days, run:
     go run main.go forecast -l <CITY> -d <NUMBER OF DAY>

Examples

Setting your weather API key:

Alt Text

Getting current weather information of provided city:

Alt Text

Getting weather forecast up to 14 days:

Alt Text

tempo's People

Contributors

ezzy77 avatar

Stargazers

Jose R. Gonzalez avatar

Watchers

 avatar

tempo's Issues

Configuration file should not be directly in HOME folder

The configuration file :

  • seems to be created in home folder with a regular name (which is NOT a good idea - if all programs are doing like this, every home folder would be a mess ...)
  • and seems to not be configurable

Hence, as a suggestion :

  • under windows, the location should be under ~/.tempo/config.json
  • under linux, the location should be under ~/.config/tempo/config.json
    (and lowercase names are probably better)

And/or a --config flag could/should be provided, allowing to override where the config file will be stored.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.