mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 06:37:46 +00:00
use typos
for corrections (#833)
I used [typos](https://github.com/crate-ci/typos/). I manually checked all the corrections and they seem safe to me. There are still some left, but those in this PR are good
This commit is contained in:
parent
a0aa600153
commit
afde2592a6
42 changed files with 102 additions and 90 deletions
|
@ -56,7 +56,7 @@ def show-error [msg label err] {
|
|||
def get_weather_by_ip [locIdx: int, units: string, token: string] {
|
||||
# units
|
||||
# f = imperial aka Fahrenheit
|
||||
# c = metric aka Celcius
|
||||
# c = metric aka Celsius
|
||||
let URL_WEATHER = "https://api.openweathermap.org/data/2.5/weather"
|
||||
let URL_FORECAST = "http://api.openweathermap.org/data/2.5/forecast/daily"
|
||||
let coords = (get_location_by_ip $locIdx $token)
|
||||
|
@ -300,7 +300,7 @@ def get_emoji_by_id [id] {
|
|||
# > get_weather -l 1
|
||||
# This changes to location 1. Locations are listed in the locations custom command above
|
||||
# > get_weather -l 2 -u c
|
||||
# This uses location 2 and Celcius degrees. f = Fahrenheit, c = Celcius
|
||||
# This uses location 2 and Celsius degrees. f = Fahrenheit, c = Celsius
|
||||
|
||||
# Since I live in the USA I have not tested outside the country.
|
||||
# We'll take PRs for things that are broke or augmentations.
|
||||
|
@ -309,5 +309,5 @@ def get_emoji_by_id [id] {
|
|||
# put this in your config.nu file
|
||||
# use /path/to/get-weather.nu get_weather
|
||||
#
|
||||
# then from the nushell commmand prompt type
|
||||
# then from the nushell command prompt type
|
||||
# get_weather
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# 2. if the interval has not expired yet, it prints the Cached information
|
||||
# 3. if the interval has expired, it runs the weather command again and caches the info
|
||||
|
||||
# this script is depenedent on get-weather
|
||||
# this script is dependent on get-weather
|
||||
source get-weather.nu
|
||||
|
||||
#command to run at interval
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# I wrote this so I could have weather in my prompt but not pay the price of hitting
|
||||
# the web for every prompt.
|
||||
|
||||
# this script is depenedent on get-weather
|
||||
# this script is dependent on get-weather
|
||||
use get-weather.nu get_weather
|
||||
|
||||
# Create a mutable weather table to hold the weather data
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Weather Script based on IP Address
|
||||
# - Weather using dark weather api
|
||||
# - Air polution condition using airvisual api
|
||||
# - Air pollution condition using airvisual api
|
||||
# - Street address using google maps api
|
||||
# - Version 2.0
|
||||
export def --env weatherds [] {
|
||||
|
@ -62,7 +62,7 @@ def get_airCond [loc] {
|
|||
let url = $"https://api.airvisual.com/v2/nearest_city?lat=($lat)&lon=($lon)&key=($apiKey)"
|
||||
let aqius = (http get $url).data.current.pollution.aqius
|
||||
|
||||
# clasification (standard)
|
||||
# classification (standard)
|
||||
if $aqius < 51 { "Good" } else if $aqius < 101 { "Moderate" } else if $aqius < 151 { "Unhealthy for some" } else if $aqius < 201 { "Unhealthy" } else if $aqius < 301 { "Very unhealthy" } else { "Hazardous" }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue