Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Roccaraso #79

Merged
merged 1 commit into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions lib/resorts/roccaraso/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
selector: '.container .content',
parse: {
name: '1',
status: {
child: '0',
attribute: 'class',
regex: /ic_stato([0-9])/,
fn: (s) => {
switch (s) {
case '1':
return 'open';
case '0':
return 'closed';
}
},
},
},
};
20 changes: 20 additions & 0 deletions lib/resorts/roccaraso/resort.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "Roccaraso - Rivisondoli",
"dataUrl": {
"host": "https://monitor.roccaraso.net",
"pathname": "/impianti.php"
},
"url": {
"host": "https://www.roccaraso.net",
"pathname": "/"
},
"tags": [
"Italy",
"Appennines",
"Abruzzo"
],
"ll": [
14.08396047685749,
41.85103115486714
]
}
198 changes: 198 additions & 0 deletions test/resorts/example/roccaraso.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento senza titolo</title>
<link href="css/stile_impianti.css" rel="stylesheet" type="text/css" />
</head>

<body>
<link href="css/stile_impianti.css" rel="stylesheet" type="text/css"><div class="container">
<div class="sidebar1"><div class="sidebar1_bgcol">
<div class="titolo">impianti aremogna</div>
<div class="content">
<div class="ic_numero ic_stato0">A1</div>
<div class="box_nome">Valle delle Gravare</div>
<div class="ic_impianto ic_tipo4"></div>
<div class="clearfloat"></div>
</div>
<div class="content">
<div class="ic_numero ic_stato0">A2</div>
<div class="box_nome">Gravare di Sotto</div>
<div class="ic_impianto ic_tipo4"></div>
<div class="clearfloat"></div>
</div>
<div class="content">
<div class="ic_numero ic_stato0">A3</div>
<div class="box_nome">Macchione</div>
<div class="ic_impianto ic_tipo4"></div>
<div class="clearfloat"></div>
</div>
<div class="content">
<div class="ic_numero ic_stato0">A4</div>
<div class="box_nome">Aremogna</div>
<div class="ic_impianto ic_tipo1"></div>
<div class="clearfloat"></div>
</div>
<div class="content">
<div class="ic_numero ic_stato1">A5</div>
<div class="box_nome">Pallottieri</div>
<div class="ic_impianto ic_tipo1"></div>
<div class="clearfloat"></div>
</div>
<div class="content">
<div class="ic_numero ic_stato1">A6</div>
<div class="box_nome">Campo Scuola</div>
<div class="ic_impianto ic_tipo8"></div>
<div class="clearfloat"></div>
</div>
<div class="content">
<div class="ic_numero ic_stato0">A7</div>
<div class="box_nome">ValleVerde 1</div>
<div class="ic_impianto ic_tipo5"></div>
<div class="clearfloat"></div>
</div>
<div class="content">
<div class="ic_numero ic_stato0">A8</div>
<div class="box_nome">ValleVerde 2</div>
<div class="ic_impianto ic_tipo4"></div>
<div class="clearfloat"></div>
</div>
<div class="content">
<div class="ic_numero ic_stato0">A9</div>
<div class="box_nome">Aremogna Crete Rosse</div>
<div class="ic_impianto ic_tipo4"></div>
<div class="clearfloat"></div>
</div>
</div></div>
<div class="sidebar2">
<div class="sidebar2_bgcol">
<div class="titolo">impianti m. pratello</div>
<div class="content">
<div class="ic_numero ic_stato0">B1</div>
<div class="box_nome">Crete Rosse 1</div>
<div class="ic_impianto ic_tipo6"></div>
<div class="clearfloat"></div>
</div>
<div class="content">
<div class="ic_numero ic_stato0">B2</div>
<div class="box_nome">Pino Solitario</div>
<div class="ic_impianto ic_tipo3"></div>
<div class="clearfloat"></div>
</div>
<div class="content">
<div class="ic_numero ic_stato0">B3</div>
<div class="box_nome">Del Pratelletto</div>
<div class="ic_impianto ic_tipo6"></div>
<div class="clearfloat"></div>
</div>
<div class="content">
<div class="ic_numero ic_stato0">B4</div>
<div class="box_nome">Monte Pratello</div>
<div class="ic_impianto ic_tipo1"></div>
<div class="clearfloat"></div>
</div>
<div class="content">
<div class="ic_numero ic_stato0">B5</div>
<div class="box_nome">Valloncello</div>
<div class="ic_impianto ic_tipo6"></div>
<div class="clearfloat"></div>
</div>
<div class="content">
<div class="ic_numero ic_stato0">B6</div>
<div class="box_nome">Prato</div>
<div class="ic_impianto ic_tipo4"></div>
<div class="clearfloat"></div>
</div>
<div class="content">
<div class="ic_numero ic_stato0">B7</div>
<div class="box_nome">Vallone</div>
<div class="ic_impianto ic_tipo1"></div>
<div class="clearfloat"></div>
</div>
<div class="content">
<div class="ic_numero ic_stato0">B8</div>
<div class="box_nome">Campo Scuola</div>
<div class="ic_impianto ic_tipo8"></div>
<div class="clearfloat"></div>
</div>
<div class="content">
<div class="ic_numero ic_stato0">B9</div>
<div class="box_nome">Pratello Crete Rosse</div>
<div class="ic_impianto ic_tipo3"></div>
<div class="clearfloat"></div>
</div>
</div>
<div class="box_legenda2">
<div class="wh50">
<img src="immagini/ico45x45/ico_impianti_aperto.png" alt="IMPIANTO APERTO">IMPIANTO APERTO</div>
<div class="wh50">
<img src="immagini/ico45x45/ico_impianti_chiuso.png" alt="IMPIANTO CHIUSO">IMPIANTO CHIUSO</div>
<div class="wh85">
<img src="immagini/ico45x45/ico_impianti_np.png" alt="IMPIANTO CHIUSO TEMPORANEAMENTE">IMPIANTO CHIUSO TEMPORANEAMENTE</div>
</div>
</div>
<div class="sidebar3"><div class="sidebar3_bgcol">
<div class="titolo">impianti pizzalto</div>
<div class="content">
<div class="ic_numero ic_stato0">C1</div>
<div class="box_nome">Lago d’Avoli Orso</div>
<div class="ic_impianto ic_tipo6"></div>
<div class="clearfloat"></div>
</div>
<div class="content">
<div class="ic_numero ic_stato0">C2</div>
<div class="box_nome">Pizzalto</div>
<div class="ic_impianto ic_tipo2"></div>
<div class="clearfloat"></div>
</div>
<div class="content">
<div class="ic_numero ic_stato0">C3</div>
<div class="box_nome">Campo Scuola</div>
<div class="ic_impianto ic_tipo8"></div>
<div class="clearfloat"></div>
</div>
<div class="content">
<div class="ic_numero ic_stato0">C4</div>
<div class="box_nome">Paradiso 1 e 2</div>
<div class="ic_impianto ic_tipo6"></div>
<div class="clearfloat"></div>
</div>
</div></div>
<div class="sidebar4"><div class="sidebar4_bgcol">
<div class="titolo">impianti tames</div>
<div class="content">
<div class="ic_numero ic_stato0">T1</div>
<div class="box_nome">Gravare-ToppeTes</div>
<div class="ic_impianto ic_tipo1"></div>
<div class="clearfloat"></div>
</div>
<div class="content">
<div class="ic_numero ic_stato0">T2</div>
<div class="box_nome">Pizzalto-Gravare</div>
<div class="ic_impianto ic_tipo1"></div>
<div class="clearfloat"></div>
</div>
</div></div>
<div class="box_legenda">
<div>
<img src="immagini/ico45x45/ico_impianti_cab.png" width="45" height="45" alt="CABINOVIA ESAPOSTO">CABINOVIA</div>
<div>
<img src="immagini/ico45x45/ico_impianti_bi.png" width="45" height="45" alt="SEGGIOVIA BIPOSTO">SEGGIOVIA BIPOSTO</div>
<div>
<img src="immagini/ico45x45/ico_impianti_tri.png" width="45" height="45" alt="SEGGIOVIA TRIPOSTO">SEGGIOVIA TRIPOSTO</div>
<div>
<img src="immagini/ico45x45/ico_impianti_qua.png" width="45" height="45" alt="SEGGIOVIA QUADRIPOSTO">SEGG. QUADRIPOSTO</div>
<div>
<img src="immagini/ico45x45/ico_impianti_esa.png" width="45" height="45" alt="SEGGIOVIA ESAPOSTO">SEGGIOVIA ESAPOSTO</div>
<div>
<img src="immagini/ico45x45/ico_impianti_man.png" width="45" height="45" alt="MANOVIA">MANOVIA</div>
<div>
<img src="immagini/ico45x45/ico_impianti_sci.png" width="45" height="45" alt="SCIOVIA">SCIOVIA</div>
<div>
<img src="immagini/ico45x45/ico_impianti_tap.png" width="45" height="45" alt="TAPIS ROULANT">TAPIS ROULANT</div>
</div>
</div>
</body>
</html>

26 changes: 26 additions & 0 deletions test/resorts/roccaraso.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const lifts = require('../lifts');

lifts('roccaraso', 'html', {
'Valle delle Gravare': 'closed',
'Gravare di Sotto': 'closed',
Macchione: 'closed',
Aremogna: 'closed',
Pallottieri: 'open',
'Campo Scuola': 'closed',
'ValleVerde 1': 'closed',
'ValleVerde 2': 'closed',
'Aremogna Crete Rosse': 'closed',
'Crete Rosse 1': 'closed',
'Pino Solitario': 'closed',
'Del Pratelletto': 'closed',
'Monte Pratello': 'closed',
Valloncello: 'closed',
Prato: 'closed',
Vallone: 'closed',
'Pratello Crete Rosse': 'closed',
'Lago d’Avoli Orso': 'closed',
Pizzalto: 'closed',
'Paradiso 1 e 2': 'closed',
'Gravare-ToppeTes': 'closed',
'Pizzalto-Gravare': 'closed',
});