feat(seed): hero_demo Office samples + seed_install.sh orchestrator #1

Closed
mik-tf wants to merge 1 commit from development_mik_seed_data into development
Owner

Closes deploy-side of home#183. Codifies §7 of DEPLOYMENT_NU_HERO_OS.md so a fresh deploy reaches a populated Office archipelago without per-VM cp invocations.

Layout

data/seed/
├── README.md                          # how the pieces fit together
├── office/
│   ├── templates/welcome.md           # pandoc input → welcome.docx + welcome.pdf
│   ├── templates/quickstart.md        # pandoc input → quickstart.docx + quickstart.pdf
│   ├── python/quarterly_metrics.py    # openpyxl generator
│   ├── python/team_roster.py          # openpyxl generator
│   └── generate.sh                    # build .docx/.xlsx/.pdf into office/out/
└── seed_install.sh                    # orchestrator: generate + copy → webdav

Inputs are committed as text (markdown + python). Binary samples are generated on the VM at install time using pandoc, python3-openpyxl, and libreoffice — all installed by hero_skills install_core. Avoids committing binary blobs and keeps regen cheap.

seed_install.sh

  1. Runs generate.sh (pandoc → docx, openpyxl → xlsx, libreoffice → pdf companions)
  2. Copies office/out/*.{docx,xlsx,pdf} into $HERO_HOME/var/hero_foundry/
  3. Refreshes $HERO_HOME/var/books/libraries.txt from data/books/libraries.txt

Idempotent — safe to re-run after editing templates.

Runbook §7

Collapsed from manual cp incantations to one shell line:

su - driver -c '
  source ~/hero/cfg/init.sh
  cd ~/code/hero_demo
  bash data/seed/seed_install.sh
'

Validation

Bash + Python AST parse cleanly. Runtime needs the office toolchain on the host (pandoc / openpyxl / libreoffice all in install_core after hero_skills 7c823d1).

Tracker

home#185.

Signed-off-by: mik-tf

Closes deploy-side of [home#183](https://forge.ourworld.tf/lhumina_code/home/issues/183). Codifies §7 of [DEPLOYMENT_NU_HERO_OS.md](https://forge.ourworld.tf/lhumina_code/hero_demo/src/branch/development/docs/ops/DEPLOYMENT_NU_HERO_OS.md) so a fresh deploy reaches a populated Office archipelago without per-VM `cp` invocations. ## Layout ``` data/seed/ ├── README.md # how the pieces fit together ├── office/ │ ├── templates/welcome.md # pandoc input → welcome.docx + welcome.pdf │ ├── templates/quickstart.md # pandoc input → quickstart.docx + quickstart.pdf │ ├── python/quarterly_metrics.py # openpyxl generator │ ├── python/team_roster.py # openpyxl generator │ └── generate.sh # build .docx/.xlsx/.pdf into office/out/ └── seed_install.sh # orchestrator: generate + copy → webdav ``` Inputs are committed as text (markdown + python). Binary samples are **generated on the VM at install time** using `pandoc`, `python3-openpyxl`, and `libreoffice` — all installed by `hero_skills install_core`. Avoids committing binary blobs and keeps regen cheap. ## `seed_install.sh` 1. Runs `generate.sh` (pandoc → docx, openpyxl → xlsx, libreoffice → pdf companions) 2. Copies `office/out/*.{docx,xlsx,pdf}` into `$HERO_HOME/var/hero_foundry/` 3. Refreshes `$HERO_HOME/var/books/libraries.txt` from `data/books/libraries.txt` Idempotent — safe to re-run after editing templates. ## Runbook §7 Collapsed from manual `cp` incantations to one shell line: ```bash su - driver -c ' source ~/hero/cfg/init.sh cd ~/code/hero_demo bash data/seed/seed_install.sh ' ``` ## Validation Bash + Python AST parse cleanly. Runtime needs the office toolchain on the host (pandoc / openpyxl / libreoffice all in `install_core` after [hero_skills 7c823d1](https://forge.ourworld.tf/lhumina_code/hero_skills/commit/7c823d1)). ## Tracker [home#185](https://forge.ourworld.tf/lhumina_code/home/issues/185). Signed-off-by: mik-tf
feat(seed): hero_demo Office samples + seed_install.sh orchestrator
Some checks failed
Build and Test / build (pull_request) Failing after 15s
85f52209be
Closes deploy-side of lhumina_code/home#183.
Codifies §7 of DEPLOYMENT_NU_HERO_OS.md so a fresh deploy reaches a
populated Office archipelago without per-VM `cp` invocations.

New layout under data/seed/:
  README.md                          how the pieces fit together
  office/templates/welcome.md        pandoc input
  office/templates/quickstart.md     pandoc input
  office/python/quarterly_metrics.py openpyxl generator
  office/python/team_roster.py       openpyxl generator
  office/generate.sh                 build .docx + .xlsx + .pdf into office/out/
  seed_install.sh                    orchestrator: generate + copy → webdav

Inputs are committed as text (markdown + python) — the actual binary
samples are generated on the VM at install time using pandoc,
python3-openpyxl, and libreoffice (all installed by hero_skills
install_core).  Avoids committing binaries; keeps regen cheap.

seed_install.sh:
- runs generate.sh
- copies office/out/*.{docx,xlsx,pdf} → $HERO_HOME/var/hero_foundry/
- refreshes $HERO_HOME/var/books/libraries.txt from data/books/libraries.txt
- idempotent — safe to re-run after editing templates

Runbook §7 collapsed from manual cp incantations to one shell line:
  su - driver -c '
    source ~/hero/cfg/init.sh
    cd ~/code/hero_demo
    bash data/seed/seed_install.sh
  '

§0.1 Quick path's "what's still manual" entry for §7 now points at the
script.

Validation: bash + python AST parse cleanly.  Runtime needs the office
toolchain on the host (pandoc/openpyxl/libreoffice all in install_core).

Tracker: lhumina_code/home#185

Signed-off-by: mik-tf
mik-tf closed this pull request 2026-04-25 20:35:00 +00:00
Author
Owner

Squash-merged to development as 9318fd0. Branch deleted.

Squash-merged to `development` as [`9318fd0`](https://forge.ourworld.tf/lhumina_code/hero_demo/commit/9318fd0). Branch deleted.
Some checks failed
Build and Test / build (pull_request) Failing after 15s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_demo!1
No description provided.