Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

When you want to follow the snow, today.

License

NotificationsYou must be signed in to change notification settings

jtarchie/followthesnow

Repository files navigation

This is the app that builds the static site for Follow the Snow. It goes througha list of ski resorts and locations to get the snow report (inches fallen).

Usage

Building the site will take awhile. The OpenWeather API is used to getinformation about current and upcoming snow conditions. They rate limit prettyheavily, so asleep is put in between every API call.

This will manually build the site.

bundle installrake build# or rake fastruby -run -ehttpd docs/ -p8000

Then commit the changed pages, which will be deployed as a static site viaGithub Pages and Cloudflare.

The page is build every morning from 6am MST, so that latest snow totals for theday are available. This is usingGithub Actionsto do so.

Test

Everything is tested because it should be.

bundle installbundleexec rspec

Sources

All the resorts are in CSV files inresorts/ by country. They are scraped viarake scrape from respective Wikipedia pages.

Notes

Exploring getting information from website via scraping. Haven't done it becauseit would cost money.

document.body.querySelectorAll("nav,header,footer,form,button,iframe,script,[role]",).forEach((node)=>node.remove());document.body.textContent.trim().replace(/\s+/g," ");

Using this content into an ChatGPT prompt:

Please identify the current conditions reported at the resort. Include detailsof snow depth, if the resort is open, etc. Please put it in a JSON format,where the keys are simple to infer camel case keys.

About

When you want to follow the snow, today.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp