move one-offs to subfolder; add better note about hroth/viera script

This commit is contained in:
ewin 2025-08-12 18:42:12 -04:00
parent dc1c1514a6
commit c0ae1f240f
Signed by: erin
SSH key fingerprint: SHA256:swjoHhREbZPbWe+gyJNi24d4NAxJSyUIm3fpZj4z3wc
2 changed files with 12 additions and 10 deletions

View file

@ -3,9 +3,9 @@
// indicators with the new empty/EX/EX+ naming used in patch 7.3. // indicators with the new empty/EX/EX+ naming used in patch 7.3.
// https://na.finalfantasyxiv.com/lodestone/topics/detail/907c6d2aa020c0e4458ed1477668521fb4a117ec#:~:text=The%20notation,adjusted%2E // https://na.finalfantasyxiv.com/lodestone/topics/detail/907c6d2aa020c0e4458ed1477668521fb4a117ec#:~:text=The%20notation,adjusted%2E
import {getMediawikiClient} from '../lib/config.js'; import {getMediawikiClient} from '../../lib/config.js';
import {diff} from '../lib/util/diff.js'; import {diff} from '../../lib/util/diff.js';
import {readExistingParameter, setExistingParameter} from '../lib/util/template-parameters.js'; import {readExistingParameter, setExistingParameter} from '../../lib/util/template-parameters.js';
const mw = await getMediawikiClient(); const mw = await getMediawikiClient();
const missions = await mw.listCategoryPages('Category:Stellar Missions', [0], 1000); const missions = await mw.listCategoryPages('Category:Stellar Missions', [0], 1000);

View file

@ -1,18 +1,20 @@
#!/usr/bin/env node #!/usr/bin/env node
// Adds infobox parameters for Viera and Hrothgar hat compatibility based on
// data compiled by Crye. Expects there to be a `hats.csv` file in the repo root
// which is an export of the "HEAD" sheet of this Google Sheets document:
// https://docs.google.com/spreadsheets/d/13s_qxWThsensslulLfAxN0-hzQZVCqS9fKaImlLXbVU/edit?gid=38787585#gid=38787585
import {readFileSync} from 'node:fs'; import {readFileSync} from 'node:fs';
import {join} from 'node:path'; import {join} from 'node:path';
import {getMediawikiClient} from '../lib/config.js'; import {getMediawikiClient} from '../../lib/config.js';
import {diff} from '../lib/util/diff.js'; import {diff} from '../../lib/util/diff.js';
import {addParameterAtBottom, setExistingParameter} from '../lib/util/template-parameters.js'; import {addParameterAtBottom, setExistingParameter} from '../../lib/util/template-parameters.js';
const mw = await getMediawikiClient(); const mw = await getMediawikiClient();
// parse CSV // parse CSV, naively assume there are no quotes or backslashes (because i checked)
// hats.csv is an export of this google sheet that crye compiled: const data = readFileSync(join(import.meta.dirname, '../../hats.csv'), 'utf-8').split(/\r?\n/g).map(line => line && line.split(','));
// https://docs.google.com/spreadsheets/d/13s_qxWThsensslulLfAxN0-hzQZVCqS9fKaImlLXbVU/edit?gid=38787585#gid=38787585
const data = readFileSync(join(import.meta.dirname, '../hats.csv'), 'utf-8').split(/\r?\n/g).map(line => line && line.split(','));
console.log(data.slice(0, 1)); console.log(data.slice(0, 1));
const headers = data.splice(0, 1)[0]; const headers = data.splice(0, 1)[0];
const COL_ITEM = headers.findIndex(field => field.toLowerCase() === 'item'); const COL_ITEM = headers.findIndex(field => field.toLowerCase() === 'item');