GithubHelp home page GithubHelp logo

makls / makl.weather Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 50 KB

PowerShell module for getting the current weather report

License: GNU General Public License v3.0

PowerShell 100.00%
powershell weather weather-report

makl.weather's People

Contributors

makls avatar

Watchers

 avatar

makl.weather's Issues

Cache feature

Add feature to cache city data for the configured API and use this cache to:

  1. Create a validation set for the supported city names in Get-Weather.ps1
  2. Quickly obtain the city code for the user's city name for unambiguous results. That is, if a user specifies a city name that describes multiple cities, the city code should be used.

Get-ChildItem proxy used in module file

Module file uses a proxy function of Get-ChildItem with a -NoColor switch. Unless the user also has this proxy function loaded, the module cannot be imported/installed.

Implement timeout parameters for weather and location APIs

Usage

To set a timeout, run

Get-Weather -TimeOut 5

to time out in 5 seconds.

Issues

The Invoke-RestMethod cmdlet that this module utilizes does have a timeout parameter that can be leveraged, but DNS queries on the API endpoints may take longer to timeout than the user-defined timeout.

Improve weather report layout

The weather report should show more than just maximum, minimum and current temperatures and it should be presented in a cleaner way.

In particular, information for the weather should be located in a table-like organization to the right of the weather icon instead of below it.

Current location feature

Get the weather report for the user's current location instead of a default city name by default.

Wind direction icon

Add a wind direction icon to the weather report. This icon may simply be cardinal and intercardinal directions (e.g. N, SW) or an arrow.

Weather Icon may not display

Issue

In some cases, the weather icon may not display. The weather report renders properly, but an ObjectNotFound exception is thrown for the Get-WeatherIcon function that is responsible for rendering the icon.

Investigation

  1. Issue occurs over several build and revision versions of PS 5.1 and PS Core 6.2
  2. If the module is removed Remove-Module makl.weather and reimported Import-Module makl.weather, a WriteErrorException is thrown and Get-WeatherIcon fails to import.

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.