GithubHelp home page GithubHelp logo

wt-fetch's Introduction

wt-fetch

This is a simple, cached, opinionated interface for wttr.in. wt-fetch will compose and display specific weather modules based on an input location. These modules can then be displayed in terminals, status bars, text prompts, etc...

How to Use

Nix

The best way to run this application is to use nix. Nix will include all the dependencies needed to run the application.

# Run from this repository directory.
nix run .#wt-fetch -- --help

# Run from remote repository.
nix run github:siph/wt-fetch#wt-fetch -- --help

Nushell

Nushell is currently very unstable so this method is not recommended but it is compatible with version 0.84.0

# Pass into fresh nushell instance.
nu wt-fetch.nu --help

# Create environment with script shebang.
./wt-fetch.nu --help

Weather Modules

Here is a preview of all the modules wt-fetch currently supports:

{
  "temp": "79°F",
  "condition": "⛅️",
  "wind": "↙2mph",
  "moon": "🌘",
  "humidity": "16%"
}

Displayed as a polybar module:
screenshot

How It Works

Location data fetched from wttr.in will be cached with subsequent calls preferring to use the cache. This provides a more stable and performant way of retrieving up-to-date weather information. If a locations cache is older than the threshold (2 hours by default), wt-fetch will refresh the cache.

wt-fetch's People

Contributors

siph avatar

Watchers

 avatar  avatar

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.