Skip to content

Commit

Permalink
Merge branch 'bogus_basin'
Browse files Browse the repository at this point in the history
  • Loading branch information
pirxpilot committed Mar 1, 2024
2 parents df3eed2 + 97bae67 commit 0cd5e12
Show file tree
Hide file tree
Showing 4 changed files with 8,287 additions and 0 deletions.
21 changes: 21 additions & 0 deletions lib/resorts/bogusbasin/index.js
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;
}
16 changes: 16 additions & 0 deletions lib/resorts/bogusbasin/resort.json
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"
}
14 changes: 14 additions & 0 deletions test/resorts/bogusbasin.js
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",
});
8,236 changes: 8,236 additions & 0 deletions test/resorts/example/bogusbasin.html

Large diffs are not rendered by default.

0 comments on commit 0cd5e12

Please sign in to comment.