- Go 99.6%
- JavaScript 0.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| app/jcg | ||
| cmd/jcg | ||
| pkg/jcg | ||
| schemas/config | ||
| .gitignore | ||
| .golangci.yml | ||
| .goreleaser.yaml | ||
| .markdownlint.yaml | ||
| .svu.yml | ||
| Brewfile | ||
| CHANGELOG.md | ||
| commitlint.config.mjs | ||
| eslint.config.js | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| stave.yaml | ||
| stavefile.go | ||
jewcodegen
CLI for generating https://dep-specs.org/specs/rfc0248.html code blocks.
Usage
Run the interactive wizard and write the generated block to a file:
jcg > identity.txt
The wizard uses the terminal input and stderr, leaving stdout available for piping or redirection. Press Esc or Ctrl+C to cancel. Choose Omit for information that is not relevant; use a # option to decline to state something.
Wizard questions, answer rules, navigation, and preview data live in the frontend-independent pkg/jcg/wizard/core package. The Charm-based terminal interface in pkg/jcg/wizard/tui adapts those core pages to a terminal; other frontends can drive the same core.Session without using Charm APIs. A frontend can step through one question at a time (Current, Answer, Previous) or a page at a time (Page, Advance, Back); Advance refuses to leave a page with invalid answers. Questions have stable IDs that don't depend on their wording, and choice answers use explicit string IDs (for example, ++ for a level and contextual for an operator), so saved sessions remain readable if enum constants are reordered. Sessions can be saved and resumed with Snapshot/RestoreSession or JSON.
The wizard asks about your own position before your family's (^) and communal (@) context. It also asks how multiple denominations or heritages relate (OC, O/C, O|C, O<R>). Its last page optionally fine-tunes any answered category with salience (++K), intensity (K!), change over time (K->K+) and exceptions (K+(-)), following the patterns in DEP-0249.
At the end of the family and communal context selectors, choose Skip this section to leave that entire context out without stepping through its remaining questions.
After each relevant answer or question stage, the wizard offers an optional add more prompt right away. For a single-category question, answer Yes or No; after practice, knowledge, and identity pages, select any answers to refine (or select none to continue). The question descriptions include examples such as Bj^Bc (born Jewish, parents were converts), O:Mo, O<R>, and ^As|Mi. For each refinement, choose how it combines with what came before (the DEP-0249 operators: together ShHo, and O&C, between K+/K-, by context Sh+|Sh-, over time O>R, foundation with additions O<R>, specifically O:Mo, or a separate token @Sh++), which code it adds (the same code by default, or any other code), its details when required (Lg asks for languages and Di for dietary details), its own level, and optionally whose it is (a scope marker on the term itself, e.g. Bj^Bc). After each term, choose whether to add another; there is no fixed limit. Choose the square-bracket group operator only when needed: it lets you wrap the whole expression or a trailing part, choose an optional scope, then choose modifiers inside or outside the brackets (^[~O]|C, [As+]|[Mi-], [?K]!).
Single-choice prompts show ◉ PICK ONE and use ↑/↓ then Enter; multi-choice prompts show ☑ PICK ANY and use x to toggle choices, then Enter. The help line at the bottom of the wizard also shows the current controls.
Choice lists expand to show all options when space allows; on shorter screens, a ↕ more options hint indicates that the list can be scrolled.
Building from source
This project uses stave (a fork of mage) as its build system.
To build this project from source:
- Clone the repo.
- Grab stave.
- Run
stave buildto buildjcgfrom source. - Or run
stave -lto see other things you can do.
References
License
This software is released under the Apache License 2.0.