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
+25
View File
@@ -0,0 +1,25 @@
#ifndef DECK_I18N_H
#define DECK_I18N_H
#include <stdbool.h>
/* Loads a `key=value` translation file (# comments and blank lines
* ignored, same format as dist/user.properties) into a process-global
* catalog, replacing whatever was loaded before. Returns false if the
* file can't be opened (the catalog is left as it was in that case).
*
* This uses stdio, so - like main.c and reading_print_text/_html - it's
* a desktop-only entry point, not something the Pebble watchapp will
* call as-is. i18n_get() below is a pure table lookup, so it's fine to
* port; the watchapp will just need its own (non-file-based) way to
* populate the catalog, e.g. from a compiled-in resource. */
bool i18n_load(const char *path);
/* Returns the translation for `key` from the loaded catalog, or
* `fallback` if no catalog is loaded or `key` isn't in it. Every caller
* in this codebase passes the built-in English text as `fallback`, so a
* missing file or a partially-translated one degrades to English rather
* than showing raw keys or blank strings. */
const char *i18n_get(const char *key, const char *fallback);
#endif