Give the interpreter real Celtic Cross meanings and --format/--lang support
- guidance.c now prints last, after the full spread; both it and main.c's new Celtic Cross readout pull real Waite card meanings via tarot_data.c instead of just naming cards. - interpreter-cli gains --format text|html|json and --lang en|de, matching deck-engine - required linking engine/src/tarot_data.c and i18n.c into the interpreter binary (a narrow, documented exception to its earlier "no engine .c files" policy) and writing German translations for narrative.c's/guidance.c's own text.
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
#ifndef DECK_GUIDANCE_H
|
||||
#define DECK_GUIDANCE_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* Header-only dependency on the engine for struct/enum *definitions*,
|
||||
* same policy as narrative.h/significance.h - see their comments for
|
||||
* why. Unlike those, though, the root Makefile *does* link
|
||||
* engine/src/tarot_data.c's *implementation* (tarot_card_name()/
|
||||
* tarot_card_meaning()) into the interpreter binary - a deliberate,
|
||||
* narrow exception; see the Makefile's own comment on
|
||||
* INTERP_TAROT_TEXT_OBJS for why that doesn't compromise this module's
|
||||
* independent testability. */
|
||||
#include "../../engine/src/tarot.h"
|
||||
#include "significance.h"
|
||||
|
||||
/* Ties the day's single most significant transit
|
||||
* (interp->top_items[0]) to the Celtic Cross spread, and prints a short
|
||||
* paragraph of concrete guidance on how to meet the day - the "combined
|
||||
* storytelling" piece docs/reading.md flags as future work, now built.
|
||||
* Prints on every day, quiet or major, tailored to interp->day_level -
|
||||
* callers can invoke it unconditionally after every
|
||||
* interpret_daily_reading() call.
|
||||
*
|
||||
* The core guidance keys off two things: the character of the top
|
||||
* transit's aspect (harmonious/discordant/neutral, same classification
|
||||
* narrative.c uses) and whether the spread's Attitude position - Waite's
|
||||
* "Himself: his position or attitude in the circumstances", the
|
||||
* position most directly about how the reader is meeting the day - fell
|
||||
* upright or reversed. That crossing (3 x 2 = 6 combinations) is
|
||||
* original text written for this project, not drawn from Waite or
|
||||
* Sepharial, since neither source discusses combining astrology and
|
||||
* tarot; it stays valid regardless of the day's intensity. What *does*
|
||||
* vary with interp->day_level is only the sentence introducing the top
|
||||
* transit (e.g. "With Saturn as today's dominant influence" on a Major
|
||||
* day vs. "Saturn is only faintly active today, but for what it's
|
||||
* worth" on a Quiet one). A day with no aspects in orb at all
|
||||
* (interp->top_item_count == 0, always DAY_QUIET) has no transiting
|
||||
* planet to introduce, so it falls back to a stance keyed on the
|
||||
* Attitude card's orientation alone.
|
||||
*
|
||||
* The paragraph also names the Attitude and Outcome cards and, via
|
||||
* tarot_card_meaning(), states their actual Waite meaning for the
|
||||
* orientation they landed in (e.g. what Wheel of Fortune reversed
|
||||
* means) - not a duplicated table, the real thing, since tarot_data.c
|
||||
* is linked (see above).
|
||||
*
|
||||
* Every piece of this module's own text (stance/intro/no-transit/label
|
||||
* strings) is looked up via i18n_get() under "guidance.*" keys
|
||||
* (engine/i18n's .lang files) before falling back to the English text baked
|
||||
* into guidance.c, so it respects whatever --lang the caller loaded
|
||||
* with i18n_load() (main.c does so before calling this). The German
|
||||
* guidance.intro.* templates are deliberately phrased so the planet
|
||||
* name placeholder is always the sentence's grammatical subject
|
||||
* (nominative case) across all four day levels - see guidance.c's own
|
||||
* comment on k_intro_fallback. */
|
||||
void guidance_print(FILE *out, const char *indent, const DailyInterpretation *interp,
|
||||
const CelticCrossSpread *spread);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user