Skip to content

A deno script that checks weather forecasts and shows the best days to take vacation in next two weeks

License

Notifications You must be signed in to change notification settings

saeedseyfi/theweather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How's the weather for vacation?

This script helps to find the best days in next two weeks to take vacation based on weather.

Output Screenshot

Setup

Prerequisites: git, deno and tomorrow.io api key

git clone git@github.com:saeedseyfi/theweather.git
echo TOMORROW_APIKEY=your-api-key >> theweather/.env

Run

deno run --allow-net=api.tomorrow.io,weather-services.tomorrow.io,api.ipify.org,ipapi.co --allow-read=. --allow-env mod.ts

Params:

# REQUIRED
--allow-net     # allows http request to api 
--allow-read    # allows reading current directory (.env files)
--allow-env     # allows access to env variables
mod.ts          # main script file

# OPTIONAL
--lat=59.3268711  # location latitude
--lon=18.0702666  # location longitude
--days=14         # number of days to check (max 15)
--temp=20         # min temperature (ºC) 
--precip=1        # max precipitation (mm/hr)
--wind=8          # max wind speed (m/hr)
--gust=10         # max wind gusts (m/hr)

You can make your command set an alias to find your vacation-friendly days ;)

About

A deno script that checks weather forecasts and shows the best days to take vacation in next two weeks

Resources

License

Stars

Watchers

Forks

Packages

No packages published