Update categories for EDB ID script

This commit is contained in:
ewin 2025-08-20 00:03:24 -06:00
parent 37129d3833
commit 644a7e1d92
Signed by: erin
SSH key fingerprint: SHA256:swjoHhREbZPbWe+gyJNi24d4NAxJSyUIm3fpZj4z3wc
2 changed files with 18 additions and 11 deletions

View file

@ -1,5 +1,8 @@
#!/usr/bin/env -S node --env-file-if-exists=.env
console.log(process.env);
process.exit(1);
import {findItemGTID} from '../lib/api/xivapi.js';
import {getMediawikiClient} from '../lib/config.js';
import {diff} from '../lib/util/diff.js';
@ -33,6 +36,7 @@ function insertInfoboxGTBID (pageContent, gtID) {
const mw = await getMediawikiClient();
// TODO: update this to work with the new maintenance category hierarchy
// Get pages in the "Missing internal ID" category from the main article namespace
const itemPagesWithoutGTIDs = await mw.listCategoryPages('Category:Missing internal ID', [0], +process.env.LIMIT || 500);
console.log('Processing', itemPagesWithoutGTIDs.length, 'item pages from [[Category:Missing internal ID]]\n');