diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index babbaf79..c6731324 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -37,6 +37,10 @@ jobs: working-directory: sharpmush run: dotnet run --project tools/PackageValidator -- ../packages --strict + - name: Check the README package table matches index.yaml + working-directory: packages + run: python3 tools/readme-packages-table.py --check + - name: Check PF2e navigation and notice links working-directory: packages run: python3 tools/check-pf2e-navigation.py diff --git a/README.md b/README.md index b10c37b6..7f092c4b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **Give your world new things to do.** -Official softcode packages for [SharpMUSH](https://github.com/SharpMUSH/SharpMUSH): connected starter rooms, player directories, bulletin boards, roll tables and reference content. +Official softcode packages for [SharpMUSH](https://github.com/SharpMUSH/SharpMUSH): character sheets for tabletop systems, rules references as wiki pages, roll tables and the bridges that join them. **[Browse packages](#packages)** · **[Install a package](#using-this-repo)** · **[Write your own](#contributing-a-package)** @@ -36,88 +36,93 @@ constraints checked before anything is planned. ## Packages +The table is generated from [`index.yaml`](index.yaml); edit that file, then run +`python3 tools/readme-packages-table.py`. + + | Package | Version | Description | |---|---|---| -| [`hello-world/`](hello-world/) | 1.0.0 | Minimal example: one object, one `+hello` command | -| [`who-where/`](who-where/) | 1.2.0 | `+who` and `+where` commands with a shared formatting object | -| [`starter-area/`](starter-area/) | 1.0.0 | Two rooms and linked exits | -| [`bbs-lite/`](bbs-lite/) | 0.9.0-beta | Tiny bulletin board; dependencies, typed configure params, cross-package refs | -| [`http-handler/`](http-handler/) | 1.0.0 | Inbound HTTP verb routers using existing handler objects | -| [`profile-handler/`](profile-handler/) | 1.0.0 | Read-only character directory and profile API; depends on HTTP Handler | -| [`roll-tables/`](roll-tables/) | 1.0.0 | Random tables as softcode data: `+table/roll` tells the room, table keepers edit them by command, and a table can be published to a wiki page | -| [`pf2e-remaster/`](pf2e-remaster/) | 1.4.0 | Pathfinder Second Edition (Remaster) core rules as wiki pages: classes, ancestries, heritages, backgrounds, feats, spells, actions, equipment, skills, conditions and DC tables; a content pack under the ORC License | -| [`sheet-d20/`](sheet-d20/) | 2.2.1 | d20 character sheet built from a ledger: six abilities, a skill list the game edits, training, level, hit points, coin and gear, guided character creation and XP advances; `+check` against a DC or a foe; `+encounter` plays scenes from copies of the sheets, with a bestiary of foes, initiative, turns and conditions | -| [`sheet-d20-help/`](sheet-d20-help/) | 1.0.1 | Bridge: the D20 sheet's topics in `+help` | -| [`sheet-d20-config/`](sheet-d20-config/) | 1.0.2 | Bridge: the D20 sheet's settings, trait table and bestiary in `+config` | -| [`sheet-d20-chargen/`](sheet-d20-chargen/) | 1.1.0 | Bridge: sheet edits follow the player's `+app` application; reviewers read the sheets they review | -| [`sheet-fate/`](sheet-fate/) | 1.6.0 | Fate character sheet: skills or approaches on the ladder, aspects, stunts, stress, consequences and fate points; `+check` on four Fate dice; a grant ledger, guided `+chargen`, encounters that keep their own sheet copies with NPCs from `+npc`, exchanges, harm, concessions, scene aspects and the GM's pool, and milestones and breakthroughs from staff on an award ledger of their own, which players spend with `+sheet/advance`. Fate SRD text under CC BY 3.0 (see its NOTICE) | -| [`sheet-fate-help/`](sheet-fate-help/) | 1.0.0 | Bridge: the Fate sheet's topics in `+help` | -| [`sheet-fate-config/`](sheet-fate-config/) | 1.0.0 | Bridge: the Fate sheet's settings and tables in `+config` | -| [`sheet-fate-chargen/`](sheet-fate-chargen/) | 1.1.0 | Bridge: sheet edits follow the player's `+app` application; reviewers read the sheets they review | -| [`sheet-fate-wiki/`](sheet-fate-wiki/) | 1.1.0 | Fate rules reference as wiki pages: the ladder, aspects, skills, stunts, actions, stress and consequences, `+chargen`, advancement and encounters. Fate SRD text under CC BY 3.0 | -| [`atomic-robo/`](atomic-robo/) | 1.1.0 | Unofficial Atomic Robo pack: pulp action science and giant robots on the Fate sheet: modes that rate skills, mega-stunts, invention with catches and flaws, brainstorms, and machines and enemy robots whose scale counts. Atomic Robo RPG SRD and Fate System Toolkit under CC BY 3.0 (see its NOTICE) | -| [`atomic-robo-help/`](atomic-robo-help/) | 1.0.0 | Bridge: the Atomic Robo topics in `+help` | -| [`atomic-robo-config/`](atomic-robo-config/) | 1.0.0 | Bridge: the Atomic Robo settings and tables in `+config` | -| [`atomic-robo-wiki/`](atomic-robo-wiki/) | 1.1.0 | Unofficial Atomic Robo rules reference as wiki pages: modes, chargen, mega-stunts, invention, brainstorms, scale and machines, advancement | -| [`fate-adversary-toolkit/`](fate-adversary-toolkit/) | 1.0.0 | Unofficial Fate Adversary Toolkit pack: opposition for the Fate sheet: ready adversaries scaled to the game, adversaries built by type, filler mobs that thin as they fall, hazards, blocks, distractions, countdowns, limitations and resistances. Fate Adversary Toolkit SRD under CC BY 3.0 (see its NOTICE) | -| [`fate-adversary-toolkit-help/`](fate-adversary-toolkit-help/) | 1.0.0 | Bridge: the Fate Adversary Toolkit topics in `+help` | -| [`fate-adversary-toolkit-config/`](fate-adversary-toolkit-config/) | 1.0.0 | Bridge: the Fate Adversary Toolkit settings and libraries in `+config` | -| [`fate-adversary-toolkit-wiki/`](fate-adversary-toolkit-wiki/) | 1.0.0 | Unofficial Fate Adversary Toolkit rules reference as wiki pages: enemies, obstacles, constraints | -| [`fate-system-toolkit/`](fate-system-toolkit/) | 1.1.0 | Unofficial Fate System Toolkit pack for the Fate sheet: conditions that soak stress, a Wealth track for money that staff refill with audited parcels, Stormcallers, magic from five storms with barriers, super skills with fate-point bids between powers, gadgets and magic items, and cyberware on a cyber-heart with surgery in play. Fate System Toolkit SRD under CC BY 3.0 (see its NOTICE) | -| [`fate-system-toolkit-help/`](fate-system-toolkit-help/) | 1.1.0 | Bridge: the Fate System Toolkit topics in `+help` | -| [`fate-system-toolkit-config/`](fate-system-toolkit-config/) | 1.1.0 | Bridge: the Fate System Toolkit settings, conditions, storms and augs in `+config` | -| [`fate-system-toolkit-wiki/`](fate-system-toolkit-wiki/) | 1.1.0 | Unofficial Fate System Toolkit rules reference as wiki pages: conditions, Wealth, Stormcallers, supers, gadgets, cyberware | -| [`sheet-pbta/`](sheet-pbta/) | 2.3.1 | Powered by the Apocalypse character sheet built from a ledger: playbooks, stats and moves the game edits, guided character creation, advances, forward, ongoing, hold, harm and XP; `+check` on 2d6; `+encounter` plays scenes from copies of the sheets, with foes from a bestiary and GM moves. Dungeon World moves under CC BY 3.0 (see its NOTICE) | -| [`sheet-pbta-help/`](sheet-pbta-help/) | 1.0.1 | Bridge: the PbtA sheet's topics in `+help` | -| [`sheet-pbta-config/`](sheet-pbta-config/) | 1.0.2 | Bridge: the PbtA sheet's settings and tables, the bestiary and GM moves among them, in `+config` | -| [`sheet-pbta-chargen/`](sheet-pbta-chargen/) | 1.1.0 | Bridge: sheet edits follow the player's `+app` application; reviewers read the sheets they review | -| [`duties-d20/`](duties-d20/) | 1.0.1 | Duties roll provider `d20` on the D20 sheet | -| [`duties-pf2e/`](duties-pf2e/) | 1.0.0 | Duties roll provider `pf2e` on the Pathfinder 2e sheet: skills, Perception and saves against the roller's level DC, Aid, XP and money as rewards | -| [`d20-wiki/`](d20-wiki/) | 1.1.0 | Wiki pages for the d20 sheet: checks and DCs, making a character, abilities and skills, hit points, gear and advancement, and encounters with foes and turns | -| [`duties-fate/`](duties-fate/) | 1.0.0 | Duties roll provider `fate` on the Fate sheet: teamwork, paid invokes, fate points as rewards | -| [`duties-pbta/`](duties-pbta/) | 1.0.2 | Duties roll provider `pbta` on the PbtA sheet: aid, forward and ongoing, XP as a reward | -| [`pbta-wiki/`](pbta-wiki/) | 1.1.0 | Wiki pages for the PbtA sheet: how to play, making a character, the playbooks, the basic and special moves, advancement, and encounters with foes and harm. Dungeon World moves under CC BY 3.0 | -| [`sheet-fitd/`](sheet-fitd/) | 2.2.1 | Forged in the Dark character sheet: twelve actions under three attributes built from a ledger, XP for each attribute spent on advances, stress, trauma, harm, coin, an audited log of XP and coin, encounters played from copies of the sheets, with threats that each have a clock, positions and effect, and progress clocks; `+check` on a d6 pool against a position. Blades in the Dark SRD under CC BY 3.0 (see its NOTICE) | -| [`sheet-fitd-help/`](sheet-fitd-help/) | 1.0.1 | Bridge: the FitD sheet's topics in `+help` | -| [`sheet-fitd-config/`](sheet-fitd-config/) | 1.0.2 | Bridge: the FitD sheet's settings and lists, the threats among them, in `+config` | -| [`sheet-fitd-chargen/`](sheet-fitd-chargen/) | 1.1.0 | Bridge: sheet edits follow the player's `+app` application; reviewers read the sheets they review | -| [`sheet-brp/`](sheet-brp/) | 2.3.0 | Percentile character sheet on Basic Roleplaying: characteristics and a skill list with base chances built from a ledger, point-buy character creation, experience checks that raise skills, hit points, power points, coin, an audited log of coin and skill gains, and encounters played from copies of the sheets, with creatures from a bestiary, hit locations and an order of play by DEX or strike rank; `+check` on 1d100. ORC Licensed Material (see its NOTICE) | -| [`sheet-brp-help/`](sheet-brp-help/) | 1.0.1 | Bridge: the BRP sheet's topics in `+help` | -| [`sheet-brp-config/`](sheet-brp-config/) | 1.0.2 | Bridge: the BRP sheet's settings, skill list and bestiary in `+config` | -| [`sheet-brp-chargen/`](sheet-brp-chargen/) | 1.1.0 | Bridge: sheet edits follow the player's `+app` application; reviewers read the sheets they review | -| [`sheet-ironsworn/`](sheet-ironsworn/) | 2.2.1 | Ironsworn character sheet: five stats and assets built from a ledger, guided character creation, experience spent on new assets and abilities with an audited log, meters, momentum, companion health, iron vows with progress, and encounters that play from copies of the sheets, with foes from a bestiary fought on progress tracks; `+check` action rolls and `+vow`. Ironsworn SRD under CC BY 4.0 (see its NOTICE) | -| [`sheet-ironsworn-help/`](sheet-ironsworn-help/) | 1.0.1 | Bridge: the Ironsworn sheet's topics in `+help` | -| [`sheet-ironsworn-config/`](sheet-ironsworn-config/) | 1.0.2 | Bridge: the Ironsworn sheet's settings, stat and asset lists and bestiary in `+config` | -| [`sheet-ironsworn-chargen/`](sheet-ironsworn-chargen/) | 1.1.0 | Bridge: sheet edits follow the player's `+app` application; reviewers read the sheets they review | -| [`duties-fitd/`](duties-fitd/) | 1.0.1 | Duties roll provider `fitd` on the FitD sheet: assists and pushes paid in stress, coin and stress relief as rewards | -| [`fitd-wiki/`](fitd-wiki/) | 1.1.0 | Wiki pages for the FitD sheet: how to play, making a character, actions and attributes, stress, harm and advancement, encounters with threats, and clocks. Based on the Blades in the Dark SRD under CC BY 3.0 | -| [`duties-brp/`](duties-brp/) | 1.0.2 | Duties roll provider `brp` on the BRP sheet: help as an augment, skill increases and healing as rewards | -| [`brp-wiki/`](brp-wiki/) | 1.1.0 | Wiki pages for the BRP sheet: how to play, making a character, characteristics and skills, hit points, coin and experience, and encounters with creatures. ORC Licensed Material | -| [`ironsworn-wiki/`](ironsworn-wiki/) | 1.1.0 | Wiki pages for the Ironsworn sheet: action rolls, making a character, assets and experience, meters and momentum, iron vows, and encounters with foes. Ironsworn SRD under CC BY 4.0 | -| [`duties-ironsworn/`](duties-ironsworn/) | 1.1.0 | Duties roll provider `ironsworn` on the Ironsworn sheet: help adds 1, experience (logged) and momentum as rewards | -| [`sheet-fabula/`](sheet-fabula/) | 1.2.0 | JRPG character sheet compatible with Fabula Ultima: four attribute dice, the Core Rulebook's and the Atlases' classes and skill levels, HP, MP, IP, Fabula Points, experience and zenit on a ledger, status effects, bonds and encounters, with conflicts in turns against a bestiary of foes on a battle screen with pictures; `+check` rolls two attribute dice against a Difficulty Level. Requires the Fabula Ultima Core Rulebook (see its NOTICE) | -| [`sheet-fabula-help/`](sheet-fabula-help/) | 1.0.0 | Bridge: the JRPG sheet's topics in `+help` | -| [`sheet-fabula-config/`](sheet-fabula-config/) | 1.0.0 | Bridge: the JRPG sheet's settings and class list in `+config` | -| [`sheet-fabula-chargen/`](sheet-fabula-chargen/) | 1.0.0 | Bridge: sheet edits follow the player's `+app` application; reviewers read the sheets they review | -| [`fabula-wiki/`](fabula-wiki/) | 1.2.0 | JRPG rules as wiki pages: character creation, checks, Fabula Points and bonds, resources, levels and zenit, status effects, conflicts, classes and the commands on this game. Requires the Fabula Ultima Core Rulebook (see its NOTICE) | -| [`duties-fabula/`](duties-fabula/) | 1.0.0 | Duties roll provider `fabula` on the JRPG sheet: help and bonds add to the total, Fabula Points pay for rerolls, experience, zenit and Fabula Points as rewards | -| [`sheet-salvage-union/`](sheet-salvage-union/) | 1.3.0 | Salvage Union pilots, mechs and the Union Crawler: class ability trees, chassis, systems and modules, scrap by tech level, heat; `+check` rolls the d20 on the Core Mechanic table. Unofficial, under the Salvage Union Open Game Licence 1.0b (see its NOTICE) | -| [`sheet-salvage-union-help/`](sheet-salvage-union-help/) | 1.0.0 | Bridge: the Salvage Union sheet's topics in `+help` | -| [`sheet-salvage-union-config/`](sheet-salvage-union-config/) | 1.0.0 | Bridge: the Salvage Union sheet's settings in `+config` | -| [`sheet-salvage-union-chargen/`](sheet-salvage-union-chargen/) | 1.0.0 | Bridge: sheet and mech edits follow the player's `+app` application; reviewers read the sheets they review | -| [`duties-salvage-union/`](duties-salvage-union/) | 1.0.2 | Duties roll provider `salvage` on the Salvage Union sheet: abilities and mech parts as traits, Training Points and crawler scrap as rewards | -| [`salvage-union-wiki/`](salvage-union-wiki/) | 1.0.3 | Salvage Union rules as wiki pages: the core rules, Pilot Bay, Mech Workshop, every chassis blueprint, the Union Crawler, salvaging, the denizens of the wasteland, and a page for every ability, system, module, piece of equipment and table. Unofficial, under the Salvage Union Open Game Licence 1.0b (see its NOTICE) | -| [`sheet-charge/`](sheet-charge/) | 1.2.0 | Charge character sheet: details, twelve actions in dots, momentum, a stress clock and condition, milestones and talents on a ledger, encounters with their own sheet copies, threats and consequences, and clocks; `+check` on a d6 pool against a risk, with assists, pushes, determination and fortune rolls. Charge SRD under CC BY 4.0 (see its NOTICE) | -| [`sheet-charge-help/`](sheet-charge-help/) | 1.0.0 | Bridge: the Charge sheet's topics in `+help` | -| [`sheet-charge-config/`](sheet-charge-config/) | 1.0.0 | Bridge: the Charge sheet's settings and lists in `+config` | -| [`sheet-charge-chargen/`](sheet-charge-chargen/) | 1.0.0 | Bridge: giving out action dots follows the player's `+app` application; reviewers read the sheets they review | -| [`charge-wiki/`](charge-wiki/) | 1.0.2 | Charge rules as wiki pages: the game, character creation, action rolls, momentum, teamwork, consequences, stress, clocks, progression, fortune rolls and the commands that play them; a content pack under CC BY 4.0 (see its NOTICE) | -| [`duties-charge/`](duties-charge/) | 1.0.0 | Duties roll provider `charge` on the Charge sheet: assists and pushes paid in momentum, momentum, milestones and stress recovery as rewards | - -These currently double as the reference implementations for package authors — -each README explains which manifest features it demonstrates. The curated -default softcode experience (scene-system, bboard, chargen, events, finger, -http-hooks) will land here as those systems mature. +| [`roll-tables/`](roll-tables/) | 1.0.0 | Random tables as softcode data, rolled in the room with +table/roll and publishable to the wiki | +| [`pf2e-remaster/`](pf2e-remaster/) | 1.6.3 | Pathfinder Second Edition (Remaster) core rules as wiki pages (classes, ancestries, feats, spells, equipment, skills, conditions, DC tables; ORC License) | +| [`sheet-d20/`](sheet-d20/) | 2.2.2 | d20 character sheet built from a ledger (abilities, skills, training, level, hit points, coin, gear), guided character creation, +check against a DC or a foe, and encounters with their own sheet copies, foes from a bestiary, initiative and conditions | +| [`sheet-d20-help/`](sheet-d20-help/) | 1.0.2 | Puts the D20 sheet topics into +help | +| [`sheet-d20-config/`](sheet-d20-config/) | 1.0.3 | Puts the D20 sheet settings, trait table and bestiary into +config | +| [`sheet-d20-chargen/`](sheet-d20-chargen/) | 1.1.1 | Joins the D20 sheet to +app character applications | +| [`sheet-fate/`](sheet-fate/) | 1.6.1 | Fate character sheet (skills or approaches, aspects, stunts, stress, consequences, fate points) with +check on four Fate dice, a grant ledger, guided +chargen, encounters with their own sheet copies, NPC opposition from +npc and the commands to run a conflict, and audited milestones and breakthroughs that players spend with +sheet/advance; Fate SRD text under CC BY 3.0 | +| [`sheet-fate-help/`](sheet-fate-help/) | 1.0.1 | Puts the Fate sheet topics into +help | +| [`sheet-fate-config/`](sheet-fate-config/) | 1.0.1 | Puts the Fate sheet settings and its skill, approach, stress and consequence tables into +config | +| [`sheet-fate-chargen/`](sheet-fate-chargen/) | 1.1.1 | Joins the Fate sheet to +app character applications | +| [`sheet-fate-wiki/`](sheet-fate-wiki/) | 1.1.1 | Fate rules reference as wiki pages; Fate SRD text under CC BY 3.0 | +| [`atomic-robo/`](atomic-robo/) | 1.1.1 | Unofficial Atomic Robo pack, pulp action science and giant robots on the Fate sheet (modes, mega-stunts, invention, brainstorms, machines and enemy robots at scale); Atomic Robo RPG SRD and Fate System Toolkit text under CC BY 3.0 | +| [`atomic-robo-help/`](atomic-robo-help/) | 1.0.1 | Puts the Atomic Robo topics into +help | +| [`atomic-robo-config/`](atomic-robo-config/) | 1.0.1 | Puts the Atomic Robo settings and its modes and scales tables into +config | +| [`atomic-robo-wiki/`](atomic-robo-wiki/) | 1.1.1 | Unofficial Atomic Robo rules reference as wiki pages; Atomic Robo RPG SRD and Fate System Toolkit text under CC BY 3.0 | +| [`fate-adversary-toolkit/`](fate-adversary-toolkit/) | 1.0.1 | Unofficial Fate Adversary Toolkit pack, opposition for the Fate sheet (ready adversaries scaled to your game, adversaries built by type, filler mobs, hazards, blocks, distractions, countdowns, limitations and resistances); Fate Adversary Toolkit SRD text under CC BY 3.0 | +| [`fate-adversary-toolkit-help/`](fate-adversary-toolkit-help/) | 1.0.1 | Puts the Fate Adversary Toolkit topics into +help | +| [`fate-adversary-toolkit-config/`](fate-adversary-toolkit-config/) | 1.0.1 | Puts the Fate Adversary Toolkit settings and its adversary and obstacle libraries into +config | +| [`fate-adversary-toolkit-wiki/`](fate-adversary-toolkit-wiki/) | 1.0.1 | Unofficial Fate Adversary Toolkit rules reference as wiki pages; Fate Adversary Toolkit SRD text under CC BY 3.0 | +| [`fate-system-toolkit/`](fate-system-toolkit/) | 1.1.1 | Unofficial Fate System Toolkit pack for the Fate sheet (conditions that soak stress, a Wealth track for money on an audited ledger, Stormcallers' storm magic with barriers, super skills with fate-point bids between powers, gadgets and magic items, and cyberware with surgery); Fate System Toolkit SRD text under CC BY 3.0 | +| [`fate-system-toolkit-help/`](fate-system-toolkit-help/) | 1.1.1 | Puts the Fate System Toolkit topics into +help | +| [`fate-system-toolkit-config/`](fate-system-toolkit-config/) | 1.1.1 | Puts the Fate System Toolkit settings, conditions, storms and augs into +config | +| [`fate-system-toolkit-wiki/`](fate-system-toolkit-wiki/) | 1.1.1 | Unofficial Fate System Toolkit rules reference as wiki pages; Fate System Toolkit SRD text under CC BY 3.0 | +| [`duties-d20/`](duties-d20/) | 1.0.2 | Duties roll provider "d20" on the D20 sheet | +| [`duties-pf2e/`](duties-pf2e/) | 1.0.1 | Duties roll provider "pf2e" on the Pathfinder 2e sheet | +| [`duties-fate/`](duties-fate/) | 1.0.1 | Duties roll provider "fate" on the Fate sheet | +| [`sheet-pbta/`](sheet-pbta/) | 2.3.2 | Powered by the Apocalypse character sheet built from a ledger (playbooks, stats, moves, guided character creation, advances, forward, ongoing, hold, harm, XP), +check on 2d6 and encounters on sheet copies with foes and GM moves; Dungeon World moves under CC BY 3.0 | +| [`sheet-pbta-help/`](sheet-pbta-help/) | 1.0.2 | Puts the PbtA sheet topics into +help | +| [`sheet-pbta-config/`](sheet-pbta-config/) | 1.0.3 | Puts the PbtA sheet settings and its stats, moves, playbooks, foes and GM moves tables into +config | +| [`sheet-pbta-chargen/`](sheet-pbta-chargen/) | 1.1.1 | Joins the PbtA sheet to +app character applications | +| [`duties-pbta/`](duties-pbta/) | 1.0.3 | Duties roll provider "pbta" on the PbtA sheet | +| [`pbta-wiki/`](pbta-wiki/) | 1.1.1 | Wiki pages for the PbtA sheet (how to play, making a character, playbooks, moves, advancement, encounters, foes); Dungeon World moves under CC BY 3.0 | +| [`d20-wiki/`](d20-wiki/) | 1.1.1 | Wiki pages for the d20 sheet (checks and DCs, making a character, abilities and skills, hit points, gear and advancement, encounters) | +| [`fitd-wiki/`](fitd-wiki/) | 1.1.1 | Wiki pages for the FitD sheet (how to play, making a character, actions and attributes, stress, harm and advancement, encounters, threats, clocks); based on the Blades in the Dark SRD under CC BY 3.0 | +| [`brp-wiki/`](brp-wiki/) | 1.1.1 | Wiki pages for the BRP sheet (how to play, making a character, characteristics and skills, hit points, coin and experience, encounters, creatures); ORC Licensed Material | +| [`ironsworn-wiki/`](ironsworn-wiki/) | 1.1.1 | Wiki pages for the Ironsworn sheet (how to play, making a character, assets and experience, meters and momentum, vows, encounters, foes); based on the Ironsworn SRD under CC BY 4.0 | +| [`pf2e/`](pf2e/) | 0.10.17 | Pathfinder Second Edition rules read the way Foundry VTT's pf2e system reads them, with ledger character sheets, a character builder, spellcasting, a deity table the game fills, alchemy, encounters with a bestiary, hazards, effects and GM tools, exploration, skill challenges, downtime, loot and shops with unidentified items, audited awards and levels (ORC License) | +| [`pf2e-portal/`](pf2e-portal/) | 1.0.0 | Joins the Pathfinder 2e rules to the HTTP handler, for the pf2e-app sheet page | +| [`pf2e-app/`](pf2e-app/) | 1.0.0 | The Pathfinder 2e sheet as a portal page at /apps/pf2e | +| [`pf2e-help/`](pf2e-help/) | 1.0.1 | Puts the Pathfinder 2e topics into +help | +| [`pf2e-config/`](pf2e-config/) | 1.0.1 | Puts the Pathfinder 2e settings into +config | +| [`sheet-fitd/`](sheet-fitd/) | 2.2.2 | Forged in the Dark character sheet (ledger-built actions, XP advances, stress, trauma, harm, coin, audited log, encounters with threats and positions, clocks) with +check on a d6 pool; Blades in the Dark SRD under CC BY 3.0 | +| [`sheet-fitd-help/`](sheet-fitd-help/) | 1.0.2 | Puts the FitD sheet topics into +help | +| [`sheet-fitd-config/`](sheet-fitd-config/) | 1.0.3 | Puts the FitD sheet settings and action, attribute and threat tables into +config | +| [`sheet-fitd-chargen/`](sheet-fitd-chargen/) | 1.1.1 | Joins the FitD sheet to +app character applications | +| [`sheet-brp/`](sheet-brp/) | 2.3.1 | Percentile character sheet on Basic Roleplaying (ledger-built characteristics and skills, point-buy chargen, experience checks, hit points, power points, coin, audited log, encounters with creatures, hit locations and strike ranks) with +check on 1d100; ORC Licensed Material | +| [`sheet-brp-help/`](sheet-brp-help/) | 1.0.2 | Puts the BRP sheet topics into +help | +| [`sheet-brp-config/`](sheet-brp-config/) | 1.0.3 | Puts the BRP sheet settings, skill table and bestiary into +config | +| [`sheet-brp-chargen/`](sheet-brp-chargen/) | 1.1.1 | Joins the BRP sheet to +app character applications | +| [`sheet-ironsworn/`](sheet-ironsworn/) | 2.2.2 | Ironsworn character sheet (stats and assets built from a ledger, meters, experience spent on assets with an audited log, companion health, iron vows, encounters with their own copies, foes on progress tracks) with +check action rolls and +vow; Ironsworn SRD under CC BY 4.0 | +| [`sheet-ironsworn-help/`](sheet-ironsworn-help/) | 1.0.2 | Puts the Ironsworn sheet topics into +help | +| [`sheet-ironsworn-config/`](sheet-ironsworn-config/) | 1.0.3 | Puts the Ironsworn sheet settings, stat and asset tables and bestiary into +config | +| [`sheet-ironsworn-chargen/`](sheet-ironsworn-chargen/) | 1.1.1 | Joins the Ironsworn sheet to +app character applications | +| [`duties-fitd/`](duties-fitd/) | 1.0.2 | Duties roll provider "fitd" on the FitD sheet | +| [`duties-brp/`](duties-brp/) | 1.0.3 | Duties roll provider "brp" on the BRP sheet | +| [`duties-ironsworn/`](duties-ironsworn/) | 1.1.1 | Duties roll provider "ironsworn" on the Ironsworn sheet | +| [`sheet-fabula/`](sheet-fabula/) | 1.2.1 | JRPG character sheet compatible with Fabula Ultima (four attribute dice, the Core Rulebook's and the Atlases' classes, HP/MP/IP, Fabula Points, status effects, bonds) with +check against a Difficulty Level, and conflicts in turns against a bestiary of foes on a battle screen with pictures; requires the Fabula Ultima Core Rulebook | +| [`sheet-fabula-help/`](sheet-fabula-help/) | 1.0.1 | Puts the JRPG sheet topics into +help | +| [`sheet-fabula-config/`](sheet-fabula-config/) | 1.0.1 | Puts the JRPG sheet settings and class table into +config | +| [`sheet-fabula-chargen/`](sheet-fabula-chargen/) | 1.0.1 | Joins the JRPG sheet to +app character applications | +| [`duties-fabula/`](duties-fabula/) | 1.0.1 | Duties roll provider "fabula" on the JRPG sheet | +| [`fabula-wiki/`](fabula-wiki/) | 1.2.1 | JRPG sheet rules as wiki pages (checks, Fabula Points, bonds, resources, statuses, conflicts, classes); requires the Fabula Ultima Core Rulebook | +| [`sheet-salvage-union/`](sheet-salvage-union/) | 1.3.1 | Salvage Union pilots, mechs and the Union Crawler (class ability trees, chassis, systems, modules, scrap, heat) with d20 +check on the Core Mechanic table; Salvage Union Open Game Licence 1.0b, unofficial | +| [`sheet-salvage-union-help/`](sheet-salvage-union-help/) | 1.0.1 | Puts the Salvage Union sheet topics into +help | +| [`sheet-salvage-union-config/`](sheet-salvage-union-config/) | 1.0.1 | Puts the Salvage Union sheet settings into +config | +| [`sheet-salvage-union-chargen/`](sheet-salvage-union-chargen/) | 1.0.1 | Joins the Salvage Union sheet to +app character applications | +| [`duties-salvage-union/`](duties-salvage-union/) | 1.0.3 | Duties roll provider "salvage" on the Salvage Union sheet | +| [`salvage-union-wiki/`](salvage-union-wiki/) | 1.0.4 | Salvage Union rules as wiki pages (core rules, Pilot Bay, Mech Workshop, chassis, Union Crawler, salvaging, denizens, and every ability, system, module, equipment and table); Salvage Union Open Game Licence 1.0b, unofficial | +| [`sheet-charge/`](sheet-charge/) | 1.2.1 | Charge character sheet (details, action dots, momentum, stress clock, milestones and talents) with +check action rolls, assists, determination and fortune rolls, encounters with threats and consequences, and clocks; Charge SRD under CC BY 4.0 | +| [`sheet-charge-help/`](sheet-charge-help/) | 1.0.1 | Puts the Charge sheet topics into +help | +| [`sheet-charge-config/`](sheet-charge-config/) | 1.0.1 | Puts the Charge sheet settings and action and detail tables into +config | +| [`sheet-charge-chargen/`](sheet-charge-chargen/) | 1.0.1 | Joins the Charge sheet to +app character applications | +| [`charge-wiki/`](charge-wiki/) | 1.0.3 | Charge rules as wiki pages (action rolls, momentum, consequences, stress, clocks, progression; CC BY 4.0) | +| [`duties-charge/`](duties-charge/) | 1.0.1 | Duties roll provider "charge" on the Charge sheet | + + +Packages bundled with SharpMUSH (`+who`/`+where`, the HTTP handler, the +character profile API, bulletin boards and others) ship inside the server and +are not in this repo; some install on a new game, the rest from the admin +panel. Small teaching examples for package authors are in the +SharpMUSH Guide. ## PF2e feed @@ -141,7 +146,7 @@ A package is a directory containing a `package.yaml` manifest; the root and description. **Releases are git tags** named `/v` — e.g. -`who-where/v1.2.0`. The admin panel's version list is the tag list; installing +`roll-tables/v1.0.0`. The admin panel's version list is the tag list; installing a version checks out its tag; `main` is the development channel. Release tags are **immutable**: never move or delete one — publish a fix as a new version. Installers record the exact commit they applied and warn loudly if a release @@ -214,7 +219,7 @@ mode: warnings fail). 5. Once merged, a maintainer tags the release `/v`. Package ids are first-come within this repo, must not collide with an -existing id even with punctuation stripped (`who-where` blocks `whowhere`), +existing id even with punctuation stripped (`roll-tables` blocks `rolltables`), and released versions are never rewritten — bump the version instead. ## License diff --git a/bbs-lite/README.md b/bbs-lite/README.md deleted file mode 100644 index cd43f52a..00000000 --- a/bbs-lite/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# bbs-lite - -A deliberately tiny bulletin board that exercises every manifest feature -beyond the basics: - -- **Dependency with a range constraint and a source hint** — requires - `who-where` at any 1.x version (`>=1.0 <2.0`). Install is blocked until it's - present, but because the dependency declares a `source:` (repo, directory - path, branch), the installer can offer to fetch it from there rather than - just reporting it missing. -- **Cross-package ref** — the function object is `@parent`ed to - `{{who-where/ww_functions}}`, an object owned by the dependency. Cross-package - refs are only legal when the target package is declared under `depends:`. -- **Typed configure parameters** — `{{?bbs_storage}}` is a dbref the admin - supplies during review; `{{?board_name}}` is a string with a default - (`"Community Board"`). dbref-typed params can't declare defaults — dbrefs - are game-specific, which is the point of configure. -- **`conflicts:`** — declares it can't coexist with `legacy-bbs`. -- **Well-known ref** — the lounge room is parented to `{{$room_zero}}`. -- **Lock with an internal ref** — the function object's use-lock points at - `{{bbsl_global}}`, so only the global object can call its functions. -- **Attribute flags** — `BBSL_FN_LIST` carries `no_clone`. -- **Prerelease version** — `0.9.0-beta` sorts before `0.9.0` and is never - selected by a release-only constraint like `>=0.9`. - -Posts are stored as `POST_` attributes on the configured storage -object; `+bbread` lists them via `lattr()` with a `firstof()` fallback when -the board is empty. diff --git a/bbs-lite/package.yaml b/bbs-lite/package.yaml deleted file mode 100644 index 41cbcc4f..00000000 --- a/bbs-lite/package.yaml +++ /dev/null @@ -1,57 +0,0 @@ -format: 1 -package: bbs-lite -version: 0.9.0-beta -authors: [SharpMUSH] -description: "Tiny bulletin board demonstrating dependencies, typed configure params, cross-package refs, and locks." -license: MIT -keywords: [bbs, boards, example] -convention_prefix: BBSL_ -requires_server: ">=0.1" - -depends: - - package: who-where - version: ">=1.0 <2.0" - source: - repo: https://github.com/SharpMUSH/SharpMUSH-Packages - path: who-where/ - branch: main - -conflicts: - - legacy-bbs - -configure: - bbs_storage: - label: "Object that stores board posts (any thing the game owns)" - type: dbref - board_name: - label: "Display name of the board" - type: string - default: "Community Board" - -objects: - - ref: bbsl_global - type: thing - name: BBS-Lite Global Object - attributes: - CMD_+BBPOST: |- - $+bbpost *:&POST_[secs()] {{?bbs_storage}}=%0; @pemit %#=Posted to {{?board_name}}. - CMD_+BBREAD: |- - $+bbread:@pemit %#=[u({{bbsl_functions}}/BBSL_FN_LIST,{{?bbs_storage}})] - - - ref: bbsl_functions - type: thing - name: BBS-Lite Function Object - parent: "{{who-where/ww_functions}}" - flags: [no_command] - locks: - use: "{{bbsl_global}}" - attributes: - BBSL_FN_LIST: - value: |- - firstof(iter(lattr(%0/POST_*),%r[get(%0/%i0)],,),No posts on {{?board_name}} yet.) - flags: [no_clone] - - - ref: bbsl_lounge - type: room - name: BBS Lounge - parent: "{{$room_zero}}" diff --git a/hello-world/README.md b/hello-world/README.md deleted file mode 100644 index 420af87d..00000000 --- a/hello-world/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# hello-world - -The smallest possible package: a single thing carrying one `$command` -attribute, written in the shorthand form (`ATTR: "value"` instead of a -`value:`/`flags:` mapping). - -After install, players get a `+hello` command that greets them by name. diff --git a/hello-world/package.yaml b/hello-world/package.yaml deleted file mode 100644 index a754b57f..00000000 --- a/hello-world/package.yaml +++ /dev/null @@ -1,15 +0,0 @@ -format: 1 -package: hello-world -version: 1.0.0 -authors: [SharpMUSH] -description: "Minimal example package: one object, one command." -license: MIT -keywords: [example, greeting] - -objects: - - ref: hello_global - type: thing - name: Hello World Object - attributes: - CMD_+HELLO: |- - $+hello:@pemit %#=Hello, [name(%#)]! diff --git a/http-handler/README.md b/http-handler/README.md deleted file mode 100644 index a7fbbfe3..00000000 --- a/http-handler/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# http-handler - -The inbound HTTP **verb routers** (`GET`/`POST`/`PUT`/`DELETE`/`PATCH`/`HEAD`), -delivered as an attach-mode package (decision 20.3). The base of the HTTP API. - -Each verb maps a request path to a backtick sub-attribute -(`GET /http/foo/bar` → `` GET`FOO`BAR ``), decodes the query string into -`%q`, and answers a clean `404 API NOT FOUND` for unrouted paths. It -manages only these attributes on the configured `http_handler` object -(`{{$http_handler}}`, #4) — it never creates or destroys the object. - -Feature packages add routes as backtick children of these verbs and depend on -this package — see [`profile-handler`](../profile-handler/). Installing -`http-handler` alone gives you a working router with no routes yet; uninstall -it and the handler object keeps its other softcode. diff --git a/http-handler/package.yaml b/http-handler/package.yaml deleted file mode 100644 index f2464c88..00000000 --- a/http-handler/package.yaml +++ /dev/null @@ -1,33 +0,0 @@ -format: 1 -package: http-handler -version: 1.0.0 -authors: [SharpMUSH] -description: "Inbound HTTP verb routers (GET/POST/…) for the configured http_handler object." -license: MIT -homepage: https://github.com/SharpMUSH/SharpMUSH-Packages -keywords: [http, api, router] -requires_server: ">=0.1" - -# Attach mode (decision 20.3): manages the verb-router attributes on the -# existing http_handler object ({{$http_handler}}, #4 by default). The base of -# the HTTP API — feature packages (e.g. profile-handler) depend on this and add -# their own routes as backtick children of these verbs. -objects: - - ref: handler - target: "{{$http_handler}}" - attributes: - # %0 = path+query, %1 = body. formq() decodes the query string into - # %q; @assert maps the path to VERB`PATH`SEGMENTS and 404s on a - # missing route; @include runs the sub-handler with %0 = raw body. - GET: |- - think setq(fields,formq(after(%0,?))); @assert cand(t(setr(attrpath,edit(before(rest(%0,/),?),/,`))),hasattr(me,GET`%q))=@respond 404 API NOT FOUND; @include me/GET`%q=%1 - POST: |- - think setq(fields,formq(after(%0,?))); @assert cand(t(setr(attrpath,edit(before(rest(%0,/),?),/,`))),hasattr(me,POST`%q))=@respond 404 API NOT FOUND; @include me/POST`%q=%1 - PUT: |- - think setq(fields,formq(after(%0,?))); @assert cand(t(setr(attrpath,edit(before(rest(%0,/),?),/,`))),hasattr(me,PUT`%q))=@respond 404 API NOT FOUND; @include me/PUT`%q=%1 - DELETE: |- - think setq(fields,formq(after(%0,?))); @assert cand(t(setr(attrpath,edit(before(rest(%0,/),?),/,`))),hasattr(me,DELETE`%q))=@respond 404 API NOT FOUND; @include me/DELETE`%q=%1 - PATCH: |- - think setq(fields,formq(after(%0,?))); @assert cand(t(setr(attrpath,edit(before(rest(%0,/),?),/,`))),hasattr(me,PATCH`%q))=@respond 404 API NOT FOUND; @include me/PATCH`%q=%1 - HEAD: |- - think setq(fields,formq(after(%0,?))); @assert cand(t(setr(attrpath,edit(before(rest(%0,/),?),/,`))),hasattr(me,HEAD`%q))=@respond 404 API NOT FOUND; @include me/HEAD`%q=%1 diff --git a/index.yaml b/index.yaml index 2e243b28..614b03e9 100644 --- a/index.yaml +++ b/index.yaml @@ -1,32 +1,6 @@ name: SharpMUSH Packages description: Official softcode packages for SharpMUSH. packages: - - path: hello-world/ - package: hello-world - version: 1.0.0 - description: Minimal example — one object, one command - - path: who-where/ - name: Who/Where - package: who-where - version: 1.2.0 - description: +who and +where commands - - path: bbs-lite/ - name: BBS Lite - package: bbs-lite - version: 0.9.0-beta - description: Tiny bulletin board — dependencies, configure, cross-package refs - - path: starter-area/ - package: starter-area - version: 1.0.0 - description: Two rooms and linked exits - - path: http-handler/ - package: http-handler - version: 1.0.0 - description: Inbound HTTP verb routers (attach mode) - - path: profile-handler/ - package: profile-handler - version: 1.0.0 - description: Read-only character directory + profile API (requires http-handler) - path: roll-tables/ name: Roll Tables package: roll-tables diff --git a/profile-handler/README.md b/profile-handler/README.md deleted file mode 100644 index fefc9649..00000000 --- a/profile-handler/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# profile-handler - -The read-only **character directory and profile API**, delivered as an -attach-mode package that **requires** [`http-handler`](../http-handler/). - -Its routes are backtick children of `http-handler`'s `GET` verb: - -- `GET /http/characters` → `` GET`CHARACTERS `` — JSON array of visible players -- `GET /http/profile?objid=#1:123` → `` GET`PROFILE `` — one character's public profile -- `GET /http/profile/schema` → `` GET`PROFILE`SCHEMA `` — the portal's field schema - -Plus redefinable helpers (`` FN`CHARCAT `` categorization, `` FN`CHARVIS `` -visibility, …). Because it depends on `http-handler`, the package manager -installs the verbs first and blocks uninstalling `http-handler` while this is -present. Disable the directory/profile API independently by uninstalling just -`profile-handler` — the verb routers stay. diff --git a/profile-handler/package.yaml b/profile-handler/package.yaml deleted file mode 100644 index e6c072e7..00000000 --- a/profile-handler/package.yaml +++ /dev/null @@ -1,51 +0,0 @@ -format: 1 -package: profile-handler -version: 1.0.0 -authors: [SharpMUSH] -description: "Read-only character directory and profile API, served through the HTTP verb routers." -license: MIT -homepage: https://github.com/SharpMUSH/SharpMUSH-Packages -keywords: [http, api, profile, portal] -requires_server: ">=0.1" - -# Requires the verb routers — its GET`* routes are backtick children of the GET -# verb that http-handler provides. The dependency also blocks uninstalling -# http-handler while this is installed. -depends: - - package: http-handler - version: ">=1.0 <2.0" - source: - repo: https://github.com/SharpMUSH/SharpMUSH-Packages - path: http-handler/ - -objects: - - ref: handler - target: "{{$http_handler}}" - attributes: - # ── Helpers (me-relative; redefinable per game) ────────────────────── - # One profile field as the {value, visible} shape. %0 = objid, %1 = key. - FN`FIELD: |- - json(object,value,json(string,get(%0/PROFILE`%1)),visible,json(boolean,true)) - # Directory category for one player (%0). Wizard > Royalty > Guest; blank otherwise. - FN`CHARCAT: |- - firstof(if(hasflag(%0,WIZARD),Wizard),if(hasflag(%0,ROYALTY),Royalty),if(haspower(%0,Guest),Guest)) - # One character-directory row. %0 = player. created = unix ms. - FN`CHARROW: |- - json(object,name,json(string,name(%0)),objid,json(string,objid(%0)),created,json(number,ctime(%0,1)),category,json(string,u(FN`CHARCAT,%0))) - # fold() step: append a row to the JSON array. %0 = array so far, %1 = player. - FN`JARRINS: |- - json_mod(%0,insert,$\[[json_query(%0,size)]\],u(FN`CHARROW,%1)) - # Directory visibility predicate (%0): 1 lists, 0 hides. Default hides Guests. - FN`CHARVIS: |- - not(strmatch(u(FN`CHARCAT,%0),Guest)) - - # ── Routes (children of http-handler's GET verb) ───────────────────── - # GET /http/characters — every visible player as a JSON array. - GET`CHARACTERS: |- - @respond/type application/json; think fold(me/FN`JARRINS,filter(me/FN`CHARVIS,lsearch(all,type,player)),\[\]) - # GET /http/profile?objid=#1:123 — one character's public profile. - GET`PROFILE: |- - @assert cand(isdbref(%q),hastype(%q,player))=@respond 404 NO SUCH CHARACTER; @respond/type application/json; think json(object,character,json(string,name(%q)),objid,json(string,objid(%q)),dbref,json(string,num(%q)),fields,json(object,fullname,u(FN`FIELD,%q,fullname),alias,u(FN`FIELD,%q,alias),age,u(FN`FIELD,%q,age),concept,u(FN`FIELD,%q,concept),faction,u(FN`FIELD,%q,faction),description,u(FN`FIELD,%q,description))) - # GET /http/profile/schema — the field/section schema the portal renders from. - GET`PROFILE`SCHEMA: |- - @respond/type application/json; think json(object,sections,json(array,json(object,name,json(string,Demographics),order,json(number,1),fields,json(array,json(object,key,json(string,fullname),label,json(string,Full Name),type,json(string,text),visible_to,json(string,public),max_length,json(number,120)),json(object,key,json(string,alias),label,json(string,Alias),type,json(string,text),visible_to,json(string,public)),json(object,key,json(string,age),label,json(string,Age),type,json(string,text),visible_to,json(string,public)),json(object,key,json(string,concept),label,json(string,Concept),type,json(string,text),visible_to,json(string,public)))),json(object,name,json(string,Status),order,json(number,2),fields,json(array,json(object,key,json(string,faction),label,json(string,Faction),type,json(string,text),visible_to,json(string,public)))),json(object,name,json(string,Description),order,json(number,3),fields,json(array,json(object,key,json(string,description),label,json(string,Description),type,json(string,mstring),visible_to,json(string,public)))))) diff --git a/starter-area/README.md b/starter-area/README.md deleted file mode 100644 index e79aa28e..00000000 --- a/starter-area/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# starter-area - -A two-room area — Town Square and The Rusty Tankard — joined by a pair of -exits. Demonstrates the building-block features: - -- **Rooms** parented to `{{$room_zero}}` (rooms never declare a `location`). -- **Exits** with required `location:` (source room) and `destination:`, - both expressed as intra-package refs so the area wires itself up no matter - what dbrefs it lands on. -- Standard exit naming (`Tavern;tavern;east;e`) and `SUCCESS` messages as - block scalars. diff --git a/starter-area/package.yaml b/starter-area/package.yaml deleted file mode 100644 index dfaa41b8..00000000 --- a/starter-area/package.yaml +++ /dev/null @@ -1,44 +0,0 @@ -format: 1 -package: starter-area -version: 1.0.0 -authors: [SharpMUSH] -description: "A two-room starter area demonstrating rooms and linked exits." -license: MIT -keywords: [area, building, example] - -objects: - - ref: town_square - type: room - name: Town Square - parent: "{{$room_zero}}" - attributes: - DESCRIBE: |- - A modest square of worn cobblestones. The warm glow of the - Rusty Tankard spills out of its doorway to the east. - - - ref: rusty_tankard - type: room - name: The Rusty Tankard - parent: "{{$room_zero}}" - attributes: - DESCRIBE: |- - Low beams, a crackling hearth, and a barkeep who has heard - every story twice. The square lies back out to the west. - - - ref: square_to_tavern - type: exit - name: Tavern;tavern;east;e - location: "{{town_square}}" - destination: "{{rusty_tankard}}" - attributes: - SUCCESS: |- - You push through the tavern door. - - - ref: tavern_to_square - type: exit - name: Square;square;out;west;w - location: "{{rusty_tankard}}" - destination: "{{town_square}}" - attributes: - SUCCESS: |- - You step back out into the square. diff --git a/tools/readme-packages-table.py b/tools/readme-packages-table.py new file mode 100644 index 00000000..29695dcf --- /dev/null +++ b/tools/readme-packages-table.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +"""Writes the README's package table from index.yaml. + +The table sits between the two marker comments in README.md. index.yaml is the +source: add, bump or describe a package there and run this script. + + python3 tools/readme-packages-table.py # rewrite README.md + python3 tools/readme-packages-table.py --check # fail if README.md is out of date +""" +import argparse +import pathlib +import sys + +import yaml + +ROOT = pathlib.Path(__file__).resolve().parent.parent +README = ROOT / "README.md" +INDEX = ROOT / "index.yaml" +BEGIN = "" +END = "" + + +def cell(text): + return " ".join(str(text).split()).replace("|", "\\|") + + +def table(): + index = yaml.safe_load(INDEX.read_text(encoding="utf-8")) + rows = ["| Package | Version | Description |", "|---|---|---|"] + for entry in index["packages"]: + path = entry["path"] + rows.append(f"| [`{path}`]({path}) | {cell(entry['version'])} | {cell(entry['description'])} |") + return "\n".join(rows) + + +def render(readme): + start = readme.find(BEGIN) + stop = readme.find(END) + if start < 0 or stop < start: + sys.exit(f"README.md: the markers {BEGIN!r} and {END!r} are missing or out of order.") + return readme[: start + len(BEGIN)] + "\n" + table() + "\n" + readme[stop:] + + +def main(): + parser = argparse.ArgumentParser(allow_abbrev=False) + parser.add_argument("--check", action="store_true", help="fail if README.md is out of date") + args = parser.parse_args() + current = README.read_text(encoding="utf-8") + wanted = render(current) + if args.check: + if current != wanted: + print("::error file=README.md::The package table is out of date. Run: python3 tools/readme-packages-table.py") + return 1 + print("README package table matches index.yaml.") + return 0 + if current != wanted: + README.write_text(wanted, encoding="utf-8") + print("README.md updated.") + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/who-where/README.md b/who-where/README.md deleted file mode 100644 index cee79de4..00000000 --- a/who-where/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# who-where - -`+who` and `+where` commands. Demonstrates the standard two-object shape: - -- **`ww_global`** carries the `$command` patterns and `@parent`s to the - function object so command code can call shared functions via `u()`. -- **`ww_functions`** is `no_command` and holds only callable attributes. - -Both cross-object references use the `~internal` ref form -(`parent: ~ww_functions`, `u(~ww_functions/WW_FN_HEADER,...)`), which the -install engine substitutes with the real dbref at apply time. - -The `WW_` convention prefix marks this package's attribute namespace. diff --git a/who-where/package.yaml b/who-where/package.yaml deleted file mode 100644 index 7f36ada6..00000000 --- a/who-where/package.yaml +++ /dev/null @@ -1,29 +0,0 @@ -format: 1 -package: who-where -version: 1.2.0 -authors: [SharpMUSH] -description: "+who and +where commands with a shared formatting object." -license: MIT -homepage: https://github.com/SharpMUSH/SharpMUSH-Packages -keywords: [who, where, social] -convention_prefix: WW_ -requires_server: ">=0.1" - -objects: - - ref: ww_global - type: thing - name: Who-Where Global Object - parent: "{{ww_functions}}" - attributes: - CMD_+WHO: |- - $+who:@pemit %#=[u({{ww_functions}}/WW_FN_HEADER,Who)][iter(lwho(),%r[ljust(name(%i0),20)][conn(%i0)],,)] - CMD_+WHERE: |- - $+where:@pemit %#=[u({{ww_functions}}/WW_FN_HEADER,Where)][iter(lwho(),%r[ljust(name(%i0),20)][name(loc(%i0))],,)] - - - ref: ww_functions - type: thing - name: Who-Where Function Object - flags: [no_command] - attributes: - WW_FN_HEADER: |- - [repeat(=,5)]%b%0%b[repeat(=,70)]