diff --git a/bin/7-3-stellar-mission-renames b/bin/one-time/7-3-stellar-mission-renames similarity index 95% rename from bin/7-3-stellar-mission-renames rename to bin/one-time/7-3-stellar-mission-renames index 8594295..bf30036 100755 --- a/bin/7-3-stellar-mission-renames +++ b/bin/one-time/7-3-stellar-mission-renames @@ -3,9 +3,9 @@ // 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 -import {getMediawikiClient} from '../lib/config.js'; -import {diff} from '../lib/util/diff.js'; -import {readExistingParameter, setExistingParameter} from '../lib/util/template-parameters.js'; +import {getMediawikiClient} from '../../lib/config.js'; +import {diff} from '../../lib/util/diff.js'; +import {readExistingParameter, setExistingParameter} from '../../lib/util/template-parameters.js'; const mw = await getMediawikiClient(); const missions = await mw.listCategoryPages('Category:Stellar Missions', [0], 1000); diff --git a/bin/hrothgar-viera-headwear b/bin/one-time/hrothgar-viera-headwear similarity index 73% rename from bin/hrothgar-viera-headwear rename to bin/one-time/hrothgar-viera-headwear index fef52bb..4071654 100755 --- a/bin/hrothgar-viera-headwear +++ b/bin/one-time/hrothgar-viera-headwear @@ -1,18 +1,20 @@ #!/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 {join} from 'node:path'; -import {getMediawikiClient} from '../lib/config.js'; -import {diff} from '../lib/util/diff.js'; -import {addParameterAtBottom, setExistingParameter} from '../lib/util/template-parameters.js'; +import {getMediawikiClient} from '../../lib/config.js'; +import {diff} from '../../lib/util/diff.js'; +import {addParameterAtBottom, setExistingParameter} from '../../lib/util/template-parameters.js'; const mw = await getMediawikiClient(); -// parse CSV -// hats.csv is an export of this google sheet that crye compiled: -// 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(',')); +// parse CSV, naively assume there are no quotes or backslashes (because i checked) +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)); const headers = data.splice(0, 1)[0]; const COL_ITEM = headers.findIndex(field => field.toLowerCase() === 'item');