-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
8,287 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const debug = require('debug')('liftie:resort:bogusbasin'); | ||
|
||
const select = require('../../select'); | ||
const coerce = require('../../tools/coerce'); | ||
|
||
module.exports = parse; | ||
|
||
function parse(dom) { | ||
const dataScript = select(dom, 'x-filterable-lift-trail-status') | ||
.map(script => script.attribs['data-data'].trim()); | ||
const data = JSON.parse(dataScript); | ||
|
||
const liftStatus = data.lifts | ||
.reduce((ls, lift) => { | ||
ls[lift['title']] = coerce(lift['openingStatus']); | ||
return ls; | ||
}, {}); | ||
|
||
debug('Bogus Basin Lift Status:', liftStatus); | ||
return liftStatus; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "Bogus Basin", | ||
"url": { | ||
"host": "https://bogusbasin.org", | ||
"pathname": "/your-mountain/trails-grooming/" | ||
}, | ||
"tags": [ | ||
"Idaho" | ||
], | ||
"ll": [ | ||
-116.104, | ||
43.764 | ||
], | ||
"opening": "1960-02-02", | ||
"noaa": "BOI/138,92" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const lifts = require("../lifts"); | ||
|
||
lifts("bogusbasin", "html", { | ||
"Deer Point Express": "open", | ||
"Morning Star Express": "open", | ||
"Superior Express": "open", | ||
"Showcase Chair": "closed", | ||
"Bitterroot Chair": "closed", | ||
"Pine Creek Express": "open", | ||
"Coach Chairlift": "open", | ||
"Easy Rider Carpet": "open", | ||
"Discovery Carpet": "open", | ||
"Explorer Carpet": "open", | ||
}); |
Large diffs are not rendered by default.
Oops, something went wrong.