fix dumb logging issue
This commit is contained in:
parent
0db95cad3d
commit
2dfa1cdbca
1 changed files with 9 additions and 2 deletions
|
|
@ -51,16 +51,23 @@ for (const {title} of itemPagesWithoutEDBIDs) {
|
||||||
}
|
}
|
||||||
console.log('EDB ID:', edbID, `(https://na.finalfantasyxiv.com/lodestone/playguide/db/item/${encodeURIComponent(edbID)})`);
|
console.log('EDB ID:', edbID, `(https://na.finalfantasyxiv.com/lodestone/playguide/db/item/${encodeURIComponent(edbID)})`);
|
||||||
|
|
||||||
|
let originalText;
|
||||||
|
try {
|
||||||
|
originalText = await mw.readPage(title);
|
||||||
|
} catch (error) {
|
||||||
|
console.log('Error reading page:', error);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// rewrite wiki page to include id-edb infobox parameter
|
// rewrite wiki page to include id-edb infobox parameter
|
||||||
let updatedText;
|
let updatedText;
|
||||||
try {
|
try {
|
||||||
const originalText = await mw.readPage(title);
|
|
||||||
updatedText = insertInfoboxEDBID(originalText, edbID);
|
updatedText = insertInfoboxEDBID(originalText, edbID);
|
||||||
diff(originalText, updatedText);
|
diff(originalText, updatedText);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('Error inserting parameter:', error);
|
console.log('Error inserting parameter:', error);
|
||||||
console.group('Bad page content:');
|
console.group('Bad page content:');
|
||||||
console.log(pageContent);
|
console.log(originalText);
|
||||||
console.groupEnd();
|
console.groupEnd();
|
||||||
console.log();
|
console.log();
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue