const fs = require('fs'); try { const content = fs.readFileSync('./romm_swagger.json', 'utf16le'); let data; try { data = JSON.parse(content); } catch (e) { // maybe it's utf8 data = JSON.parse(fs.readFileSync('./romm_swagger.json', 'utf8')); } const paths = Object.keys(data.paths); const targets = paths.filter(p => p.toLowerCase().includes('stat') || p.toLowerCase().includes('count') || p.toLowerCase().includes('size') || p.toLowerCase().includes('system')); console.log("Matching Endpoints:", targets); } catch (e) { console.error("Failed:", e.message); }