Skip to content

Commit

Permalink
Merge branch 'feat/tignes'
Browse files Browse the repository at this point in the history
  • Loading branch information
pirxpilot committed Nov 2, 2023
2 parents 14c4767 + 85a9734 commit 9b9b906
Show file tree
Hide file tree
Showing 11 changed files with 695 additions and 301 deletions.
1 change: 1 addition & 0 deletions lib/resorts/tignes/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('../../tools/lumiplan');
25 changes: 25 additions & 0 deletions lib/resorts/tignes/resort.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "Tignes",
"url": {
"host": "https://en.tignes.net/",
"pathname": "/skiing/ski-area/ski-map/lifts-and-pistes-live-opening"
},
"dataUrl": {
"host": "https://bulletin.lumiplan.pro",
"pathname": "/bulletin.php",
"query": {
"station": "tignes",
"region": "alpes",
"pays": "france",
"lang": "en"
}
},
"tags": [
"France",
"Alps"
],
"ll": [
6.90692,
45.46976
]
}
7 changes: 6 additions & 1 deletion lib/tools/lumiplan.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
const toTitleCase = require("to-title-case");

module.exports = {
selector: '.text:contains(Lifts) + .prl_affichage .prl_group',
parse: {
name: '1/0',
name: {
child: '1/0',
fn: toTitleCase
},
status: {
child: '4/0',
attribute: 'src',
Expand Down
84 changes: 42 additions & 42 deletions test/resorts/courchevel.js
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
const lifts = require('../lifts');

lifts('courchevel', 'html', {
'Rocher de l\'Ombre': 'scheduled',
'Sources': 'scheduled',
'Verdons': 'scheduled',
'Biollay': 'scheduled',
'Pralong': 'scheduled',
'Aiguille du Fruit': 'scheduled',
'Altiport': 'scheduled',
'Ferme': 'scheduled',
'Cospillot': 'scheduled',
"Rocher De L'ombre": 'scheduled',
Sources: 'scheduled',
Verdons: 'scheduled',
Biollay: 'scheduled',
Pralong: 'scheduled',
'Aiguille Du Fruit': 'scheduled',
Altiport: 'scheduled',
Ferme: 'scheduled',
Cospillot: 'scheduled',
'Jardin Alpin': 'scheduled',
'Etoiles': 'scheduled',
'Golf 1850 n°1': 'scheduled',
'Bellecôte': 'scheduled',
'Golf 1850 n°2': 'scheduled',
'Golf 1850 n°3': 'scheduled',
'Chanrossa': 'scheduled',
Etoiles: 'scheduled',
'Golf 1850 N°1': 'scheduled',
Bellecôte: 'scheduled',
'Golf 1850 N°2': 'scheduled',
'Golf 1850 N°3': 'scheduled',
Chanrossa: 'scheduled',
'Roc Merlet': 'scheduled',
'Pyramides 1': 'scheduled',
'Pyramides 2': 'scheduled',
'Dou des Lanches': 'scheduled',
'Dou Des Lanches': 'scheduled',
'Bouc Blanc': 'scheduled',
'Tania': 'scheduled',
Tania: 'scheduled',
'Gros Murger': 'closed',
'Mon Tania': 'scheduled',
'Ours Brun': 'scheduled',
'Stade Tania': 'scheduled',
'Grizzly': 'scheduled',
'Chenus': 'scheduled',
'Coqs': 'closed',
'Loze A': 'scheduled',
'Plantrey': 'scheduled',
'Forêt': 'closed',
'Epicéa': 'scheduled',
'Praz': 'open',
'Grangettes': 'open',
'Tovets': 'scheduled',
'Roys': 'scheduled',
Grizzly: 'scheduled',
Chenus: 'scheduled',
Coqs: 'closed',
'Loze a': 'scheduled',
Plantrey: 'scheduled',
Forêt: 'closed',
Epicéa: 'scheduled',
Praz: 'open',
Grangettes: 'open',
Tovets: 'scheduled',
Roys: 'scheduled',
'Loze B': 'scheduled',
'Envolée': 'scheduled',
Envolée: 'scheduled',
'Grandes Combes': 'scheduled',
'Jardin d\'enfants': 'scheduled',
'Saulire': 'closed',
'Vizelle': 'scheduled',
'Suisses': 'scheduled',
'Marmottes': 'scheduled',
'Chapelets': 'closed',
'Signal': 'scheduled',
"Jardin D'enfants": 'scheduled',
Saulire: 'closed',
Vizelle: 'scheduled',
Suisses: 'scheduled',
Marmottes: 'scheduled',
Chapelets: 'closed',
Signal: 'scheduled',
'Roc Mugnier': 'scheduled',
'Petite Bosse': 'scheduled',
'Ariondaz': 'scheduled',
'Grange': 'scheduled',
'Belvédère': 'scheduled',
'Mickey': 'scheduled',
Ariondaz: 'scheduled',
Grange: 'scheduled',
Belvédère: 'scheduled',
Mickey: 'scheduled',
'Petit Moriond': 'scheduled',
'Mine': 'scheduled',
'Sheriff': 'scheduled'
Mine: 'scheduled',
Sheriff: 'scheduled',
});
348 changes: 348 additions & 0 deletions test/resorts/example/tignes.html

Large diffs are not rendered by default.

149 changes: 74 additions & 75 deletions test/resorts/laplagne.js
Original file line number Diff line number Diff line change
@@ -1,79 +1,78 @@
const lifts = require('../lifts');

lifts('laplagne', 'html', {
'AIME LA PLAGNE': 'scheduled',
'BECOIN': 'scheduled',
'CRETES': 'closed',
'DROMADAIRE': 'closed',
'ENVERS': 'scheduled',
'GOLF.': 'scheduled',
'PLAGNE 1800': 'scheduled',
'PRACONDUIT.': 'scheduled',
'ROCHE': 'scheduled',
'STADE': 'scheduled',
'TELEMETRO': 'open',
'AOLLETS': 'scheduled',
'BERGERIE': 'scheduled',
'BIQUET.': 'scheduled',
'BOULEVARD.': 'scheduled',
'CHEVRETTE.': 'scheduled',
'COLORADO': 'scheduled',
'DOU DU PRAZ.': 'scheduled',
'FRANCE': 'scheduled',
'FUNIPLAGNE GRANDE ROCHETTE': 'scheduled',
'MELEZES': 'scheduled',
'SOLU': 'scheduled',
'TELEBUS': 'open',
'LOVATIERE': 'scheduled',
'INDIENS': 'scheduled',
'ANGE': 'scheduled',
'ARPETTE.': 'scheduled',
'BELLE PLAGNE.': 'open',
'BELLE PLAGNE..': 'scheduled',
'BLANCHETS.': 'scheduled',
'CARELLA': 'scheduled',
'COL DE FORCLE I': 'scheduled',
'COLOSSES.': 'scheduled',
'INVERSENS.': 'scheduled',
'OURSON.': 'scheduled',
'PLATEAU DE CARELLA': 'scheduled',
'QUILLIS.': 'scheduled',
'ROCHE DE MIO': 'scheduled',
'TYROLIEN': 'scheduled',
'BELLECOTE.': 'scheduled',
'CHALET DE BELLECOTE': 'scheduled',
'GLACIER': 'closed',
'TRAVERSEE': 'scheduled',
'AIGLON': 'scheduled',
'BORSELIERS III': 'scheduled',
'BORSELIERS.': 'scheduled',
'CHAMPAGNY': 'scheduled',
'ETERLOU.': 'scheduled',
'ROSSA': 'scheduled',
'VERDONS SUD': 'scheduled',
'BAUCHES.': 'scheduled',
'BIJOLIN.': 'scheduled',
'COCHES.': 'scheduled',
'CROZATS.': 'scheduled',
'DOS ROND.': 'scheduled',
'ECUREUILS': 'scheduled',
'LAC NOIR.': 'scheduled',
'MONTCHAVIN.': 'scheduled',
'PATINOIRE': 'scheduled',
'PETIT SAUGET': 'scheduled',
'PETITS LOUPS': 'scheduled',
'PIERRES BLANCHES.': 'scheduled',
'PLAN BOIS.': 'scheduled',
'PLAN LESCHAUX': 'closed',
'REPLAT..': 'scheduled',
'SALLA.': 'closed',
'SUCETTE DE MONTCHAVIN': 'scheduled',
'TELEBUFFETTE': 'scheduled',
'VANOISE EXPRESS': 'scheduled',
'ADRETS.': 'scheduled',
'GENTIL.': 'closed',
'GRANGETTE': 'closed',
'GRENOUILLES.': 'scheduled',
'MONTALBERT.': 'scheduled',
'MONTALBERT..': 'scheduled'
'Aime La Plagne': 'scheduled',
Becoin: 'scheduled',
Cretes: 'closed',
Dromadaire: 'closed',
Envers: 'scheduled',
Golf: 'scheduled',
'Plagne 1800': 'scheduled',
Praconduit: 'scheduled',
Roche: 'scheduled',
Stade: 'scheduled',
Telemetro: 'open',
Aollets: 'scheduled',
Bergerie: 'scheduled',
Biquet: 'scheduled',
Boulevard: 'scheduled',
Chevrette: 'scheduled',
Colorado: 'scheduled',
'Dou Du Praz.': 'scheduled',
France: 'scheduled',
'Funiplagne Grande Rochette': 'scheduled',
Melezes: 'scheduled',
Solu: 'scheduled',
Telebus: 'open',
Lovatiere: 'scheduled',
Indiens: 'scheduled',
Ange: 'scheduled',
Arpette: 'scheduled',
'Belle Plagne.': 'open',
'Belle Plagne..': 'scheduled',
Blanchets: 'scheduled',
Carella: 'scheduled',
'Col De Forcle I': 'scheduled',
Colosses: 'scheduled',
Inversens: 'scheduled',
Ourson: 'scheduled',
'Plateau De Carella': 'scheduled',
Quillis: 'scheduled',
'Roche De Mio': 'scheduled',
Tyrolien: 'scheduled',
Bellecote: 'scheduled',
'Chalet De Bellecote': 'scheduled',
Glacier: 'closed',
Traversee: 'scheduled',
Aiglon: 'scheduled',
'Borseliers Iii': 'scheduled',
Borseliers: 'scheduled',
Champagny: 'scheduled',
Eterlou: 'scheduled',
Rossa: 'scheduled',
'Verdons Sud': 'scheduled',
Bauches: 'scheduled',
Bijolin: 'scheduled',
Coches: 'scheduled',
Crozats: 'scheduled',
'Dos Rond.': 'scheduled',
Ecureuils: 'scheduled',
'Lac Noir.': 'scheduled',
Montchavin: 'scheduled',
Patinoire: 'scheduled',
'Petit Sauget': 'scheduled',
'Petits Loups': 'scheduled',
'Pierres Blanches.': 'scheduled',
'Plan Bois.': 'scheduled',
'Plan Leschaux': 'closed',
Replat: 'scheduled',
Salla: 'closed',
'Sucette De Montchavin': 'scheduled',
Telebuffette: 'scheduled',
'Vanoise Express': 'scheduled',
Adrets: 'scheduled',
Gentil: 'closed',
Grangette: 'closed',
Grenouilles: 'scheduled',
Montalbert: 'scheduled',
});
Loading

0 comments on commit 9b9b906

Please sign in to comment.