Giter Site home page Giter Site logo

weather-wrapper's Introduction

weather-wrapper

A bash wrapper for wttr.in.

Usage

A bash wrapper for wttr.in.
Displays weather forecast for a location, or the current phase of the moon.
Options:
-0, --today: Display today's quadripartite weather forecast
-1, --tomorrow: Display tomorrow's
-2, --nextday: Display the next day's
-3, --three: Three-day quad
-c, --city CITY: Specify the location city as CITY, e.g. -c Berlin
-m, --moon: Show the moon phase (location agnostic)
Without any options, display today's simple forecast for your default location

Why a Wrapper?

Firstly, if you're looking for a self-hosted all singing all dancing program that does this: https://github.com/schachmat/wego is a good option, however it requires go and an api key, this program is more portable, only requiring curl. (for moon phase output use https://github.com/chubin/pyphoon)

Also, before this I had never programmed anything in bash so it was a bit of a challenge.

TODO

  • read defaults from config file including default city
    • expand to work with more options
  • make only one curl request when combining -0, -1, -2
  • weather and moon should probably be permitted together, outputs concatenated

weather-wrapper's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

weather-wrapper's Issues

Bug when wttr.in cannot locate

This adds 2 lines to the bottom, effectively breaking the awk method we are using at the moment

Perhaps when we curl we can find a way to get x lines after a certain line instead of just chopping off the head and tail.

Vagueness with city

For example I live in San Jose, USA but the script thinks that I live in the Mexican San Jose as seen here. It might also apply with different cities that also share the same name (e.g. Springfield, Franklin).

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.