feat: initial romm web ui architecture, bento grids, and spatial gamepad bindings
This commit is contained in:
18
get_paths.js
Normal file
18
get_paths.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const fs = require('fs');
|
||||
// read file using exact encoding
|
||||
const content = fs.readFileSync('romm_swagger.json');
|
||||
try {
|
||||
// Try reading it as utf16le just in case PowerShell dumped it with BOM
|
||||
let jsonString = content.toString('utf16le');
|
||||
if (jsonString.charCodeAt(0) === 0xFEFF) {
|
||||
jsonString = jsonString.slice(1);
|
||||
}
|
||||
const parsed = JSON.parse(jsonString);
|
||||
const paths = Object.keys(parsed.paths).filter(p => p.includes('user') || p.includes('me'));
|
||||
console.log(paths.join('\n'));
|
||||
} catch (e) {
|
||||
// Fallback to utf8 just in case
|
||||
const parsed = JSON.parse(content.toString('utf8'));
|
||||
const paths = Object.keys(parsed.paths).filter(p => p.includes('user') || p.includes('me'));
|
||||
console.log(paths.join('\n'));
|
||||
}
|
||||
Reference in New Issue
Block a user