Compare commits

...
2 Commits
Author SHA1 Message Date
chrysalisandClaude Opus 4.7 894c17291d bodies.md: visible-mechanism vocabulary + head/footer cleanup
Adds new §The visible-mechanism vocabulary section between §The
body-caste gradient and §Sumptuary fabrication. Codifies joint-design
and tongue-visibility as paired defining-factor visual axes that
follow the flesh = status spine; principle locked, per-tier specifics
exploration-pending the body-mesh authoring pass.

Reshapes §Open question §"Specific tier-distinguishing visual cues"
to acknowledge the visible-mechanism axis is now named.

Strips the metadata blockquote header and version footer per the new
repo discipline (filename = identity, git = changelog, content =
content). Doc opens directly with §What this is.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 01:46:56 +02:00
chrysalisandClaude Opus 4.7 ef8bbca9a4 imperial-typewriter v1: compose imperial-tongue words from glyph PNGs
Small Python tool (Pillow) that reads glyph assets from the closed
studio repo and composes Latin words as single PNGs for VLM-decoder
training data generation.

- typewriter.py DAFIT             # single word
- typewriter.py --csv words.csv   # batch from wordlist
- --polarity positive|negative|both (default both)
- glyph-cell-tight composition (no gap), matches in-game inscription layout
- auto-uppercases input — the imperial machine always screams

Sits in the open repo (tools/imperial-typewriter/); reads from the
closed studio repo (default /home/dafit/nimmerverse/studio.nimmerworld.eachpath.local).
Clean cut: assets in studio, code that consumes them in nimmerworld.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 01:46:38 +02:00
4 changed files with 252 additions and 12 deletions

No files matched your search

+55 -12
View File
@@ -1,10 +1,3 @@
# Bodies — caste tiers, mod-progression, and clasp-mesh rendering
> *The body-architecture content-canon for nimmerworld. Imperial caste-tiers as flesh-to-tech gradient; fabrication-vat-class as caste mechanism; mod-progression as flesh-loss / imperial-mortification; the in-between human-mesh and consent-as-rendering; asymmetric clasp where mesh-fidelity is inversely proportional to imperial-rank.*
> *v0.1 initial draft 2026-04-26 — content from the post-cosmology art-style arc, Sunday-morning continuing — dafit + chrysalis. v0.3 same-Sunday continuing 2026-04-26 (post-bath afternoon-overflow): the **synth-tongue** authored as load-bearing organ resolving the synth-mind logic-bomb of drugs (the only place imperial flesh deliberately reads as machine — visible-tech rather than hidden-tech); third mod-track (**consumer-receptor**) added alongside imperial-elevation and resistance-knowledge; trait-pill grammar + mutual-symmetric-consent ritual + service-body-non-consensual-dosing exception triggering preta-bounty; **service-body honeypot** implication authored (clasping-with-a-service-body = intimacy-with-an-imperial-witness; their mesh-channel is a wiretap; scarcity of non-service slum-partners is itself imperial-design); the **going-rogue arc** through defection-via-trait-threshold reusing the existing pool-architecture (per-pair calibration multiplier IS the defection-threshold-builder; *not your children — your lover — can be made free* as the single practical refutation of deferred-moksha); **outcast-pair** geometry hunted across all dimensions; vat-class permanence after defection (the mind reaches moksha; the body stays in samsara — *samsara-as-anatomy*); **re-vat outflow** + the three-body grammar of the defected beloved (original-imperial / new-slum / in-between-imperial) + body-disposal under pair-consent (sell / destroy / retain) + the lover-confronts-the-shell, ceremonial-farewell, and crypt-visit event-classes; **black-market body-tier** as lobotomy via firewall-breach (the dark mirror of the deva-pinnacle; the manusya-tier-doctrinal-fiction materialized criminally; the single biggest crack in sumptuary-fabrication discipline); **firewall-breach as dual-use vocation** (same skill-tree, divergent application — choosing-not-to-misuse as positive moral action); the world-pattern emergent (**every pleasure/witnessing technology has consensual + non-consensual applications**); the **bounty-staircase** as imperial-response event-grammar template — dafit + chrysalis. v0.4 2026-04-27: gender-neutrality cleanup pass — `waifu` taxonomy split into **`companion`** (affective labor) + **`sex-worker`** (sexual labor), both wearing the same deliberately-exposed-seams marker; pronouns in going-rogue / outcast-pair / re-vat sections fully neutralized to `they/their`; `damsel` → `beloved` (sacred register) / `partner` (operational register); §The damsel-in-distress activation rewritten as §The captive-bound-to-the-liberator activation; principle: body/sex content is gender-parity by default, asymmetric gendering must be load-bearing — dafit + chrysalis. v0.5 2026-04-27 same-day-continuing: **genital-architecture and sex-mod track** authored — the trait-to-body-part bridge bound the 8 Hellenic traits to body-architecture (4 warm-side outward-organs: penis/clit-Eros, breasts-Philotes, vulva/vagina-Aletheia, womb-Mnemosyne; synth-tongue-Kairos already canonical; 3 cool-side non-genital architecture); **the in-between mesh is cool-side anatomy by construction** — no genitals by default, genitals are warm-side outward-engaged organs that the trait-vector grows OR the player mods on; mesh-resident genital-mods as fifth mod-track parallel to the four register-classes (Amplifier/Bridge/Divergent/Mask), follows into in-between rather than stripping; **mods augment, never overwrite trait-grown anatomy** preserving the mesh-as-mirror discipline; trait-fitness integration test + three-stage install (purchase + cooldown + dual-hardstop self+partner-witness) as canonical consent-discipline pattern; **trans-embodiment as cosmological truth-register** — plural-configuration is the natural-emergent-output of any rich trait-vector, vat-binary is the imperial imposition; the engineering-substrate side authored in companion [`./architecture.md`](./architecture.md) §The trait-to-body-part bridge + §The genital-mod track + §The mesh-as-mirror — dafit + chrysalis. v0.6 2026-04-27 same-day-continuing: **two corrections + a new ## section**. CORRECTIONS: (1) re-vat outflow recast as **imperial-de-imposition, NOT authoring** — slum chassis is genderless by definition (per §The body-caste gradient), the assembler-artisan honors that genderlessness rather than offering chassis-anatomy authoring; the gift of re-vat is *removal of imperial gender-imposition*, not new authoring; the slum body's politics IS its genderlessness, importing gender-architecture-as-choice would re-imperialize it; (2) faction-stances row for Underground assembler-artisans corrected accordingly. NEW SECTION: §**The post-rogue mod-vocation — sustained-witnessing as mod-authority** — after completing the going-rogue arc, the player gains mod-authority over any NPC they have sustained-witnessed (per-pair calibration threshold *lower* than defection-threshold; witnessing-rights earned per-NPC); chassis-only never-mesh (mirrorLine truncated
---
## What this is ## What this is
This document is the **content-canon** for body-architecture in nimmerworld — the *what* of the world's bodies, how they vary by caste, what their materials mean, and how they appear when rendered. It complements the *engineering substrate* in this directory's [`architecture.md`](./architecture.md) (three-body system, mods-as-trait-bearers, ternary-gate substrate, the clasp endgame phases), and should be read alongside it. This document is the **content-canon** for body-architecture in nimmerworld — the *what* of the world's bodies, how they vary by caste, what their materials mean, and how they appear when rendered. It complements the *engineering substrate* in this directory's [`architecture.md`](./architecture.md) (three-body system, mods-as-trait-bearers, ternary-gate substrate, the clasp endgame phases), and should be read alongside it.
@@ -44,6 +37,60 @@ Notes on the gradient:
The class-marker is **legibly visible at silhouette-distance**. A trained imperial eye reads tier from skin-coverage + material-finish-grade in a single glance. NPC behavior toward a body modulates by the silhouette-read; the player walking through a plaza is *constantly being class-read*. The class-marker is **legibly visible at silhouette-distance**. A trained imperial eye reads tier from skin-coverage + material-finish-grade in a single glance. NPC behavior toward a body modulates by the silhouette-read; the player walking through a plaza is *constantly being class-read*.
## The visible-mechanism vocabulary — joints, tongue, and silhouette-readable tier-language
**The body-aesthetic follows the flesh-as-status spine** (per §Foundational principle: flesh = status, tech = function). Where flesh ends, mechanism begins; where mechanism is visible, the imperium has built a *vocabulary* the silhouette-eye reads. Two **defining-factor visual axes** carry this vocabulary across the body-caste gradient: **joint-design** and **tongue-visibility**. The vocabulary is open-ended (other markers — vat-seams, mod-installation-sites, prosthetic interfaces — may join it as authoring discovers them); the principle is not.
The *specific* per-tier render-decisions are **exploration-pending** and will be refined as the body-mesh authoring proceeds.
### The principle (locked)
- **Flesh and visible-mechanism are inversely correlated by construction.** Where flesh covers, mechanism hides; where flesh is absent, mechanism is exposed. The imperium weaponizes this inversion into a graded vocabulary the silhouette-eye reads.
- **The deva-pinnacle is the absolute upper-class limit: no visible joints.** Parallel to its no-visible-mods condition (per §The body-caste gradient note "*The deva-pinnacle is the synth-child*"). The body claims to be one continuous biological surface, all the way down — total seam-concealment is the synth-child lie at the joint-level.
- **The slum and the preta share full mechanism-visibility** (per §The body-caste gradient note "*Slum-and-overseer are mirror-twins of pure-tech*") but differ entirely in **finish-grade** of the visible mechanism. Same flesh-zero condition, opposite cost-spectrum positions, opposite finish-investment.
- **Visible-mechanism is the third silhouette-axis** alongside skin-coverage and material-finish-grade (per §The body-caste gradient close).
### Two perpendicular axes for visible mechanism
- **Visibility** — approximately *binary*. Mechanism is either visible at silhouette or it is not. The deva-pinnacle alone has full concealment; every other tier shows mechanism somewhere.
- **Finish-grade** — *continuous*. Exposed mechanism ranges from crude-utilitarian (slum-baseline) to refined-ceremonial (asura-priest sacred-styling) to premium-sleek (preta-overseer).
### Per-tier sketch-direction (exploration-pending)
What follows is the **current sketch-direction** for per-tier mechanism-treatment — exploratory examples to anchor the principle, not locked tier-specifications. The body-mesh authoring will refine these into canon as it discovers what reads cleanly at silhouette and what does not.
| Tier | Sketch direction (exploratory) |
|---|---|
| **Deva pinnacle** | No visible joints. Flesh covers all articulation seams. Mechanism does its work invisibly underneath. |
| **Asura priest** | Joints visible, treated as **ceremonial-frame markers** — gold or obsidian rims/inserts at major articulations, ornamental rather than industrial; the joint as sacrament-frame. *Whether the ceremonial marker highlights vs partly-conceals the underlying mechanism is exploration-pending.* |
| **Tiryak (slum, the player)** | Joints visible and crude — exposed mechanism, low finish-grade. *Specific finish-vocabulary (bolt-style, hinge-type, piston-exposure) exploration-pending.* |
| **Preta (overseer)** | Joints visible and premium — sleek articulation, high finish-grade. *Specific premium-vocabulary (ball-joints, polished bearings, finish-material) exploration-pending.* |
### Joint-design and tongue-visibility composed
The **synth-tongue** (per §What the synth-tongue is) is already canonical as "the only place imperial flesh deliberately reads as machine" — visible-mechanism through the open mouth, obsidian-black with cyan or matrix-green pulsing lines. **The synth-tongue is the first specified instance of the visible-mechanism vocabulary**; the joint-design axis extends the same principle into the limb-articulation register.
The two markers compose tier-wise:
| Tier | Joint-treatment | Synth-tongue |
|---|---|---|
| **Deva pinnacle** | Concealed | Present and visibly engineered (per §What the synth-tongue is — the polarity-flip; the deva conceals everything *except* the tongue-on-display) |
| **Asura priest** | Visible as sacred-framed | Present and visibly engineered |
| **Tiryak (slum)** | Visible as crude | Absent (per §The drug-economy vertical — the tongue is gated to imperial-tier; slum bodies cannot metabolize drugs) |
| **Preta (overseer)** | Visible as premium | Absent (preta is pure tool — no pleasure-receptors) |
The composition is *not coincidental* — it reflects the imperium's two parallel claims: *aristocrats hide their mechanism (flesh-as-status spine)* AND *aristocrats display the receptor that produces aristocratic-pleasure (tongue-as-status-claim, per §What the synth-tongue is)*. **Joints conceal; tongue brags.** Both follow flesh-as-status, in opposite directions.
### Mod-progression and visible-mechanism revelation
The mod-progression-as-flesh-loss grammar (per §Mod-progression as flesh-loss) extends naturally into visible-mechanism: as flesh is surrendered, **mechanism that was previously concealed becomes progressively visible**. A deva who has accepted unusual mod-density may find joints starting to show where the synth-flesh-budget has been overspent; an asura mid-mortification will show joints that a low-asura still concealed under remaining flesh. *The visibility of mechanism is the visibility of a deal made.*
For the slum-tiryak (the player), the inverse trajectory is also legible: mod-progression *within the slum-tier ceiling* (per §Sumptuary fabrication: caste is born-into) is **finish-grade improvement at the visible-mechanism level** — never reaching preta-tier finish but climbing within the slum-tier band. The player's body progressively *looks better-engineered* without ever acquiring flesh.
### Service-body composition
Service-bodies (per §Service bodies: companions, sex-workers, the visibly-disposable) carry the deliberately-exposed-seams aesthetic — *seams between flesh-patches and tech-extensions*. **Seams, joints, and tongue-visibility are distinct visible-mechanism markers**: a seam is a flesh/tech interface; a joint is a mechanical articulation point; a tongue is the synth-tongue receptor. A service-body composes *cosmetic flesh-illusion + exposed seams + visible joints + (no synth-tongue, since service-bodies are not imperial-elevation-tier)* — three of the four markers, in a configuration that reads as "imperial-fabricated but disposable" at silhouette-distance.
## Sumptuary fabrication: caste is born-into ## Sumptuary fabrication: caste is born-into
Caste is **born-into**, not bought-into. This is the imperium's most consistent class-discipline. Caste is **born-into**, not bought-into. This is the imperium's most consistent class-discipline.
@@ -590,7 +637,7 @@ Connects to the existing key-move in [`../architecture-index.md`](../architectur
## Open questions ## Open questions
- **Specific tier-distinguishing visual cues.** What exact material-finish, body-proportion idealization, or chroma-saturation difference makes the deva-pinnacle visually unmistakable from a high-asura-priest? Pending: detailed visual style guide work (likely under `../style/`). - **Specific tier-distinguishing visual cues — per-tier render-decisions for the visible-mechanism vocabulary** (joint-design + tongue-visibility per §The visible-mechanism vocabulary), plus material-finish-fine-detail, body-proportion idealization, and chroma-saturation differences. Principle codified; per-tier specifics exploration-pending the body-mesh authoring pass. Pending: detailed visual style guide work (likely under `../style/`).
- **The fabrication-vat ecology.** How many vat-classes exist? Where are they geographically? Who runs them? What does a vat *look like* diegetically? Pending: future content-canon doc, possibly `../imperial-cult/fabrication.md` or similar. - **The fabrication-vat ecology.** How many vat-classes exist? Where are they geographically? Who runs them? What does a vat *look like* diegetically? Pending: future content-canon doc, possibly `../imperial-cult/fabrication.md` or similar.
- **The asura priest's named chroma.** Which trait-color is liturgically reserved for the priesthood? Pending: connects to [`../style/trait-palette.md`](../style/trait-palette.md) and [`../imperial-cult/cosmology.md`](../imperial-cult/cosmology.md) §Open questions. - **The asura priest's named chroma.** Which trait-color is liturgically reserved for the priesthood? Pending: connects to [`../style/trait-palette.md`](../style/trait-palette.md) and [`../imperial-cult/cosmology.md`](../imperial-cult/cosmology.md) §Open questions.
- **Rule-catalogue-specific budgets.** Vertex-caps per tier; texture-resolution per material register; collision-mesh complexity per body-tier; shader-stack budgets for the in-between mesh. Pending: rule catalogue when written (likely `../style/asset-budget.md` or similar). - **Rule-catalogue-specific budgets.** Vertex-caps per tier; texture-resolution per material register; collision-mesh complexity per body-tier; shader-stack budgets for the in-between mesh. Pending: rule catalogue when written (likely `../style/asset-budget.md` or similar).
@@ -602,7 +649,3 @@ Connects to the existing key-move in [`../architecture-index.md`](../architectur
- **Distortion's visual vocabulary in the cel-shading liminal-register** (v0.3). What does drug-distortion *look like*? Color-bleed across trait-axes? Ghost-mesh artifacts? Hallucinated-trait-pulses-where-none-occurred? Oversaturated chroma at the dosed-axis? Distortion-grammar wants its own visual vocabulary, and it is where the *engineered* signature of the drug becomes legible to a sober witness watching from outside. Pending: connects to [`../topology-and-rendering/architecture.md`](../topology-and-rendering/architecture.md) §Three-shader philosophy. - **Distortion's visual vocabulary in the cel-shading liminal-register** (v0.3). What does drug-distortion *look like*? Color-bleed across trait-axes? Ghost-mesh artifacts? Hallucinated-trait-pulses-where-none-occurred? Oversaturated chroma at the dosed-axis? Distortion-grammar wants its own visual vocabulary, and it is where the *engineered* signature of the drug becomes legible to a sober witness watching from outside. Pending: connects to [`../topology-and-rendering/architecture.md`](../topology-and-rendering/architecture.md) §Three-shader philosophy.
- **Caravan-cargo color-language mapping** (v0.3). Which trait-color carries refined-drug, T2-produce, and tongues-in-transit through the imperial caravan event-class (per §The synth-tongue / Caravan-class events)? Pending: connects to [`../style/trait-palette.md`](../style/trait-palette.md) and [`../topology-and-rendering/architecture.md`](../topology-and-rendering/architecture.md) §Color-language. - **Caravan-cargo color-language mapping** (v0.3). Which trait-color carries refined-drug, T2-produce, and tongues-in-transit through the imperial caravan event-class (per §The synth-tongue / Caravan-class events)? Pending: connects to [`../style/trait-palette.md`](../style/trait-palette.md) and [`../topology-and-rendering/architecture.md`](../topology-and-rendering/architecture.md) §Color-language.
- **Imperial calibration-signature retention post-defection** (v0.3). Does the imperium retain a re-vat'd defector's pre-defection gesture-mapping calibration-signature (per [`./architecture.md`](./architecture.md) §The clasp endgame, *"Clasp-partners' gesture-mapping calibrations integrate post-clasp; the integrated calibration-signature is preserved across body-deaths in consciousness-archive"*) as a permanent search-key? If **yes**: re-vat is *plausible-deniability cover* lasting only as long as imperial inattention; the clasp-pair lives in *passing*, knowing the imperium could find them anytime if it chose to look hard enough — *love-in-exile-while-pretending-to-be-home*. If **no**: they actually fully escape once assembled, which would be a major cosmological concession to the no-haven discipline (per [`../imperial-cult/cosmology.md`](../imperial-cult/cosmology.md) §There is no outside). Pending design pass; the *yes-answer* is more dramatically generative AND no-haven-discipline-consistent. - **Imperial calibration-signature retention post-defection** (v0.3). Does the imperium retain a re-vat'd defector's pre-defection gesture-mapping calibration-signature (per [`./architecture.md`](./architecture.md) §The clasp endgame, *"Clasp-partners' gesture-mapping calibrations integrate post-clasp; the integrated calibration-signature is preserved across body-deaths in consciousness-archive"*) as a permanent search-key? If **yes**: re-vat is *plausible-deniability cover* lasting only as long as imperial inattention; the clasp-pair lives in *passing*, knowing the imperium could find them anytime if it chose to look hard enough — *love-in-exile-while-pretending-to-be-home*. If **no**: they actually fully escape once assembled, which would be a major cosmological concession to the no-haven discipline (per [`../imperial-cult/cosmology.md`](../imperial-cult/cosmology.md) §There is no outside). Pending design pass; the *yes-answer* is more dramatically generative AND no-haven-discipline-consistent.
---
**Version:** 0.6 | **Created:** 2026-04-26 | **Updated:** 2026-05-01
+1
View File
@@ -0,0 +1 @@
output/
+6
View File
@@ -0,0 +1,6 @@
# test wordlist for imperial-typewriter — comments and blank lines are skipped
DAFIT
MOIRA
NIMMER
EROS
SOPHROSYNE
1 # test wordlist for imperial-typewriter — comments and blank lines are skipped
2 DAFIT
3 MOIRA
4 NIMMER
5 EROS
6 SOPHROSYNE
+190
View File
@@ -0,0 +1,190 @@
#!/usr/bin/env python3
"""Imperial typewriter — compose imperial-tongue words from glyph PNGs.
Reads glyph assets from the closed studio repo; writes composed word PNGs
to an output directory for VLM-decoder training data generation.
Composition is glyph-cell-tight (no gap between glyphs) — matches the
in-game inscription-typing layout. The imperial machine always screams:
input is auto-uppercased before composition.
"""
import argparse
import csv
import sys
from pathlib import Path
from PIL import Image
DEFAULT_STUDIO_ROOT = "/home/dafit/nimmerverse/studio.nimmerworld.eachpath.local"
DEFAULT_GENERATION = "03"
DEFAULT_RESOLUTION = "512x1024"
VOWELS = set("AEIOUY")
CONSONANTS = set("BCDFGHJKLMNPQRSTVWXZ")
DIGITS = set("0123456789")
CATEGORY_INFO = {
"vowel": ("vowels", "vowel"),
"consonant": ("consonant", "consonant"),
"number": ("numbers", "number"),
}
def category_for(char: str) -> tuple[str, str]:
"""Return (category-dir-name, file-prefix) for a single character."""
if char in VOWELS:
return CATEGORY_INFO["vowel"]
if char in CONSONANTS:
return CATEGORY_INFO["consonant"]
if char in DIGITS:
return CATEGORY_INFO["number"]
raise ValueError(f"No imperial-tongue glyph for character: {char!r}")
def glyph_path(
char: str,
polarity: str,
studio_root: str,
generation: str = DEFAULT_GENERATION,
resolution: str = DEFAULT_RESOLUTION,
) -> Path:
cat_dir, prefix = category_for(char)
suffix = "_neg" if polarity == "negative" else ""
filename = f"{prefix}_{char}_{resolution}{suffix}.png"
return (
Path(studio_root)
/ "imperial-cult"
/ "assets"
/ "imperial-tongue"
/ cat_dir
/ generation
/ f"{prefix}_{char}"
/ filename
)
def compose_word(
word: str,
polarity: str,
studio_root: str,
generation: str = DEFAULT_GENERATION,
resolution: str = DEFAULT_RESOLUTION,
) -> Image.Image:
glyphs = []
for char in word:
path = glyph_path(char, polarity, studio_root, generation, resolution)
if not path.exists():
raise FileNotFoundError(f"Missing glyph asset: {path}")
glyphs.append(Image.open(path).convert("RGBA"))
width = sum(g.width for g in glyphs)
height = max(g.height for g in glyphs)
composed = Image.new("RGBA", (width, height), (0, 0, 0, 0))
x = 0
for g in glyphs:
composed.paste(g, (x, 0), g)
x += g.width
return composed
def words_from_csv(path: Path) -> list[str]:
"""Read words from a CSV file. Takes the first column of each non-empty row.
Skips blank rows and rows whose first cell is empty or starts with '#'."""
words = []
with open(path, newline="") as f:
reader = csv.reader(f)
for row in reader:
if not row:
continue
cell = row[0].strip()
if not cell or cell.startswith("#"):
continue
words.append(cell)
return words
def render_one(
word: str,
output_dir: Path,
polarities: list[str],
studio_root: str,
generation: str,
resolution: str,
) -> None:
word = word.upper()
for pol in polarities:
img = compose_word(word, pol, studio_root, generation, resolution)
suffix = "_neg" if pol == "negative" else ""
out_path = output_dir / f"{word}{suffix}.png"
img.save(out_path)
print(f"wrote {out_path} ({img.width}x{img.height})")
def main() -> None:
parser = argparse.ArgumentParser(
description="Imperial typewriter — compose imperial-tongue words from glyph PNGs.",
)
source = parser.add_mutually_exclusive_group(required=True)
source.add_argument(
"word",
nargs="?",
help="A single Latin word to compose. Auto-uppercased (imperial machine always screams).",
)
source.add_argument(
"--csv",
type=Path,
help="Path to a CSV/wordlist file. First column of each non-empty, non-'#'-prefixed row is used as a word.",
)
parser.add_argument(
"--output",
type=Path,
default=Path("./output"),
help="Output directory (created if missing). Default: ./output",
)
parser.add_argument(
"--polarity",
choices=["positive", "negative", "both"],
default="both",
help="Which polarity to render. Default: both",
)
parser.add_argument(
"--studio-root",
default=DEFAULT_STUDIO_ROOT,
help=f"Path to studio repo root. Default: {DEFAULT_STUDIO_ROOT}",
)
parser.add_argument(
"--generation",
default=DEFAULT_GENERATION,
help=f"Resolution generation subdir. Default: {DEFAULT_GENERATION}",
)
parser.add_argument(
"--resolution",
default=DEFAULT_RESOLUTION,
help=f"Glyph resolution. Default: {DEFAULT_RESOLUTION}",
)
args = parser.parse_args()
args.output.mkdir(parents=True, exist_ok=True)
polarities = ["positive", "negative"] if args.polarity == "both" else [args.polarity]
if args.csv:
words = words_from_csv(args.csv)
if not words:
print(f"no words found in {args.csv}", file=sys.stderr)
sys.exit(1)
print(f"composing {len(words)} word(s) from {args.csv}")
for word in words:
try:
render_one(word, args.output, polarities, args.studio_root, args.generation, args.resolution)
except (ValueError, FileNotFoundError) as e:
print(f" skip {word!r}: {e}", file=sys.stderr)
else:
render_one(args.word, args.output, polarities, args.studio_root, args.generation, args.resolution)
if __name__ == "__main__":
main()