use new fancy logging in edb and gt scripts

This commit is contained in:
ewin 2025-09-04 23:07:48 -04:00
parent ded35a743d
commit ef69ee4c9f
Signed by: erin
SSH key fingerprint: SHA256:swjoHhREbZPbWe+gyJNi24d4NAxJSyUIm3fpZj4z3wc
2 changed files with 6 additions and 4 deletions

View file

@ -47,7 +47,8 @@ const pages = (await Promise.all(Object.entries(categoryTypes).map(async ([categ
console.log('Processing', pages.length, 'items\n');
for (const {title, type} of pages) {
for (const page of pages) {
const {title, type} = page;
// this runs serially with an artificial delay between requests to decrease
// the chance of sqenix sending ninjas to my house
await new Promise(resolve => setTimeout(resolve, 1000));
@ -73,7 +74,7 @@ for (const {title, type} of pages) {
let updatedText;
try {
updatedText = insertInfoboxEDBID(originalText, edbID);
diff(originalText, updatedText);
diff(originalText, updatedText, page);
} catch (error) {
console.log('Error inserting parameter:', error);
console.group('Bad page content:');