A mirror for the Griftlands Wiki on Fandom and a set of commands for editing.
- A local version of the wiki:
- All wiki text pages, as
*.wikitext
files - All image metadata, as
*.json
files
- All wiki text pages, as
- Commands:
pull
retrieves the pages from the online wiki and stores them locallydownload
retrieves the raw image files. They are not to be stored on git.push
sends the local changes to the online wikiupdate
parses the game files and changes the local wiki accordinglydatamine
extracts and converts images from the game files
- All commands have a guard in place that warns and informs you about the incoming operations.
- Clone the repository
npm install
npm run pull
Retrieves the pages from the online wiki and stores them locally:
- requests all text pages from the 4 most important namespaces, 50 items at a time
- requests all image pages, 500 items at a time
- offers a summary of what's about to happen
- asks you if you want to proceed
- stores the texts as
*.wikitext
and the images as*.json
in the localwiki
folder - removes all local pages that are no longer referenced
npm run download
Retrieves the raw image files corresponding to each *.json
file:
- compares the
wiki/File
andraw/web
folders - offers a summary of what's about to happen
- asks you if you want to proceed
- downloads all necessary images to
raw/web
- removes all raw images that are no longer accompanied by a
*.json
file
npm run push
Sends the local changes to the online wiki:
- performs a
pull
so it can compare the local files with the most recent online version - offers a summary of what's about to happen
- asks you if you want to proceed
- obtains a CSRF token for editing, based on the credentials from
/scripts/utils/credentials.json
- writes the needed changes to the online wiki
- (currently disabled) removes online pages that have no local counterpart
npm run update
Parses the game files and changes the local wiki accordingly
- unpacks the game files
- parses and cross-references all Compendium Characters (241 people + 29 bosses)
- TODO. This is still Work-in-Progress
npm run datamine
Extracts and converts images from the game files
- unpacks the game files
- extracts the characters portraits textures (TEX > DDS > DXT5 > cropped PNG)
- You can find some configuration options in
/scripts/utils/CONFIG.js
- Most commands accept a page title as parameter to focus on that particular item and not scan the whole wiki. For example:
npm run pull Allyn # retrieves just the "Allyn" page
npm run download "File:Abrupt Remark.png" # downloads just "Abrupt Remark.png"
npm run push Bax # uploads the "Bax" page
- Expand the capabilities of
update
- Maybe use
modified-date
for raw files. Currently, thesha1
technique has flaws.