feat: import new reservoir data, add lake management scripts, and update overview UI components
continuous-integration/drone/push Build encountered an error

This commit is contained in:
David Fencl
2026-06-06 20:14:36 +02:00
parent cf05e844d8
commit a67a2247c3
55 changed files with 265428 additions and 441 deletions
+32
View File
@@ -0,0 +1,32 @@
import axios from 'axios';
import * as cheerio from 'cheerio';
import https from 'https';
async function checkLake() {
const agent = new https.Agent({ rejectUnauthorized: false });
// Check Lipno 1
const url = `https://www.pvl.cz/portal/nadrze/cz/pc/Mereni.aspx?id=VLL1&oid=1`;
try {
const response = await axios.get(url, {
httpsAgent: agent,
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'
}
});
const $ = cheerio.load(response.data);
let hasData = false;
$('table').each((i, tbl) => {
const firstRowText = $(tbl).find('tr').first().text();
console.log(`Table ${i} first row:`, firstRowText.trim().replace(/\\s+/g, ' '));
if (firstRowText.includes('Datum a čas') || firstRowText.includes('Hladina')) {
hasData = true;
}
});
console.log(`hasData=${hasData}`);
} catch (err: any) {
console.error(err.message);
}
}
checkLake();