egatari 0.6.15 → 0.6.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -1
- package/README.ja.md +65 -64
- package/README.md +40 -39
- package/bin/egatari.mjs +3 -3
- package/kit/check-messages.mjs +95 -70
- package/kit/check.mjs +17 -11
- package/kit/core/article-messages.mjs +15 -15
- package/kit/core/check-parity.mjs +1 -1
- package/kit/core/check-rules.mjs +11 -6
- package/kit/core/colab-core.mjs +2 -2
- package/kit/core/export-name.mjs +2 -2
- package/kit/core/geometry-check.mjs +363 -25
- package/kit/core/layout-scan.mjs +8 -3
- package/kit/core/live-policy.mjs +2 -2
- package/kit/core/live.mjs +2 -2
- package/kit/core/llm-fix.mjs +12 -12
- package/kit/core/llm-insert.mjs +11 -11
- package/kit/core/llm-outline.mjs +7 -7
- package/kit/core/llm-pack-data.mjs +10 -10
- package/kit/core/parts2.mjs +5 -5
- package/kit/core/portable.mjs +5 -5
- package/kit/core/purposes.mjs +2 -2
- package/kit/core/ref-voice.mjs +1 -1
- package/kit/core/scorm.mjs +1 -1
- package/kit/core/sound-preferences.mjs +1 -1
- package/kit/core/theme-derive.mjs +209 -0
- package/kit/core/themes-list.mjs +1 -1
- package/kit/core/themes-lock.mjs +1 -1
- package/kit/core/tier-a.mjs +7 -7
- package/kit/deck.js +7 -4
- package/kit/instruction-version.json +1 -1
- package/kit/live.js +20 -20
- package/kit/player.json +1 -1
- package/kit/player.lock.json +2 -2
- package/kit/presenter.js +2 -2
- package/kit/templates/new-deck.mjs +6 -6
- package/kit/tools.js +5 -5
- package/kit/track.js +1 -1
- package/package.json +1 -1
- package/server/editor-ui.js +20 -17
- package/tts/yomi.yaml +8 -0
- package/vendor/egatari-spec/SOURCE.json +2 -2
- package/vendor/egatari-spec/schema/deck-meta.schema.json +1 -1
- package/vendor/egatari-spec/schema/egatari-metadata.schema.json +2 -2
package/README.md
CHANGED
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
|
|
13
13
|
English | [日本語](README.ja.md)
|
|
14
14
|
|
|
15
|
-
Egatari
|
|
15
|
+
Egatari is a format that bundles slides, script, audio and a book into a single HTML file. It plays in any browser, and generative AI can write and edit it. Egatari Studio is the tool that makes and edits Egatari files.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
An Egatari file is one self-contained HTML file, with step-by-step reveals and parts that follow the order of your explanation. One set of slides and script (`deck.html` + `narration.md`) gives you a live talk (with later steps shown faintly if you like), a PDF, and, optionally, a narrated video made with TTS. It is designed to be driven by [Claude Code](https://claude.com/claude-code) through the skills in `skills/`, but every step is a plain Node command and works without it.
|
|
18
18
|
|
|
19
19
|
*Egatari Studio (formerly motion-academic-slides). The npm package, the skills and the commands keep their names.*
|
|
20
20
|
|
|
@@ -24,8 +24,9 @@ A lesson is one self-contained HTML file, with step-by-step reveals and parts th
|
|
|
24
24
|
|
|
25
25
|
Pick one.
|
|
26
26
|
|
|
27
|
-
- **Editor app, nothing to install**: open <https://studio.egatari.org/> in Chrome or Edge and make or open
|
|
28
|
-
- **With
|
|
27
|
+
- **Editor app, nothing to install**: open <https://studio.egatari.org/> in Chrome or Edge and make or open an Egatari file there ([Editor app](#editor-app-no-install)).
|
|
28
|
+
- **With an AI chatbot**: add the make skill (`egatari-make-skill.zip`) to an AI chatbot such as ChatGPT, Gemini or Claude and ask it for a file (see the end of [Codex](#using-it-with-codex)).
|
|
29
|
+
- **With AI agents**: install the Egatari skills for Claude Code or Codex, turn on their updates (Claude Code: `/plugin` → Marketplaces → egatari → Enable auto-update; Codex: `npx egatari@0.6.x skills update` after each Studio release) and ask for a file ([Claude Code](#using-it-with-claude-code), [Codex](#using-it-with-codex)).
|
|
29
30
|
- **Command line**:
|
|
30
31
|
|
|
31
32
|
```bash
|
|
@@ -41,17 +42,17 @@ Needs Node.js ≥ 22.23.4 ([Requirements](#requirements)). More commands: [With
|
|
|
41
42
|
|
|
42
43
|
- **Steps**: `data-step="k"` shows content in the order you speak. The conclusion line (`.concl`) always comes last
|
|
43
44
|
- **Math**: KaTeX, rendered at build time. `\hlE{…}` / `\hlT{…}` / `\hlM{…}` color a term using the theme
|
|
44
|
-
- **Parts**: Web Components from [egatari/components](https://github.com/egatari/components) (vendored in `vendor/components/`: `m-sweep`, `m-curves`, `m-flow`, `m-collect`, `m-seq`, and for business and pitch
|
|
45
|
+
- **Parts**: Web Components from [egatari/components](https://github.com/egatari/components) (vendored in `vendor/components/`: `m-sweep`, `m-curves`, `m-flow`, `m-collect`, `m-seq`, and for business and pitch slides `m-bars`, `m-quad`, `m-market`, `m-kpi`, and for coding lectures `m-codetree` (decoding a bit string with a code tree); `m-flow` also draws money and service flows). Parts come in sets by subject: stats, data (`m-code`, `m-sampling`, `m-ci` …), math, maps, kokugo, english, music, business, tools and science ([part sets](docs/llm-parts/)). The screen depends only on (slide, step, time), so the same file can be exported frame by frame to video
|
|
45
46
|
- **Links to slides**: an ordinary `<a href="#<slide id>">` (or `#<slide id>:<step>`) jumps to that slide or step and offers **Back** (button, Backspace, Alt+←, browser back); `m-menu` lays such links out as a grid of cards for a contents or choice slide. Plain anchors, no script, so an Egatari file (`.ega.html`) stays Core. See [contract §9](docs/contract.md#9-links-to-slides)
|
|
46
47
|
- **Japanese language arts (国語)**: vertical writing (`.tate`), ruby, a Mincho font (BIZ UDPMincho) and theme `kokugo`; `m-kanbun` (白文 → 返り点 and 送り仮名 → the reading order traced character by character → 書き下し文), `m-kobun` (品詞分解 sentence by sentence, auxiliary-verb conjugation cards, modern translation), `m-gendai` (side lines, demonstrative → referent arrows, paragraph roles). See [reference](docs/reference.md#japanese-language-arts-kokugo)
|
|
47
48
|
- **Emphasis**: `{mark:ID|circle}` in the script draws a hand-drawn underline, circle, box, spotlight or laser pointer dot on the slide at that word
|
|
48
49
|
- **Morph transitions**: `data-morph` slides an equation or element from its place on the previous slide to its new place (like Keynote's Magic Move)
|
|
49
50
|
- **Two modes from one source**: slide show (`?mode=talk`) and video (`?mode=video`). Show later steps faintly is an option of the slide show (`l`; `?mode=lecture` opens it with the option on)
|
|
50
51
|
- **Presenter tools**: presenter view with speaker notes and timer, slide overview, laser pointer, pen, fading pen, toolbar
|
|
51
|
-
- **Themes**: one base color per theme (`themes/<name>/tokens.css`). Parts only use theme variables. Eight bundled themes; new
|
|
52
|
-
- **Quality control**: the standards (R-fit, R-steps, …) say what
|
|
53
|
-
- **Dev server**: edit text and the script in the browser, leave comments for your AI
|
|
54
|
-
- **Egatari file (`.ega.html`)**: `--portable` writes one HTML file (at the top of the
|
|
52
|
+
- **Themes**: one base color per theme (`themes/<name>/tokens.css`). Parts only use theme variables. Eight bundled themes; new files choose from seven: 藍 Indigo (`default`), 墨 Ink (`sumi`), 国語 Kokugo, 常盤 Evergreen, 江戸紫 Edo purple, 焦茶 Dark brown, 浅葱 Teal. `business` stays bundled so that files using it still build ([reference](docs/reference.md#themes))
|
|
53
|
+
- **Quality control**: the standards (R-fit, R-steps, …) say what slides and script must meet; the quality checker `kit/check.mjs` (`npm run check`) reports overflow, text size, steps, script coverage, contrast, part determinism, emphasis and morphs
|
|
54
|
+
- **Dev server**: edit text and the script in the browser, leave comments for your AI agent
|
|
55
|
+
- **Egatari file (`.ega.html`)**: `--portable` writes one HTML file (at the top of the working folder, named from the title; the path is printed) that plays offline and also carries its source and audio, so it can be unpacked back into a working folder (`npm run portable -- unpack|pack`); `--play-only` writes a copy without the editable slides and script. It follows **Egatari** (絵語り, “narrating with pictures”), an open [format for Egatari files](https://github.com/egatari/egatari-spec) (draft 1.0). See [reference](docs/reference.md#single-file---portable)
|
|
55
56
|
- **Output**: one self-contained HTML file (fonts, math, and local images, videos and stylesheets referenced by the slides embedded; works offline). Print to PDF from the browser or with `tools/pdf.mjs`
|
|
56
57
|
|
|
57
58
|
**Reference**: every option, syntax, key and environment variable on one page: [docs/reference.md](docs/reference.md)
|
|
@@ -70,18 +71,18 @@ The same editing as the dev server, as a web page that opens an Egatari file (`.
|
|
|
70
71
|
|
|
71
72
|
| Form | What it is | Here |
|
|
72
73
|
|---|---|---|
|
|
73
|
-
| Working folder | A folder with `deck.html`, `narration.md`, `audio/` …; the commands, AI
|
|
74
|
+
| Working folder | A folder with `deck.html`, `narration.md`, `audio/` …; the commands, AI agents (Claude Code, Codex, Gemini CLI …) and other editors read and write it | Edit it with “Work in a folder…” (Chrome / Edge) |
|
|
74
75
|
| Egatari file (`.ega.html`) | One HTML file that carries its source and audio (`--portable`); open it in a browser to play | Edit it with “Open…” (any browser) |
|
|
75
76
|
| Play-only (`--play-only`) | An Egatari file without the editable slides and script | Cannot be edited (open the original Egatari file or the working folder) |
|
|
76
77
|
| Built HTML (`out/deck.html`) | The presentation output of `node kit/build.mjs` | Cannot be edited (open the working folder) |
|
|
77
78
|
|
|
78
79
|
- **Open the editor:** **<https://studio.egatari.org/>** in Chrome or Edge (nothing to install), or build it yourself with `npm run build:app` and open `dist/editor.html` (the Offline editor, about 10 MB) by double-clicking it.
|
|
79
|
-
- **Open an Egatari file, no folder needed:** “Open a file (.ega.html)…” on the
|
|
80
|
+
- **Open an Egatari file, no folder needed:** “Open a file (.ega.html)…” on the start screen (or dragging and dropping the file) opens an [Egatari file (`.ega.html`)](docs/reference.md#single-file---portable) and edits it in memory; the file is extracted in a worker without running it. “Save” writes the same file again (or downloads it), “Save as…” writes a copy, or (ticking “Save as a new file”) a file under a new id that records the original, “Export working folder…” writes the source and audio to an empty folder; the file id and the rights notices are kept, and the license is shown before the first edit (with a confirmation for no-derivatives licenses). A script, audio or timing edit is saved without rebuilding: only those parts of the file change. A slide edit rebuilds the file, after a warning that slides you did not edit may look different. For an open folder, “Save as…” writes an Egatari file. Works in any current browser (saving downloads where there is no file picker)
|
|
80
81
|
- **Edit:** the same keys as the dev server: `e` + double-click for the source, `n` for the script, Alt / ⌥ Option + click for a comment (`comments.json`), `c` for the list. Backups go to `.cache/edits/` in the folder.
|
|
81
|
-
- **Open a working folder:** drag and drop the working folder (the one with `deck.html`) onto the page, or press “Work in a folder…”, and let the browser edit that folder. **New…**
|
|
82
|
-
- **Draft with
|
|
82
|
+
- **Open a working folder:** drag and drop the working folder (the one with `deck.html`) onto the page, or press “Work in a folder…”, and let the browser edit that folder. **New…** makes a new Egatari file with an AI chatbot (a new working folder: `npm run new`). Recent working folders are listed on the start screen.
|
|
83
|
+
- **Draft with an AI chatbot, no AI agent needed:** “New…” asks four questions (where it is used, what it is about, how it looks, and whether the AI gets light or detailed instructions), copies the [instructions for the AI](docs/authoring-with-llms.md) for ChatGPT, Gemini or claude.ai, and takes the AI’s output in two fields, slides and script (paste the whole output into either and it is split): the editor gives the slides ids, creates it as a new Egatari file (scripts in the output ask before running, like any opened file) and runs the quality check. “Copy a fix request for your AI” in the quality check panel writes the findings, the standards they break and the current files for the same chat; “Revise…” replaces the slides from its output in the current file (keeping its id and audio); “Insert slide…” inserts slides the AI wrote after the one you select
|
|
83
84
|
- **Script audio, one step at a time:** “Audio” plays the step's audio and marks it stale when the script changed after it was made; record a take from the microphone (with a level meter), import a file, or regenerate the step with “Make AI voice on this computer” (Irodori-TTS for Japanese with the reading dictionary, Kokoro for English; needs WebGPU, the model is downloaded once), then “Use this take”. Takes are processed like `tts/core.py` (trimmed, −20 LUFS) and saved as MP3 with where they came from ([details](docs/editor.md#script-audio-audio-panel)). In an Egatari file this is saved without rebuilding
|
|
84
|
-
- **Work with an AI
|
|
85
|
+
- **Work with an AI agent:** when anything else changes the files (Claude Code, Codex, a text editor), the editor notices within about 2 seconds, rebuilds, and stays on the same slide and step. A build error is shown over the preview until it is fixed.
|
|
85
86
|
- **Language:** the editor follows your browser language; the **English / 日本語** button at the top right (or `?lang=en` / `?lang=ja`) switches it.
|
|
86
87
|
- **Toolbar:** File ▾ (New…, Open…, Save, Save as…, Export ▸ For participants (play-only)… / Print slides / Print book (Print script without a book), File info…, Work in a folder…), Slide ▾ (Insert slide…, Duplicate, Delete, Revise…), Quality check (with a warning count), Preview ▾ (check as a slide show or as a video, show later steps faintly, or in presenter view with the script and the next step).
|
|
87
88
|
|
|
@@ -93,7 +94,7 @@ Details: [docs/editor.md](docs/editor.md) ([日本語](docs/editor.ja.md)).
|
|
|
93
94
|
|
|
94
95
|
## Using it with Claude Code
|
|
95
96
|
|
|
96
|
-
Making
|
|
97
|
+
Making files with Claude Code or Cowork (the Claude desktop app): [docs/with-claude.md](docs/with-claude.md) ([日本語](docs/with-claude.ja.md)).
|
|
97
98
|
|
|
98
99
|
First delete the old `~/.claude/skills/motion-*` entries (and any copies in a project's `.claude/skills/`). The light `egatari` entry contains only make for authoring and needs no Node. Add `egatari-studio` for local quality checks, builds, parts and video. To use studio, install both entries:
|
|
99
100
|
|
|
@@ -119,13 +120,13 @@ codex plugin add egatari-studio@egatari
|
|
|
119
120
|
|
|
120
121
|
Then, after each Studio release, run `npx egatari@0.6.x skills update` and restart Codex. The skill's instructions and quality checks change with each Studio release, so an old skill misses the newer rules and fixes.
|
|
121
122
|
|
|
122
|
-
Add `egatari` alone for authoring (no Node.js needed); add `egatari-studio` too for local checks, builds, parts and video. Restart Codex, then ask for a
|
|
123
|
+
Add `egatari` alone for authoring (no Node.js needed); add `egatari-studio` too for local checks, builds, parts and video. Restart Codex, then ask for a file. Codex's workspace-write sandbox blocks the network and the browser, so run `check` and `build` outside it, or with network and browser access allowed. Update with `codex plugin marketplace upgrade egatari` and `codex plugin add egatari@egatari` / `codex plugin add egatari-studio@egatari` again (Codex has no separate update command), or run `npx egatari@0.6.x skills update`, which does this for Claude Code and Codex alike. `npx egatari@0.6.x doctor` warns when an installed skill is older than the package.
|
|
123
124
|
|
|
124
|
-
For
|
|
125
|
+
For an AI chatbot such as ChatGPT, Gemini or Claude, upload `egatari-make-skill.zip`. When Studio is updated, add it again with “Download the AI skill” in Studio. Developers can create it with `node tools/make-llm-guide.mjs --zip out/release`. Its `make/` contents match the generated, committed `plugins/egatari/skills/make/` directory.
|
|
125
126
|
|
|
126
127
|
| Skill | Use it for |
|
|
127
128
|
|---|---|
|
|
128
|
-
| `egatari:make` | plan, write, step and narrate
|
|
129
|
+
| `egatari:make` | plan, write, step and narrate slides and script (no Node needed) |
|
|
129
130
|
| `egatari-studio:studio` | local quality checks and builds, writing parts, and exporting video with existing audio |
|
|
130
131
|
|
|
131
132
|
Example prompts:
|
|
@@ -163,7 +164,7 @@ node kit/build.mjs $D/deck.html # rebuild so the audio
|
|
|
163
164
|
node render/render.mjs $D/out/deck.html --out $D/video # add --only "更新の式:2" for one step (or --only 更新の式 for a whole slide), --full for one file
|
|
164
165
|
```
|
|
165
166
|
|
|
166
|
-
- Voices: `--voices expert=bob,novice=alice`, or `<
|
|
167
|
+
- Voices: `--voices expert=bob,novice=alice`, or `<working folder>/voice.json` (`{"expert": "me"}`, or a path to a wav file). The defaults are `bob` (single speaker) and `bob` / `alice` (dialogue), looked up as `tts/voices/<name>.wav`; in an English file `<name>_en.wav` is used when it exists
|
|
167
168
|
- If the server is not running or a voice file is missing, `synth.py` stops and names the URL or file it could not reach
|
|
168
169
|
- No Mac? `synth.py` works with any OpenAI-compatible TTS server that takes the same request ([docs/video.md](docs/video.md#tts-server-mac-windows-linux)); the editor app can also make or record each step's audio
|
|
169
170
|
- **Self-playing HTML with audio**: `node kit/build.mjs $D/deck.html --embed-audio` puts the script audio inside the HTML, so the HTML file plays with `a` (autoplay) anywhere. The audio is compressed to AAC (64 kbps, mono; about 4.5 MB for a 5-minute talk, instead of ~30 MB as WAV), which every current browser plays. Without `--embed-audio` the HTML refers to the WAV files in `audio/` and nothing is converted. If ffmpeg is missing, the WAV files are embedded as they are and the build warns
|
|
@@ -190,7 +191,7 @@ What video needs (ffmpeg, uv, a TTS server, reference voices) is under Tier 2 in
|
|
|
190
191
|
| number + Enter | go to that page |
|
|
191
192
|
| f | fullscreen |
|
|
192
193
|
| p | presenter view (speaker notes, next step, timer) |
|
|
193
|
-
| a | autoplay (plays the audio if the
|
|
194
|
+
| a | autoplay (plays the audio if the file has it) |
|
|
194
195
|
| l | show later steps faintly (on/off) |
|
|
195
196
|
| b | black screen |
|
|
196
197
|
| s / Shift+s | captions (script, about two lines at a time) / caption size S, M, L |
|
|
@@ -202,7 +203,7 @@ What video needs (ffmpeg, uv, a TTS server, reference voices) is under Tier 2 in
|
|
|
202
203
|
|
|
203
204
|
All keys (Home/End, PageUp/PageDown, presenter-view keys) and URL parameters: [docs/reference.md#presenting](docs/reference.md#presenting).
|
|
204
205
|
|
|
205
|
-
A toolbar with the same actions is shown for about 5 s when the
|
|
206
|
+
A toolbar with the same actions is shown for about 5 s when the file opens (the first time on a device, with a line that says how to bring it back), then whenever the mouse moves or the screen is tapped; it hides after 2.5 s. While it is hidden, a faint **Show toolbar** button at the bottom left brings it back. Drawings are kept per slide and never appear in print or video.
|
|
206
207
|
|
|
207
208
|

|
|
208
209
|
|
|
@@ -220,16 +221,16 @@ printf '{"name": "mylab", "extends": "default"}\n' > themes/mylab/theme.json
|
|
|
220
221
|
node kit/build.mjs examples/minimal/deck.html --theme mylab
|
|
221
222
|
```
|
|
222
223
|
|
|
223
|
-
A theme can also sit
|
|
224
|
+
A theme can also sit in the working folder (`<working folder>/themes/<name>/`) or in a folder of your own themes: set `EGATARI_THEMES` to a list of folders (separated by `:`, or `;` on Windows), or use `~/.egatari/themes` (it may be a symbolic link). Themes are looked up in the working folder, its `themes/`, your theme folders, then the bundled `themes/` ([reference](docs/reference.md#themes)). In the editor app, choose your theme folder once (**Choose theme folder…**, read only; [editor](docs/editor.md)), or put the theme in the working folder's `themes/`; otherwise it builds with `default` and a warning naming the missing theme. An Egatari file carries such a theme with it. Included: `default` (neutral), `business` (neutral, for business and pitch slides: navy with orange emphasis, no logo) and `kokugo` (Mincho, for Japanese language arts). No institutional themes or logos are bundled.
|
|
224
225
|
|
|
225
226
|
## Examples
|
|
226
227
|
|
|
227
228
|
| Example | What it shows |
|
|
228
229
|
|---|---|
|
|
229
230
|
| [`examples/minimal`](examples/minimal) | Japanese, 6 slides on gradient descent: steps, KaTeX with `\hlE`, `{mark}`, `data-morph`, `m-sweep`, a script for every step. A fuller example to learn from (`npm run new` makes a clean template) |
|
|
230
|
-
| [`examples/tmlr2026-calibration`](examples/tmlr2026-calibration) | English, 14 slides introducing a TMLR 2026 paper:
|
|
231
|
+
| [`examples/tmlr2026-calibration`](examples/tmlr2026-calibration) | English, 14 slides introducing a TMLR 2026 paper: parts of that working folder only (`components/`), data made by scripts (`scripts/`, `data/`), English TTS (`voice.json`), theme `default` |
|
|
231
232
|
| [`examples/pitch-fictional`](examples/pitch-fictional) | Japanese, 10 slides: a pitch for a fictional company (株式会社レポミル, a SaaS that drafts reports). `m-kpi`, `m-flow` (money flows and `pulse`), `m-bars` (with an axis rescale), `m-quad`, `m-market`, theme `business`, data written by a script (`scripts/`, `data/`). The company, product and every number are made up |
|
|
232
|
-
| [`examples/kokugo-kanbun`](examples/kokugo-kanbun) | Japanese, 11 slides for a 国語
|
|
233
|
+
| [`examples/kokugo-kanbun`](examples/kokugo-kanbun) | Japanese, 11 slides for a 国語 class: a contents slide with `m-menu` (links to each part, Back to return), kanbun with `m-kanbun` (『史記』, 孟浩然「春暁」, 杜甫「春望」, 『論語』), 『枕草子』 with `m-kobun`, an original modern text with `m-gendai` (vertical), theme `kokugo` |
|
|
233
234
|
| [`examples/heikin-chuouchi`](examples/heikin-chuouchi) | Japanese, 10 slides **with a book** (`article/`, 4 files: chapter numbers, figures, equations, citations, links between the book and the slides) for high-school maths: mean and median as the lowest point of the sum of squared and absolute deviations. `m-curves`, `m-sweep`, `m-bars`, theme `default`. Copied from [egatari/examples](https://github.com/egatari/examples) (`SOURCE.json`); CC BY 4.0 |
|
|
234
235
|
| [`examples/rashomon`](examples/rashomon) | Japanese, 7 slides (5 vertical) **with a book** (`article.md`, vertical) for reading 芥川龍之介「羅生門」 in high school, with `m-gendai`, theme `kokugo`. The story's text is from Aozora Bunko (public domain); the reading guide, slides and script are CC BY 4.0. Copied from [egatari/examples](https://github.com/egatari/examples) (`SOURCE.json`) |
|
|
235
236
|
|
|
@@ -299,7 +300,7 @@ npm run sheet -- examples/minimal # one PNG with every sl
|
|
|
299
300
|
node server/dev.mjs examples/minimal/deck.html # dev server at http://127.0.0.1:8730/ (Ctrl+C to stop)
|
|
300
301
|
```
|
|
301
302
|
|
|
302
|
-
#### Start your own
|
|
303
|
+
#### Start your own slides
|
|
303
304
|
|
|
304
305
|
```bash
|
|
305
306
|
npm run new -- talks/mytalk --lang en --theme default --title "My talk"
|
|
@@ -308,13 +309,13 @@ npm run dev -- talks/mytalk/deck.html # edit in the browser
|
|
|
308
309
|
npm run check -- talks/mytalk/deck.html # the last line should read "エラー 0" (0 errors)
|
|
309
310
|
```
|
|
310
311
|
|
|
311
|
-
`npm run new -- <folder>` creates `deck.html` and `narration.md` from a clean template: a cover and sample slides showing steps, math, emphasis and a part, with a script for every step. It also writes `egatari.json` with `"componentsCatalogue": "2"`: new
|
|
312
|
+
`npm run new -- <folder>` creates `deck.html` and `narration.md` from a clean template: a cover and sample slides showing steps, math, emphasis and a part, with a script for every step. It also writes `egatari.json` with `"componentsCatalogue": "2"`: new files are built with parts library 2, the parts the AI chatbot's instructions describe (a folder without that setting, such as an older working folder, keeps parts library 1). Options: `--lang en|ja` (default `ja`), `--theme <name>` (default `default`), `--title "…"`. It refuses to write into a folder that is not empty. You can change the theme later with `<html data-theme="business">` or `--theme business`. With `<html lang="en">` body text is set in Source Sans 3 and the quality check uses the English standards. For a fuller example, see `examples/minimal/`.
|
|
312
313
|
|
|
313
|
-
Every
|
|
314
|
+
Every new slide has a stable id (`<section class="slide" id="s-k3f9q2">`), and its script heading names it (`## Heading {#s-k3f9q2}`), so you can rename headings without breaking the script, audio or timing. For a working folder made before ids, run `npm run ids -- talks/mytalk` once: it adds ids and renames the keys in `narration.md`, `audio/manifest.json`, `timeline.json` and `comments.json` (keeping backups in `.cache/edits/`).
|
|
314
315
|
|
|
315
316
|
### Editing in the browser (dev server)
|
|
316
317
|
|
|
317
|
-
You rarely need to open `deck.html` by hand. Start the dev server and
|
|
318
|
+
You rarely need to open `deck.html` by hand. Start the dev server and edit on the slide itself:
|
|
318
319
|
|
|
319
320
|
```bash
|
|
320
321
|
node server/dev.mjs path/to/deck.html # then open http://127.0.0.1:8730/ (Ctrl+C to stop)
|
|
@@ -322,9 +323,9 @@ node server/dev.mjs path/to/deck.html # then open http://127.0.0.1:87
|
|
|
322
323
|
|
|
323
324
|
The page shows the slides (arrow keys, `p`, `a`, … all work), with the editing tools around it: the slides run in a sandboxed frame and can only point at what to edit, and nothing is written until you press Save in the editing tools. It reloads by itself whenever a file of the slides changes, and stays on the same slide and step.
|
|
324
325
|
|
|
325
|
-
1. **
|
|
326
|
-
2. **
|
|
327
|
-
3. **Leave a comment: Alt+click (on a Mac, hold ⌥ Option and click).** Write what you want changed ("make this figure larger", "split this slide"). Comments go to `comments.json`; `c` lists them. Then ask your AI
|
|
326
|
+
1. **Edit text: `e`, then double-click.** Editable elements get a dotted outline. Double-click one to open its source (HTML, with math as `\( … \)`), edit, and press ⌘/Ctrl+Enter. Only that element is replaced in `deck.html`.
|
|
327
|
+
2. **Edit the script: `n`.** A drawer shows the script of the current step. Edit the text (add or remove turns, change the speaker) and save. Only that step is replaced in `narration.md`.
|
|
328
|
+
3. **Leave a comment: Alt+click (on a Mac, hold ⌥ Option and click).** Write what you want changed ("make this figure larger", "split this slide"). Comments go to `comments.json`; `c` lists them. Then ask your AI agent (Claude Code, Codex, Gemini CLI …) to "apply the comments in comments.json" and it edits the slides; the page updates as soon as it saves.
|
|
328
329
|
4. **Undo:** the previous versions of `deck.html` and `narration.md` are kept in `.cache/edits/` (last 30).
|
|
329
330
|
|
|
330
331
|
| `e` + double-click: edit the source | `n`: edit the script | Alt / ⌥ Option + click: comment |
|
|
@@ -338,10 +339,10 @@ Details: [docs/dev-server.md](docs/dev-server.md) ([日本語](docs/dev-server.j
|
|
|
338
339
|
| Path | Contents |
|
|
339
340
|
|---|---|
|
|
340
341
|
| `docs/contract.md` | the contract: position and time, parts, script, timeline, emphasis, morphs. **Read this first** ([日本語](docs/contract.ja.md)) |
|
|
341
|
-
| `docs/dev-server.md`, `docs/editor.md`, `docs/video.md`, `docs/distributing.md` | guides: the dev server, the editor app, making a video, and
|
|
342
|
-
| `docs/authoring-with-llms.md` | instructions for
|
|
342
|
+
| `docs/dev-server.md`, `docs/editor.md`, `docs/video.md`, `docs/distributing.md` | guides: the dev server, the editor app, making a video, and distributing a file to learners ([日本語](docs/dev-server.ja.md), [日本語](docs/editor.ja.md), [日本語](docs/video.ja.md), [日本語](docs/distributing.ja.md)) |
|
|
343
|
+
| `docs/authoring-with-llms.md` | instructions for AI chatbots such as ChatGPT, Gemini or Claude to write a first draft; the common body (standard parts); the part set packs (stats, data, math, maps, kokugo, english, music, business, tools, science) are in `docs/llm-parts/`; generated by `tools/make-llm-guide.mjs`, assembled by `node kit/llm-pack.mjs` ([日本語](docs/authoring-with-llms.ja.md)) |
|
|
343
344
|
| `docs/reference.md` | reference: slide syntax, script, timing, themes, keys, URL parameters, and all CLI options and environment variables ([日本語](docs/reference.ja.md)) |
|
|
344
|
-
| `kit/` | runtime (`deck.js`, `presenter.js`, `tools.js`), styles, build, script parser, quality checker, browser launcher; `kit/core/` is the build shared by Node and the editor app, `kit/templates/` the new-
|
|
345
|
+
| `kit/` | runtime (`deck.js`, `presenter.js`, `tools.js`), styles, build, script parser, quality checker, browser launcher; `kit/core/` is the build shared by Node and the editor app, `kit/templates/` the new-slides template |
|
|
345
346
|
| `vendor/components/` | copies of the [egatari/components](https://github.com/egatari/components) releases (parts), every version brought in; default versions pinned in `components.lock.json`; catalog in `vendor/components/CATALOG.md`. Update with `npm run components:update -- vX.Y.Z` |
|
|
346
347
|
| `themes/` | themes |
|
|
347
348
|
| `server/` | dev server and in-browser editor |
|
|
@@ -349,7 +350,7 @@ Details: [docs/dev-server.md](docs/dev-server.md) ([日本語](docs/dev-server.j
|
|
|
349
350
|
| `tts/`, `render/` | tier 2: TTS (a uv project), video rendering |
|
|
350
351
|
| `skills/studio/` | local Claude Code studio skill |
|
|
351
352
|
| `plugins/egatari/` | generated light plugin with only make |
|
|
352
|
-
| `tools/` | new-
|
|
353
|
+
| `tools/` | new-slides template (`new.mjs`), tests and helpers (`smoke`, `test-*`, `shot`, `pdf`, `get-fonts.mjs`) |
|
|
353
354
|
| `CHANGELOG.md` | changes in each release |
|
|
354
355
|
|
|
355
356
|
Tests (need Chrome):
|
|
@@ -367,19 +368,19 @@ node tools/test-app.mjs # editor app
|
|
|
367
368
|
|
|
368
369
|
## Feedback & contributing
|
|
369
370
|
|
|
370
|
-
- In a
|
|
371
|
+
- In a playing file, press `?` and click **Send feedback** (also in the presenter view). It opens a [feedback form](https://github.com/egatari/egatari-studio/issues/new?template=feedback.yml) with only the version, browser, OS, language and mode filled in; nothing from your slides is sent. Turn it off with `<html data-feedback="off">`
|
|
371
372
|
- In Claude Code, say "send feedback": the skill drafts an issue from the session and creates it only after you confirm
|
|
372
|
-
- Want a new figure? Write it in your
|
|
373
|
+
- Want a new figure? Write it in your slides first (inline SVG, or a part of that working folder only); to have it in the Parts library, [propose it in egatari/components](https://github.com/egatari/components/issues/new?template=proposal.yml)
|
|
373
374
|
- Questions: [Discussions](https://github.com/egatari/egatari-studio/discussions). How to contribute: [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
374
375
|
- What changed in each release: [CHANGELOG.md](CHANGELOG.md)
|
|
375
376
|
|
|
376
377
|
## Security
|
|
377
378
|
|
|
378
|
-
|
|
379
|
+
An Egatari file is code: its scripts and parts run in your browser and in the headless Chrome used by the quality checker and renderer, and the build reads local files inside the working folder. Build and serve only files you trust. The trust model and how to report a vulnerability: [SECURITY.md](SECURITY.md).
|
|
379
380
|
|
|
380
381
|
## License
|
|
381
382
|
|
|
382
383
|
- Code: [MIT](LICENSE), Copyright (c) 2026 Gendo Kumoi. Fonts and KaTeX fonts: see [NOTICE](NOTICE)
|
|
383
|
-
- Fonts: BIZ UDPGothic, BIZ UDPMincho and Source Sans 3 are licensed under the SIL Open Font License 1.1 ([fonts/OFL.txt](fonts/OFL.txt) for BIZ UDPGothic, [fonts/OFL-BIZUDPMincho.txt](fonts/OFL-BIZUDPMincho.txt) for BIZ UDPMincho; the `@fontsource` packages ship their own license files). Built
|
|
384
|
+
- Fonts: BIZ UDPGothic, BIZ UDPMincho and Source Sans 3 are licensed under the SIL Open Font License 1.1 ([fonts/OFL.txt](fonts/OFL.txt) for BIZ UDPGothic, [fonts/OFL-BIZUDPMincho.txt](fonts/OFL-BIZUDPMincho.txt) for BIZ UDPMincho; the `@fontsource` packages ship their own license files). Built files embed subsets of them. KaTeX and its fonts are MIT
|
|
384
385
|
- Logo: the Egatari logo ([assets/logo/](assets/logo/), and the editor's favicon and app icons) is not covered by the MIT license. You may use it unmodified to refer to Egatari or to Egatari-compatible software (software that reads or writes Egatari files). See [NOTICE](NOTICE)
|
|
385
386
|
- No university or other institutional logos are included (the institutional themes were removed after 0.4.0; see [CHANGELOG.md](CHANGELOG.md)). A theme you add yourself, with its logos, is under its own terms
|
package/bin/egatari.mjs
CHANGED
|
@@ -24,7 +24,7 @@ const SCRIPTS = {
|
|
|
24
24
|
ids: ['tools/ids.mjs', 'スライドに安定した id を付ける / give slides stable ids', '<folder | deck.html> [--dry-run]'],
|
|
25
25
|
'ids-of': ['tools/ids-of.mjs', 'Egatari ファイルの docId・sourceSha256・ファイル全体の SHA-256 を 1 行ずつ出す / print docId, sourceSha256 and the whole-file SHA-256 of Egatari files', '<file.ega.html> [<file> …] [--json]'],
|
|
26
26
|
portable: ['tools/portable.mjs', 'Egatari ファイル(.ega.html)と作業フォルダの行き来 / Egatari file (.ega.html) <-> working folder', 'unpack|pack|attach|compare …'],
|
|
27
|
-
video: ['render/render.mjs', '
|
|
27
|
+
video: ['render/render.mjs', '音声の入った Egatari ファイルを動画に(ffmpeg が要る。音声は作らない)/ export an Egatari file with its audio to video (needs ffmpeg; makes no audio)', '<folder | .ega.html> または / or <out/deck.html> --out <dir> [--full] [--only key,…]'],
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
function help() {
|
|
@@ -212,7 +212,7 @@ async function doctor() {
|
|
|
212
212
|
console.log(`egatari ${PKG.version} (${ROOT})`);
|
|
213
213
|
const range = PKG.engines?.node || '';
|
|
214
214
|
show(satisfies(process.versions.node, range), 'node', `${process.versions.node}(要るもの / required: ${range})`,
|
|
215
|
-
'Node.js
|
|
215
|
+
'Node.js をインストールし直す / install a supported Node.js: https://nodejs.org/', true);
|
|
216
216
|
const uv = firstLine('uv', ['--version']);
|
|
217
217
|
show(!!uv, 'uv', uv || 'なし / not found(tts に使う / used by tts)',
|
|
218
218
|
'入れ方 / install: https://docs.astral.sh/uv/getting-started/installation/', false);
|
|
@@ -236,7 +236,7 @@ async function doctor() {
|
|
|
236
236
|
// 部品の写し:組み立てが読む index.js を、固定(components.lock.json)と manifest のファイルごとの sha256 で(kit/vendor-verify.mjs)
|
|
237
237
|
const vv = verifyVendorIndex(ROOT);
|
|
238
238
|
show(!vv.problems.length, 'parts', vv.problems.length ? `パーツのコピーが固定と合わない / the vendored parts do not match their pins: ${vv.problems.slice(0, 3).join('; ')}${vv.problems.length > 3 ? ` (+${vv.problems.length - 3})` : ''}`
|
|
239
|
-
: `index.js ${vv.versions} バージョン、固定と manifest の sha256 に合う / ${vv.versions} versions match the lock and the manifests`, '
|
|
239
|
+
: `index.js ${vv.versions} バージョン、固定と manifest の sha256 に合う / ${vv.versions} versions match the lock and the manifests`, 'パッケージをインストールし直す / reinstall the package (`npm install egatari`)', true);
|
|
240
240
|
try {
|
|
241
241
|
const dv = defaultVoices();
|
|
242
242
|
show(!dv.missing, 'voices', dv.missing ? `既定の声 ${dv.missing} 本は初めての egatari tts で取り寄せる / ${dv.missing} default voices are downloaded on the first egatari tts (to ${dv.dir})`
|