18 lines
634 B
JavaScript
18 lines
634 B
JavaScript
const fs = require('fs');
|
|
const data = fs.readFileSync('c:/GitHub/FW/Trainings/WBT_ErkW_2_Aufbau_und_Ueberblick_Bedienoberflaeche/html5/data/js/data.js', 'utf8');
|
|
|
|
const matches = [44, 46, 51, 57, 72, 73, 75, 77, 79];
|
|
matches.forEach(m => {
|
|
const idx = data.indexOf(`"${m}":`);
|
|
if (idx !== -1) {
|
|
console.log(`Asset ${m}:`, data.substring(idx, idx + 100));
|
|
} else {
|
|
const ididx = data.indexOf(`"id":${m}`);
|
|
if (ididx !== -1) {
|
|
console.log(`Asset ${m} (id):`, data.substring(ididx - 20, ididx + 100));
|
|
} else {
|
|
console.log(`Asset ${m} not found`);
|
|
}
|
|
}
|
|
});
|