No description
relying on an interval causes the process to never exit, because the interval is still running in the background. this is bad for oneshot scripts like ours. instead the check works by comparing the current date to the last known date any time a post request is sent |
||
|---|---|---|
| bin | ||
| lib | ||
| .env.example | ||
| .gitignore | ||
| .nvmrc | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
ffxiv-wiki-scripts
Wiki bot scripts for https://ffxiv.consolegameswiki.com.
bin/add-edb-ids: Attempts to fix items in Category:Missing EDB ID by looking them up in Eorzea Database and adding the appropriateid-edbinfobox parameter.bin/add-gt-ids: The same for Category:Missing internal ID, looking up internal IDs via XIVAPI and populating theid-gtparameter.
Scripts for other one-time maintenance tasks (e.g. bulk renames) can be found for bin/one-time, mostly just in case I need to repurpose them for other stuff in the future.
Usage
You'll need a recent version of Node.js (22+). Install dependencies: npm ci, rename .env.example to .env and set MW_USERNAME and MW_PASSWORD to your account username and bot password respectively, then run the scripts in the bin folder.
Environment variables
MW_SCRIPTPATH: The base URL for API requests for your wiki. For the XIV wiki it'shttps://ffxiv.consolegameswiki.com/mediawiki; other wikis may use paths other than/mediawiki, which can be identified in Special:Version as "Script path".MW_USERNAMEandMW_PASSWORD: Account username and bot password, respectivelyMW_KILLPAGE: The name of a page that will be checked when running unattended scripts. If this page contains content, the bot will be killed. This allows other editors to kill the bot if it starts misbehaving and you're not watching it.