fix readme

This commit is contained in:
2026-03-07 01:32:25 -08:00
parent 71f006d984
commit 0bac2d4a3c
2 changed files with 37 additions and 31 deletions

31
README
View File

@@ -1,31 +0,0 @@
# Deck Template
This folder is ignored by the deck registry generator.
Use it as a starter:
1. Copy `_template` to a new folder under `asset/tarot deck/`.
2. Rename the new folder to your deck name.
3. Update `deck.json` with your real `id`, `label`, file naming rules, and any name overrides.
4. Add your card image files so they match the templates in `deck.json`.
5. Run `npm run validate:decks` to check the manifest.
6. Run `npm run generate:decks` or `npm run start`.
Extra examples:
- `deck.json` shows a template-driven setup using `trump-template` plus `suit-prefix-and-rank-order`.
- `deck.canonical-map.example.json` shows a manually mapped setup using `canonical-map` plus `suit-base-number-template`.
- `STRUCTURE.md` shows recommended folder and file layouts for both approaches.
Naming overrides:
- `nameOverrides` is for major-card display names such as `Justice -> Adjustment`.
- `minorNameOverrides` is for minor-card display names such as `Six of Cups -> Pleasure`.
- `minorNameOverrides` keys should use normal card names like `six of cups`, `princess of disks`, or `10 of swords`.
Notes:
- Folder names starting with `_` or `.` are ignored.
- `id` must be unique across all installed decks.
- `template`, `templates`, `example`, and `examples` folders are also ignored.
- Invalid manifests are skipped during registry generation and reported as warnings in the terminal.
- Referenced card image files are audited during generation and validation; decks with missing files are skipped.
- Mapped major decks must define all 22 majors, and minor rules must define all 14 ranks.
- `npm run validate:decks` exits with a failure code if warnings are found, which is useful before publishing a deck pack.

37
README.md Normal file
View File

@@ -0,0 +1,37 @@
## Deck Repository (Install Ready)
Use this companion repository for downloadable decks:
- https://code.glowers.club/goyimnose/tarot-deck
Typical flow:
1. Clone the deck repository somewhere local.
2. Copy one or more deck folders into `asset/tarot deck/`.
3. Validate and regenerate the deck registry.
```powershell
git clone https://code.glowers.club/goyimnose/tarot-deck.git
# Copy selected deck folder(s) into Tarot Time deck directory.
npm run validate:decks
npm run start
```
## Deck Authoring and Validation
Deck discovery is registry-driven and generated automatically.
1. Copy `asset/tarot deck/_template/` to a new folder under `asset/tarot deck/`.
2. Rename the new folder and update its `deck.json`.
3. Add card image files matching the naming rules in the manifest.
4. Run `npm run validate:decks` before publishing/testing.
5. Run `npm run start` (or `npm run generate:decks`) to rebuild `asset/tarot deck/decks.json`.
Rules and behavior:
- Folders without `deck.json` are ignored.
- Folders beginning with `_` or `.` are ignored (safe for `_template`).
- `_template` includes `deck.canonical-map.example.json` for explicit major-card file mapping.
- `_template/STRUCTURE.md` documents recommended `majors/` and `minors/` layouts.
- Manifests may override labels with `nameOverrides` and `minorNameOverrides`.
- Invalid manifests or missing mapped files are skipped with terminal warnings.