migration wip

This commit is contained in:
2025-12-30 16:19:42 +01:00
parent 65a7e9f24a
commit 4ae6b36da9
149 changed files with 32034 additions and 34406 deletions

29
test-decode44.js Normal file
View File

@@ -0,0 +1,29 @@
// Test what's in the file
const fs = require('fs');
const content = fs.readFileSync('data/processed/pages.json', 'utf8');
const pages = JSON.parse(content);
const start = pages.find(p => p.slug === 'start' && p.locale === 'de');
const html = start.contentHtml;
// Find bg_image patterns
const matches = html.match(/bg_image=[^>]+/g);
if (matches) {
console.log('Found bg_image patterns:');
matches.slice(0, 2).forEach(m => {
console.log(' ', m.substring(0, 80));
});
}
// Check what's actually between bg_image and the number
const test = html.match(/bg_image=([^>]+)/);
if (test) {
const after = test[1];
console.log('\nAfter bg_image=:', JSON.stringify(after.substring(0, 30)));
// Check if it starts with ”
if (after.startsWith('”')) {
console.log('✓ Has ” (decimal entity)');
const id = after.substring(7, 12); // Skip ” and get 5 digits
console.log(' ID would be:', id);
}
}