Add core engine: tarot + astrology reading generator with CLI and i18n

Plain-C, dependency-free engine that produces a personalized daily
Celtic Cross tarot spread and natal-chart/transit astrology reading,
plus a standalone CLI (dist/deck-engine) and run.sh wrapper. Includes
English/German output via a simple key=value translation format, and
docs/diagrams describing the architecture and I/O.
This commit is contained in:
ml
2026-07-04 06:49:18 +02:00
commit e4ea31270f
59 changed files with 17134 additions and 0 deletions
+83
View File
@@ -0,0 +1,83 @@
digraph architecture {
rankdir=LR;
pad="0.3";
fontname="Helvetica";
node [shape=box, style="rounded,filled", fontname="Helvetica", fontsize=12, margin="0.15,0.1"];
edge [fontname="Helvetica", fontsize=10];
labelloc="t";
label="Deck in a Dash — component architecture";
fontsize=16;
subgraph cluster_res {
label="res/ (source assets)";
style="dashed"; color=gray40; fontsize=11;
images [label="22 RWS Major Arcana\nJPEGs (res/img/)", fillcolor="#fdf3d0"];
pdf [label="Waite's \"Pictorial Key\nto the Tarot\" (PDF,\npublic domain)", fillcolor="#fdf3d0"];
{ rank=same; images; pdf; }
}
subgraph cluster_thirdparty {
label="engine/third_party/astronomy/";
style="dashed"; color=gray40; fontsize=11;
astronomy [label="Astronomy Engine\n(vendored, MIT,\npinned commit)", fillcolor="#fdf3d0"];
}
subgraph cluster_i18nsrc {
label="engine/i18n/ (translation sources)";
style="dashed"; color=gray40; fontsize=11;
langfiles [label="en.lang, de.lang, ...\nkey=value per language", fillcolor="#fdf3d0"];
}
subgraph cluster_engine {
label="engine/src/ (core engine — plain C, no I/O assumptions except reading_print_*/main.c/i18n_load)";
style="solid"; color=black; fontsize=11;
rng [label="rng.c\nstring-seeded PRNG\n(FNV-1a + splitmix64)", fillcolor="#cfe8fb"];
tarot [label="tarot.c\nCeltic Cross draw", fillcolor="#cfe8fb"];
tarot_data [label="tarot_data.c\ncard + position text", fillcolor="#cfe8fb"];
astro [label="astro.c\nnatal chart + transits", fillcolor="#cfe8fb"];
i18n [label="i18n.c\ntranslation catalog\n+ English fallback", fillcolor="#cfe8fb"];
reading [label="reading.c\nDailyReading\norchestration + text/HTML", fillcolor="#c8f0c8"];
main [label="main.c\nCLI arg parsing", fillcolor="#e3e3e3"];
{ rank=same; main; reading; }
{ rank=same; tarot; astro; i18n; }
}
subgraph cluster_dist {
label="dist/ (build output, generated by `make`)";
style="dashed"; color=gray40; fontsize=11;
binary [label="deck-engine", fillcolor="#fde0d0"];
distimg [label="img/\n(copied JPEGs)", fillcolor="#fde0d0"];
disti18n [label="i18n/\n(copied .lang files)", fillcolor="#fde0d0"];
runsh [label="run.sh", fillcolor="#fde0d0"];
props [label="user.properties\n(birth data + lang)", fillcolor="#fde0d0"];
{ rank=same; binary; distimg; disti18n; runsh; props; }
}
subgraph cluster_watch {
label="Pebble watchapp — not built yet";
style="dashed"; color=firebrick; fontsize=11; fontcolor=firebrick;
watch [label="watchapp C / UI\n(future)", fillcolor=white, color=firebrick, fontcolor=firebrick, style="rounded,dashed"];
}
pdf -> tarot_data [label="sourced from", style=dotted, color=gray40];
tarot -> rng;
tarot -> tarot_data;
astro -> astronomy;
tarot_data -> i18n [label="looks up\ntranslated text", style=dotted, color=gray40];
astro -> i18n [label="looks up\ntranslated text", style=dotted, color=gray40];
reading -> i18n [label="looks up\nUI labels", style=dotted, color=gray40];
reading -> tarot;
reading -> astro;
main -> reading [label="CLI only"];
main -> i18n [label="i18n_load(\n--lang, --i18n-dir)"];
main -> binary [label="`make` builds", style=dotted, color=gray40];
images -> distimg [label="`make images`\ncopies", style=dotted, color=gray40];
langfiles -> disti18n [label="`make i18n`\ncopies", style=dotted, color=gray40];
runsh -> props [label="reads at\nrun time", style=dotted, color=gray40];
watch -> reading [label="will call\nreading_generate()\ndirectly", style=dashed, color=firebrick, fontcolor=firebrick];
}