1662d550c7
- 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.
31 lines
1.3 KiB
C
31 lines
1.3 KiB
C
#ifndef DECK_READING_IO_H
|
|
#define DECK_READING_IO_H
|
|
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
|
|
/* Header-only dependency on the engine, same policy as significance.h -
|
|
* see its comment for why. */
|
|
#include "../../engine/src/reading.h"
|
|
|
|
/* Parses deck-engine's `--format json` output (text, null-terminated at
|
|
* text[length]) and fills *out with just enough of a DailyReading for
|
|
* interpret_daily_reading() to work on, for reporting sign/house context
|
|
* around each significant event, and for guidance_print()'s tarot
|
|
* framing: out->transits.aspects[]/aspect_count (used for scoring - see
|
|
* significance.c), out->natal.bodies[]/out->transits.bodies[] (sign +
|
|
* house per body, used only for display), and out->spread.positions[]
|
|
* (card + reversed per Celtic Cross position, used only by
|
|
* guidance.c). out->natal.ascendant_longitude/houses[] are left zeroed -
|
|
* nothing reads them yet.
|
|
*
|
|
* Returns false on malformed JSON, or if "transits"."aspects" isn't
|
|
* present as an array (an empty array is fine - that's a real "no
|
|
* aspects today" reading, not an error). A missing/unrecognized entry in
|
|
* "natal"."bodies"/"transits"."bodies"/"spread"."positions", or a
|
|
* missing "spread" key entirely, is not an error - see parse_bodies()/
|
|
* parse_spread() in reading_io.c. */
|
|
bool reading_load_json(const char *text, size_t length, DailyReading *out);
|
|
|
|
#endif
|