dcss-morgue-parser
v0.6.10
Published
Browser-safe Dungeon Crawl Stone Soup morgue parser that turns morgue text into structured JSON.
Downloads
228
Maintainers
Readme
dcss-morgue-parser
Parses DCSS morgue text into structured JSON. Works in Node.js and browsers.
Installation
npm install dcss-morgue-parserUsage
import { parseMorgueText } from 'dcss-morgue-parser'
const result = parseMorgueText(morgueText)
if (result.ok) {
console.log(result.record.playerName)
console.log(result.record.species)
console.log(result.record.background)
console.log(result.record.skills.fighting)
} else {
console.error(result.failure.reason, result.failure.detail)
}Output
version,playerName,species,speciesVariant,background,godgodPietyDisplay,godPietyRank,godOstracismPips,godStatus,godUnderPenancexl,ac,ev,sh,strength,intelligence,dexterityskillsandeffectiveSkills- Equipment slot summaries plus
...Detailswith property bags spells,mutations,form,statusText,statuses,godHistory
See Parser Model for the full schema.
Scope
This package only parses morgue text. It does not fetch morgues, manage caches, or write to disk.
Docs
- LLM Index — shortest package-local index for LLM and agent consumers
- Parser Model — output schema reference
- Parser Usage Contract — exact calling contract for agents and tooling
