Consolidate build into one root Makefile; split run.sh into run-engine.sh/run-interpreter.sh
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# Input & output formats
|
||||
|
||||
See [`architecture.md`](architecture.md) for how these fit together.
|
||||
There are two ways to provide input (direct CLI flags, or `run.sh` +
|
||||
`user.properties`) and three output formats (`text`, `html`, `json`); the
|
||||
There are two ways to provide input (direct CLI flags, or `run-engine.sh`
|
||||
+ `user.properties`) and three output formats (`text`, `html`, `json`); the
|
||||
`DailyReading` struct is the programmatic form all three are rendered
|
||||
from, and the one the future watchapp will consume directly. `json` is
|
||||
also `interpreter-cli`'s input format — see "The interpreter" at the
|
||||
@@ -34,9 +34,10 @@ deck-engine --seed <string> --birth-date YYYY-MM-DD --birth-time HH:MM
|
||||
Birth latitude/longitude only affect the Ascendant/houses — planet signs
|
||||
are geocentric and location-independent.
|
||||
|
||||
### `run.sh` + `user.properties`
|
||||
### `run-engine.sh` + `user.properties`
|
||||
|
||||
`dist/run.sh [text|html] [lang]` wraps the binary for daily use:
|
||||
`dist/run-engine.sh [text|html|json] [lang]` wraps the binary for daily
|
||||
use:
|
||||
|
||||
- **Seed and `--date`** come from the OS clock: `date +%Y-%m-%d` (stable
|
||||
all day) and `date -u +%Y-%m-%dT%H:%M`.
|
||||
@@ -55,12 +56,16 @@ are geocentric and location-independent.
|
||||
|
||||
The file is seeded once from `engine/scripts/user.properties.template`
|
||||
with placeholder values (`YOUR_BIRTH_DATE_HERE`, etc.) and is **never
|
||||
overwritten by later builds**. `run.sh` checks every birth field for an
|
||||
empty value or a leftover `YOUR_` placeholder and refuses to run with a
|
||||
clear error until the file is filled in; `lang` has no such check since
|
||||
it always has a usable default (`en`).
|
||||
overwritten by later builds**. `run-engine.sh` checks every birth field
|
||||
for an empty value or a leftover `YOUR_` placeholder and refuses to run
|
||||
with a clear error until the file is filled in; `lang` has no such
|
||||
check since it always has a usable default (`en`).
|
||||
- The optional second argument overrides `lang=` for a single run without
|
||||
editing the file, e.g. `dist/run.sh html de`.
|
||||
editing the file, e.g. `dist/run-engine.sh html de`.
|
||||
- `dist/run-interpreter.sh` (no arguments) is the equivalent wrapper for
|
||||
the interpreter: same OS clock + `user.properties` inputs, but calls
|
||||
`deck-engine --format json` and pipes it straight into
|
||||
`dist/interpreter-cli` — see "The interpreter" below.
|
||||
|
||||
### Translations (`--lang`, `dist/i18n/`)
|
||||
|
||||
@@ -226,6 +231,8 @@ dist/deck-engine ... --format json | dist/interpreter-cli
|
||||
# or:
|
||||
dist/deck-engine ... --format json > reading.json
|
||||
dist/interpreter-cli reading.json
|
||||
# or, for daily use (OS clock + user.properties, same inputs as run-engine.sh):
|
||||
dist/run-interpreter.sh
|
||||
```
|
||||
|
||||
- **Input**: a file path argument, or stdin if no argument (or `-`) is
|
||||
|
||||
Reference in New Issue
Block a user