This project can be used to generate markdown files for all sorcery codex data.
First time: run npm install @portabletext/markdown
Run the included codex-parser.js file with nodejs
To update the underlying json file the following manual process needs to be performed:
- Open https://curiosa.io/codex
- Open your browser's developers tools (typically F12)
- Copy the inner html of the
<script id="__NEXT_DATA__" type="application/json">field (Firefox users see note below) - Paste the contents into a text editor, preferibly with a json formatter like vs code
- Replace the codex.json files with the entire "data" object (close/fold it to make this faster)
- Make sure to remove the
"data":property so that your file starts[and ends with], and no comma after the last ] - Create the codex.json file and place it next to your codex-parser.js files
- Edit the codex-parser.js to use the file (see comment towards top of main function)
Note: Firefox users need to enable large response payloads to see the data in the inspection tool. This can be done be opening the about:config page and setting devtools.netmonitor.responseBodyLimit to a much higher value, or 0 to disable it all together.