egatari 0.6.9-rc.1 → 0.6.10-rc.1
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 +37 -1
- package/README.ja.md +151 -116
- package/README.md +145 -116
- package/bin/egatari.mjs +10 -7
- package/components.lock.json +12 -6
- package/components2.lock.json +151 -1
- package/kit/check-messages.mjs +123 -114
- package/kit/check.mjs +20 -7
- package/kit/core/article-messages.mjs +7 -7
- package/kit/core/build-core.mjs +8 -8
- package/kit/core/check-parity.mjs +1 -1
- package/kit/core/check-source.mjs +4 -0
- package/kit/core/colab-core.mjs +1 -1
- package/kit/core/llm-fix.mjs +15 -15
- package/kit/core/llm-insert.mjs +7 -7
- package/kit/core/llm-outline.mjs +6 -6
- package/kit/core/llm-pack-data.mjs +33 -33
- package/kit/core/narration-parse.mjs +3 -3
- package/kit/core/new-deck.mjs +1 -1
- package/kit/core/predict-steps.mjs +46 -0
- package/kit/core/template-text.mjs +2 -2
- package/kit/instruction-version.json +1 -1
- package/kit/player.json +1 -1
- package/kit/player.lock.json +2 -2
- package/kit/templates/new-deck.mjs +1 -1
- package/package.json +1 -1
- package/render/only.mjs +2 -2
- package/render/render.mjs +4 -4
- package/tools/ids.mjs +7 -7
- package/vendor/components/CATALOG.md +1 -1
- package/vendor/components/sha256/19f34ad938c3513d9268fcedb947e0049380232da2293d5c00922fe32ec1a088/README.en.md +32 -0
- package/vendor/components/sha256/19f34ad938c3513d9268fcedb947e0049380232da2293d5c00922fe32ec1a088/index.js +352 -0
- package/vendor/components/sha256/1d10fec0552198e3926b3d960046606668fa7f42f562cea539c6a16cc3e83338/README.en.md +40 -0
- package/vendor/components/sha256/1d10fec0552198e3926b3d960046606668fa7f42f562cea539c6a16cc3e83338/index.js +341 -0
- package/vendor/components-2/manifest-2.6.2.json +2104 -0
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,41 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
8
8
|
|
|
9
9
|
<!-- Unreleased changes are fragments in changes/*.md (see CONTRIBUTING.md "Changelog"); node tools/changelog.mjs --release X.Y.Z moves them here. -->
|
|
10
10
|
|
|
11
|
+
## [0.6.9] - 2026-11-11
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- New part set `data` (情報・データサイエンス / Data science and code; components 2.6.0, candidate): `m-mapping` (random variable mapping), `m-sampling` (sampling), `m-ci` (confidence intervals), `m-folds` (cross-validation), `m-balance` (expectation as a balance point) and `m-code` (code walkthrough). It has its own AI instructions (`docs/llm-parts/data(.ja).md`), is listed after stats wherever part sets are offered (New…, Insert slide's full instructions, `node kit/llm-pack.mjs --sets data`), and is suggested in New… for words such as data science, programming or cross-validation
|
|
16
|
+
- Egatari Player 1.5.0: an embedded lesson (`?embed=1`) takes the remaining Player P8 commands. `{egatari:"seek", id?, slide, step, t}` (slide key or index from 0, step key, seconds or `null` for the final state) moves there, keeping the playing state, and replies `{egatari:"seeked", id?, slideKey, stepKey, t}` after the `position`;
|
|
17
|
+
`{egatari:"preview", id?, on}` and `{egatari:"controls", id?, visible}` switch the faint preview of later steps and the player's own controls at run time and reply in the same shape
|
|
18
|
+
- Egatari Player 1.5.0: an embedded lesson sends `{egatari:"stepEnded", slideKey, stepKey}` when playback has played a step to its end (not for skipped steps or when paused) and `{egatari:"ended"}` after the last step.
|
|
19
|
+
`snapshot` (OPTIONAL in Player P8) and unknown commands reply `{egatari:"error", id, code:"unsupported"}`; bad arguments reply `error` with the command's name as `code`, as `mode`, `rate` and `layout` already did
|
|
20
|
+
- Themes: eleven object colours `--obj-white`, `--obj-black`, `--obj-red`, `--obj-green`, `--obj-yellow`, `--obj-blue`, `--obj-brown`, `--obj-purple`, `--obj-pink`, `--obj-orange` and `--obj-gray`, for colours that are themselves the content (balls in a bag, litmus paper, traffic lights; format spec §8.4). They are always shown with the colour's name or initial, and white, black and colours near the background with an outline; a part that uses one gives a fallback, which may be a literal colour of that name. Every bundled theme sets all eleven: `default` (1.4.0) `#FFFFFF` `#222222` `#E0242B` `#2E9E44` `#F5D90A` `#1E6FD9` `#8B5A2B` `#8E44AD` `#F27BB0` `#F28C1A` `#8C8C8C`, the same in `sumi`, `kokugo`, `tokiwa`, `murasaki` and `business`; `kogecha` a little less saturated and `asagi` a little brighter (each 1.2.0). No existing colour changes; earlier versions stay in `vendor/themes/`
|
|
21
|
+
`node tools/test-themes.mjs` checks each colour's OKLCH hue window, lightness and chroma, that adjacent names (red–orange, blue–purple, brown–red, gray–white …) are at least ΔE00 20 apart, and prints each colour's contrast with `--bg`
|
|
22
|
+
- Quality check: a literal fallback in `var(--obj-…, …)` is not reported as a colour outside the theme's vocabulary (`colorOutside`), since the format lets an object colour fall back to a literal colour of that name
|
|
23
|
+
- Egatari Viewer: markup, stage 1. Highlight text in a lesson's book in three colours (drawn in the Viewer's own layer in the book's scrolling box; the lesson's text and markup unchanged), practise recall (暗記: the chosen colours hidden, revealed one at a time), and a list with colour filters and names. Highlights are kept on this device only (IndexedDB, one record per docId, not on a shared device) and re-attach after the lesson is revised (egatari-spec annotations.md, Highlight record).
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- Editor site (studio.egatari.org): it now hosts the current version and only the one release before it (`/vX.Y.Z/`), instead of every release since v0.6.0; each release moves the window. Older versions show the short “no longer hosted” page linking to their GitHub release, where the whole site can still be downloaded
|
|
28
|
+
- Components 2.0 lessons use egatari/components **v2.6.0** (candidate) by default. `m-curves` 2.2.0 adds `area` / `areaLabel`: shade between a line and the x-axis over one or several spans (rejection regions, p-values, probabilities), with a label above each span. The new part set `data` (see Added) comes with this release. No other part changes version
|
|
29
|
+
- `egatari check --json`: the stale-audio finding's code is now `audioStale` (was `audio: stale`); the message is unchanged.
|
|
30
|
+
- Egatari Player 1.5.0 (the bundled player that files carry, `player` in the index and `deck-meta`): minor release. Hosts can now drive an embedded lesson with every required Player P8 command and follow playback through `stepEnded` and `ended`. The presenter view's top-right pane is now **Next slide** (「次のスライド」): it shows the next slide in its final state, with all its steps, even while the current slide still has steps to go (with animation, the old pane showed only the next step). On the last slide it shows a plain “End” (「終わり」). The script pane still shows the next step's script under “Next step”
|
|
31
|
+
- Egatari Player 1.5.0: the presenter view's current pane always shows the slide's later steps faintly, like `l` and the preview (at the theme's `--preview-opacity`). This is the presenter's own view: the main window does not change. `l` and its button in the presenter view now turn showing later steps faintly on or off on the main window only, and the button shows the main window's state. No keys were added
|
|
32
|
+
- Format spec copy (`vendor/egatari-spec`): the snapshot **wd-2026-11-10** (egatari-spec 6d93c49). Conforms to WD 2026-11-10 except §8.2 language spans ({lang:…|…}). Not implemented yet, planned for v0.6.10. Files that use spans get a different inputHash from the §5.4 rule until then, so their audio will be regenerated once after the upgrade.
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
|
|
36
|
+
- `egatari check` (and `node kit/check.mjs`) refuses a built `.ega.html` with exit code 2 and the message “.ega.html is a built file. Run the quality check on the source instead (the working folder or deck.html)”; with `--json` it prints `status: "refused"` and no results. It used to read the built file as a deck source and report false overflows, missing narration and overlaps. Checking the source embedded in a `.ega.html` is planned for v0.6.10.
|
|
37
|
+
- Editor app: the quality check now reports raw math left in the slides (`rawMath`, such as a leftover `$…$` in an English lesson) as an error, with the same message as `npm run check`, and includes it in the fix request with the R-math standard
|
|
38
|
+
- Editor app: the quality check now also runs the other checks that `npm run check` had alone and that need no screenshots or files on disk: です・ます and mixed punctuation, script that reads a formula, broken `{note:}`, long turns and the script language, links to slides, emphasis targets, morphs, image and figure names, slide ids and legacy keys, source outside the 1.0 vocabulary and colours outside the theme's vocabulary (info). Findings the fix request did not map to a standard now take it from the check messages (`ruleOf`)
|
|
39
|
+
- `tools/test-check-parity.mjs` (in `npm test`) fails when `npm run check` reports a code that the editor's check lacks, unless it is on `CLI_ONLY` in `kit/core/check-parity.mjs` with its reason
|
|
40
|
+
- Editor app: the Japanese quote template now reads 「引用する文をここに書く」 (plain form), so a new quote slide no longer trips the です・ます check; the earlier text is still found as template text
|
|
41
|
+
- The narration check (`narrFormula`, R-formula) no longer reports code identifiers joined with `_` (`cross_val_score`, `random_state`, `train_test_split`) as an equation read aloud. A name counts as an identifier when one of its parts is a word of three letters or more; subscripts such as `x_1`, `x_t`, `a_ij` and `\alpha_t` are still reported. Hyphenated words such as `scikit-learn` were never reported
|
|
42
|
+
- The same check reads a reading `{x|よみ}` by its spoken form: a single symbol with its reading (`{E_i|イーアイ}`, `{θ|シータ}`), which R-reading allows, is no longer reported, and an expression under one reading (`{E_i + E_j|…}`) is left to `readingExpr` instead of being reported twice
|
|
43
|
+
- Editor app: after **Create** with a pasted AI output (also from a sample) and **Replace** on an Egatari file, the wait logo shows
|
|
44
|
+
“Creating the lesson…” / “Replacing…” until the lesson appears, instead of the start screen (or the old lesson) with no sign of progress for 1–2 seconds
|
|
45
|
+
|
|
11
46
|
## [0.6.8] - 2026-11-10
|
|
12
47
|
|
|
13
48
|
### Added
|
|
@@ -1412,7 +1447,8 @@ First public release.
|
|
|
1412
1447
|
- Docs: README (English and Japanese), the contract (`docs/contract.md`), a reference of every option, syntax and key (`docs/reference.md`, `docs/reference.ja.md`), guides for the dev server and video, CONTRIBUTING, SECURITY, issue forms
|
|
1413
1448
|
- Tests (`npm test`) and GitHub Actions running them on Node 22 and 24, plus a TTS dry-run through video export
|
|
1414
1449
|
|
|
1415
|
-
[Unreleased]: https://github.com/egatari/egatari-studio/compare/v0.6.
|
|
1450
|
+
[Unreleased]: https://github.com/egatari/egatari-studio/compare/v0.6.9...HEAD
|
|
1451
|
+
[0.6.9]: https://github.com/egatari/egatari-studio/compare/v0.6.8...v0.6.9
|
|
1416
1452
|
[0.6.8]: https://github.com/egatari/egatari-studio/compare/v0.6.7...v0.6.8
|
|
1417
1453
|
[0.6.7]: https://github.com/egatari/egatari-studio/compare/v0.6.6...v0.6.7
|
|
1418
1454
|
[0.6.6]: https://github.com/egatari/egatari-studio/compare/v0.6.5...v0.6.6
|
package/README.ja.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- i18n: pair=README.md sha256=
|
|
1
|
+
<!-- i18n: pair=README.md sha256=c7a979ed3fc40edf -->
|
|
2
2
|
<p align="center">
|
|
3
3
|
<picture>
|
|
4
4
|
<source media="(prefers-color-scheme: dark)" srcset="assets/logo/egatari-dark.svg">
|
|
@@ -12,24 +12,43 @@
|
|
|
12
12
|
|
|
13
13
|
[English](README.md) | 日本語
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Egatari は、授業・研修・公共の案内などの教材を、読み上げ付きで作る道具。
|
|
16
|
+
|
|
17
|
+
教材は自己完結した 1 つの HTML で、ステップ表示とパーツで説明の順を見せる。1 組のスライドと台本(`deck.html` と `narration.md`)から、発表・授業・PDF、そして必要なら TTS の動画まで作る。[Claude Code](https://claude.com/claude-code) のスキル(`skills/`)で動かす前提で作ってあるが、どの手順も Node のコマンドなので、Claude Code なしでも使える。
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
*Egatari Studio(旧 motion-academic-slides)。npm のパッケージ・スキル・コマンドの名前は変わらない。*
|
|
18
20
|
|
|
19
21
|

|
|
20
22
|
|
|
23
|
+
## はじめる
|
|
24
|
+
|
|
25
|
+
次のどれか 1 つで始められる。
|
|
26
|
+
|
|
27
|
+
- **編集アプリ(インストール不要)**:Chrome か Edge で <https://studio.egatari.org/> を開き、その場で教材を作る・開く([編集アプリ](#editor-app))。
|
|
28
|
+
- **チャットの AI と**:Claude・Codex 用のスキルを入れ、自動で更新されるようにして(Claude Code は `/plugin` → Marketplaces → egatari → Enable auto-update、Codex は Studio のリリースのたびに `npx egatari@0.6.x skills update`)、教材づくりを頼む([Claude Code で使う](#claude-code)、[Codex で使う](#codex))。
|
|
29
|
+
- **コマンドライン**:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx egatari new mytalk --lang ja
|
|
33
|
+
npx egatari dev mytalk/deck.html
|
|
34
|
+
npx egatari check mytalk/deck.html
|
|
35
|
+
npx egatari build mytalk/deck.html --portable
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Node.js 22.23.4 以上が要る([要るもの](#requirements))。ほかのコマンドは [npm で使う(clone しない)](#npm)、clone して使うなら [クローンして使う](#clone)。
|
|
39
|
+
|
|
21
40
|
## できること
|
|
22
41
|
|
|
23
42
|
- **ステップ表示**:`data-step="k"` で話す順に出す。結論の行(`.concl`)は自動で最後
|
|
24
43
|
- **数式**:KaTeX でビルド時に組む。`\hlE{…}` `\hlT{…}` `\hlM{…}` で式の一部にテーマの色を付ける
|
|
25
|
-
- **パーツ**:[egatari/components](https://github.com/egatari/components) の Web Components のパーツ(写しは `vendor/components/`:`m-sweep` `m-curves` `m-flow` `m-collect` `m-seq`、ビジネス・ピッチ向けの `m-bars` `m-quad` `m-market` `m-kpi`、符号化の授業向けの `m-codetree`(符号の木で系列を復号する)。`m-flow`
|
|
44
|
+
- **パーツ**:[egatari/components](https://github.com/egatari/components) の Web Components のパーツ(写しは `vendor/components/`:`m-sweep` `m-curves` `m-flow` `m-collect` `m-seq`、ビジネス・ピッチ向けの `m-bars` `m-quad` `m-market` `m-kpi`、符号化の授業向けの `m-codetree`(符号の木で系列を復号する)。`m-flow` はお金とサービスの流れも描く)。パーツは教科ごとの束にまとまっている:統計(stats)・情報とデータサイエンス(data。`m-code`・`m-sampling`・`m-ci` など)・数学・地図・国語・英語・音楽・ビジネス・道具(tools)・理科([パーツの束](docs/llm-parts/))。画面は (スライド, ステップ, 時刻) だけで決まるので、そのままコマ単位で動画に書き出せる
|
|
26
45
|
- **スライドへのリンク**:ふつうの `<a href="#<スライドの id>">`(か `#<スライドの id>:<ステップ>`)でそのスライドかステップへ飛び、**戻る**(ボタン・Backspace・Alt+←・ブラウザの戻る)で戻れる。`m-menu` はそのリンクを札の格子に並べる(目次・選ぶ 1 枚)。スクリプトのないふつうのリンクなので、Egatari ファイル(`.ega.html`)は Core のまま。[contract §9](docs/contract.ja.md#9-スライドへのリンク)
|
|
27
46
|
- **国語**:縦書き(`.tate`)・ルビ・明朝(BIZ UDP明朝)・テーマ `kokugo`。`m-kanbun`(白文 → 返り点と送り仮名 → 読む順を 1 字ずつたどる → 書き下し文)、`m-kobun`(1 文ずつの品詞分解・押すと出る助動詞の活用表・現代語訳)、`m-gendai`(傍線・指示語から指す内容への矢印・段落の役割)。[参照](docs/reference.ja.md#国語kokugo)
|
|
28
47
|
- **強調**:台本に `{mark:ID|circle}` と書くと、その言葉のところでスライドに手描きの下線・囲み・枠・スポット・レーザーポインターの点が出る
|
|
29
48
|
- **モーフ**:`data-morph` のスライドでは、前のスライドの式や要素が今の位置へ滑ってくる(Keynote のマジックムーブ)
|
|
30
49
|
- **1 組のスライドと台本で 2 つのモード**:スライドショー(`?mode=talk`)と動画(`?mode=video`)。先のステップを薄く見せるのはスライドショーの選び(`l`。`?mode=lecture` はこの選びを入れて開く)
|
|
31
50
|
- **発表の道具**:発表者ビュー(台本がカンペになる・タイマー)、スライド一覧、レーザーポインター、ペン、消えるペン、ツールバー
|
|
32
|
-
- **テーマ**:基調色 1 つで切り替える(`themes/<名前>/tokens.css`)。パーツはテーマの変数だけを使う。同梱は 7
|
|
51
|
+
- **テーマ**:基調色 1 つで切り替える(`themes/<名前>/tokens.css`)。パーツはテーマの変数だけを使う。同梱は 8 つで、新しい教材は 7 つから選ぶ:藍(`default`)・墨(`sumi`)・国語・常盤・江戸紫・焦茶・浅葱。`business` は、それを使った教材を組めるように同梱のまま残す([リファレンス](docs/reference.ja.md#テーマ))
|
|
33
52
|
- **品質管理**:規格(R-fit・R-steps など)が教材の満たすことを決め、品質チェック `kit/check.mjs`(`npm run check`)がはみ出し・文字の大きさ・ステップ・台本の抜け・配色のコントラスト・パーツの再現性・強調・モーフを調べる
|
|
34
53
|
- **開発サーバー**:ブラウザの上で文言と台本を直し、AI のコーディング道具へのメモを残せる
|
|
35
54
|
- **Egatari ファイル(`.ega.html`)**:`--portable` で(教材のフォルダの最上位に、題名から作った名前で。書いた場所は表示される)、オフラインで再生でき、原稿と音声も中に持つ 1 つの HTML を書く。作業フォルダに戻せる(`npm run portable -- unpack|pack`)。`--play-only` は編集できるスライドと台本を入れない写し。Egatari ファイルの公開の形式 **Egatari(絵語り)**([仕様](https://github.com/egatari/egatari-spec)、1.0 の草案)に従う。[参照](docs/reference.ja.md#1-ファイル--portable)
|
|
@@ -45,114 +64,7 @@
|
|
|
45
64
|
|---|---|
|
|
46
65
|
|  |  |
|
|
47
66
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
| | 段 1:スライド(中心) | 段 2:読み上げ付きの動画(任意) |
|
|
51
|
-
|---|---|---|
|
|
52
|
-
| できるもの | HTML のスライド、発表者ビュー、先のステップを薄く見せる選び、PDF | ステップごとの MP4、全体の動画、音声入りの Egatari ファイル |
|
|
53
|
-
| 要るもの | Node 22 以上。Google Chrome は品質チェック・PDF・テストにだけ使う | 段 1 のもの+ffmpeg・uv・TTS のサーバー・参照音声 |
|
|
54
|
-
| あると良いもの | uv(字の絞り込み) | |
|
|
55
|
-
|
|
56
|
-
**スライドは TTS なしで全部使える。** 段 1 のコマンドは `tts/` と `render/` から何も読み込まない。`audio/` や `voice.json` がなくても build・check・開発サーバーは動く。音声がなければ、自動再生(`a`)は各ステップの既定の長さで進み、台本は発表者ビューにカンペとして出る。
|
|
57
|
-
|
|
58
|
-
## 要るもの
|
|
59
|
-
|
|
60
|
-
**段 1(スライド)**
|
|
61
|
-
|
|
62
|
-
- [Node.js](https://nodejs.org/) 22 以上で、最新のセキュリティ修正を含む版([SECURITY.md](SECURITY.md) 参照)
|
|
63
|
-
- Google Chrome か Microsoft Edge:`kit/check.mjs`・`tools/pdf.mjs`・スクリーンショット・テストで使う(`playwright-core` で Chrome、なければ Edge を探す)。組むことと発表には、ファイルを開くブラウザがあればよい。どちらもなければ `npx playwright-core install chromium` を実行する(Playwright の Chromium を代わりに使う)か、`CHROME_PATH=/path/to/chrome-or-chromium` を指定する
|
|
64
|
-
- あると良い:[uv](https://docs.astral.sh/uv/)。`node tools/get-fonts.mjs` で BIZ UDPゴシック(と BIZ UDP明朝)の TTF を取ってくると、build が uv で `pyftsubset` を動かし、使っている字だけを埋め込む。TTF(または uv)がなければ `@fontsource` の分割ファイル(WOFF2)のうち使う字を含むものを埋め込む。ファイルは大きくなるが見た目は同じ
|
|
65
|
-
|
|
66
|
-
**Windows**
|
|
67
|
-
|
|
68
|
-
入れたばかりの Windows には Node.js も Git もない。PowerShell で:
|
|
69
|
-
|
|
70
|
-
```powershell
|
|
71
|
-
winget install OpenJS.NodeJS.LTS Git.Git # 入れたら端末を開き直す
|
|
72
|
-
winget install astral-sh.uv Gyan.FFmpeg # 任意:uv(字を小さくする)・ffmpeg(動画)
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Edge は最初からあるので、Chrome がなくても品質チェックと PDF は動く。下のコマンドは PowerShell か Git Bash で打つ(`open` は `start` に読み替える)。Git がなければ GitHub から ZIP を落とす(Code → Download ZIP)。読み上げ音声を作る(ステップ 2)には TTS のサーバーが要る。確かめている mlx-audio は Apple silicon の Mac でしか動かない。Windows では、ほかの OpenAI 互換の TTS サーバーを使うか、編集アプリでステップごとに音声を作る・録音する([docs/video.ja.md](docs/video.ja.md#tts-のサーバーmacwindowslinux))。
|
|
76
|
-
|
|
77
|
-
**ブラウザ**
|
|
78
|
-
|
|
79
|
-
- 組んだ HTML の発表:Chrome/Edge 119 以上、Firefox 128 以上、Safari 18 以上(テーマが `--base` から淡色などを導くのに使う CSS の相対色の記法と `color-mix()` に対応しているもの)。それより古いブラウザでも表示はできるが、色はテーマの `--base` から導いたものではなく、既定のテーマから計算した固定の予備の色になる
|
|
80
|
-
- PDF(`tools/pdf.mjs`)・動画(`render/`)・`kit/check.mjs`・テストは Google Chrome(または Playwright の Chromium)だけで作り、確かめている(Edge も同じエンジン)
|
|
81
|
-
|
|
82
|
-
**段 2(動画)**
|
|
83
|
-
|
|
84
|
-
- ffmpeg と ffprobe(`PATH` に置く)
|
|
85
|
-
- uv(`tts/` の小さな Python プロジェクトを動かす)
|
|
86
|
-
- OpenAI 互換の音声合成 API を持つ TTS のサーバー。たとえば [mlx-audio](https://github.com/Blaizzy/mlx-audio) で `mlx-community/Irodori-TTS-v4.1-Small-fp16`(日本語)か `mlx-community/VoxCPM2-8bit`(英語など)を動かす。場所は `IRODORI_URL`(既定 `http://localhost:8882`)。mlx-audio は Apple silicon の Mac でだけ動く。Windows・Linux では[ほかの TTS サーバー](docs/video.ja.md#tts-のサーバーmacwindowslinux)
|
|
87
|
-
- 参照音声:既定の声 `bob` と `alice`(合成した声。日本語と英語)はリポジトリの `tts/voices/` にある([詳しく](tts/voices/README.md))。npm の包みには入れていない。使う声がなければ、初めての `egatari tts` がこのリポジトリの決まったタグから取り寄せ、`tts/voices.json` の sha256 と比べて利用者のキャッシュのフォルダ(macOS は `~/Library/Caches/egatari/voices/`、Linux は `~/.cache/egatari/voices/`、Windows は `%LOCALAPPDATA%\egatari\voices\`)に置く。自分の声は `<名前>.wav` としてそこ(git 管理外)か `IRODORI_REF_DIR` に置く
|
|
88
|
-
|
|
89
|
-
## はじめ方(段 1:スライド)
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
git clone --depth 1 https://github.com/egatari/egatari-studio.git
|
|
93
|
-
cd egatari-studio
|
|
94
|
-
npm ci
|
|
95
|
-
node tools/get-fonts.mjs # 任意:埋め込む字を小さくする(build で uv を使う)
|
|
96
|
-
|
|
97
|
-
node kit/build.mjs examples/minimal/deck.html # → examples/minimal/out/deck.html
|
|
98
|
-
open examples/minimal/out/deck.html # macOS。ほかの OS ではファイルをブラウザで開く
|
|
99
|
-
|
|
100
|
-
node kit/check.mjs examples/minimal/deck.html # 品質チェック。最後の行が「エラー 0」になる
|
|
101
|
-
node tools/pdf.mjs examples/minimal/out/deck.html examples/minimal/out/deck.pdf # PDF(1 スライド 1 ページ)
|
|
102
|
-
npm run sheet -- examples/minimal # 全スライドの最終段階を 1 枚の PNG に(品質チェックで見えないものを目で見る)
|
|
103
|
-
node server/dev.mjs examples/minimal/deck.html # 開発サーバー http://127.0.0.1:8730/(Ctrl+C で止める)
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
### 自分の教材を作る
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
npm run new -- talks/mytalk --theme default --title "発表の題名"
|
|
110
|
-
npm run build -- talks/mytalk/deck.html # -> talks/mytalk/out/deck.html
|
|
111
|
-
npm run dev -- talks/mytalk/deck.html # ブラウザで直す
|
|
112
|
-
npm run check -- talks/mytalk/deck.html # 最後の行が「エラー 0」になればよい
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
`npm run new -- <フォルダ>` は、きれいなテンプレートから `deck.html` と `narration.md` を作る(表紙と、ステップ・数式・強調・パーツの見本のスライド。台本は全ステップぶん)。`"componentsCatalogue": "2"` の `egatari.json` も書く:新しい教材は、チャットの AI への指示が説明するパーツライブラリ 2 で組む(その設定のないフォルダ、たとえば前からの教材は、パーツライブラリ 1 のまま)。選択肢は `--lang en|ja`(既定 `ja`)、`--theme <名前>`(既定 `default`)、`--title "…"`。空でないフォルダには書かない。テーマは後から `<html data-theme="business">` か `--theme business` で変えられる。`<html lang="en">` の教材は本文の字が Source Sans 3 になり、品質チェックも英語の規格になる。もっと作り込んだ見本は `examples/minimal/`。
|
|
116
|
-
|
|
117
|
-
新しい教材のスライドにはどれも変わらない id(`<section class="slide" id="s-k3f9q2">`)があり、台本の見出しがそれを指す(`## 見出し {#s-k3f9q2}`)。見出しを直しても、台本・音声・秒数の対応は崩れない。id のない頃に作った教材は、一度 `npm run ids -- talks/mytalk` を打つ:id を付け、`narration.md`・`audio/manifest.json`・`timeline.json`・`comments.json` の鍵を付け替える(控えは `.cache/edits/`)。
|
|
118
|
-
|
|
119
|
-
### npm で使う(clone しない)
|
|
120
|
-
|
|
121
|
-
npm の包み `egatari` は、同じ道具を 1 つのコマンド `egatari` にまとめたもの:
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
npx egatari new mytalk --lang ja # mytalk/deck.html・mytalk/narration.md・mytalk/egatari.json を作る
|
|
125
|
-
npx egatari build mytalk/deck.html # -> mytalk/out/deck.html(--portable・--play-only などの組み立ての選択肢もそのまま使える)
|
|
126
|
-
npx egatari dev mytalk/deck.html # ブラウザで直す
|
|
127
|
-
npx egatari check mytalk/deck.html # 最後の行が「エラー 0」になればよい
|
|
128
|
-
npx egatari doctor # Node・uv・ffmpeg・ブラウザ・部品の写しがあるか、ないものの入れ方
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
Bun(`bunx egatari`)でも動きます。
|
|
132
|
-
|
|
133
|
-
ほかのコマンド(`ids`・`ids-of`・`sheet`・`comment-shots`・`portable`・`video`・`tts`)は `npx egatari --help` に出る。`npx egatari ids-of <file.ega.html> […]` は、ファイルごとに 1 行で(タブ区切り。`--json` で JSON)、`docId`、ファイルの原稿から計算し直した `sourceSha256`(原稿の版。音声と組んだ部分は含まない。ファイルに書かれた値と違えば stderr に警告)、ファイル全体の SHA-256(ファイルそのものを表す。配布や LMS への登録の照合用)を出す。誰が公開したかは署名(形式 §10、まだ実装していない)の役目。`npx egatari video <作業フォルダ | .ega.html>` は組んでから、今ある音声のまま動画にする(ffmpeg が要る)。相対パスは今いるフォルダから解く。組み立てが埋め込む既定の字体は包みに入っている(`get-fonts` は要らない)。同梱のテーマの字体(`asagi` の Zen Maru Gothic)も入っているので、同梱のテーマはどれも `npx egatari` だけで組める。教材の CSS や自分のテーマだけが名指せるほかの選べる字体(Klee One など)は、別の包み `@egatari/fonts-extra` にある(`npm i -D @egatari/fonts-extra`、または `npx -p egatari -p @egatari/fonts-extra egatari …`。要る教材なら `egatari build` と `check` が知らせる)。パーツライブラリの写しは、組み立てが読む `index.js` と使用条件だけを入れる(README・見本・変更の記録は入れない。`egatari doctor` が `index.js` を `components.lock.json` と manifest のファイルごとの sha256 で確かめる)。TTS の既定の声は初めての `egatari tts` で取り寄せる(上の「要るもの」)。`egatari tts` は uv で `tts/synth.py` を動かし、Python の環境を利用者のキャッシュのフォルダに作る(別の場所にするには `UV_PROJECT_ENVIRONMENT`)。
|
|
134
|
-
|
|
135
|
-
## ブラウザで直す(開発サーバー)
|
|
136
|
-
|
|
137
|
-
`deck.html` を手で開いて書き換える必要はほとんどない。開発サーバーを起動して、スライドの上で直す。
|
|
138
|
-
|
|
139
|
-
```bash
|
|
140
|
-
node server/dev.mjs path/to/deck.html # http://127.0.0.1:8730/ を開く(Ctrl+C で止める)
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
画面はいつもの発表画面(矢印・`p`・`a` などはそのまま使える)で、編集の道具はその外側に出る。スライドは sandbox の枠の中で動き、「どこを直したいか」を知らせることしかできず、編集の道具で「保存」を押すまで何も書き込まれない。スライドのファイルが変わると自動で読み込み直し、スライドとステップはそのまま残る。
|
|
144
|
-
|
|
145
|
-
1. **文字を直す:`e` → ダブルクリック。** 直せる要素に点線の枠が出る。ダブルクリックでその部分の原稿(HTML と `\( … \)` の式)が開くので、直して ⌘/Ctrl+Enter。`deck.html` のその要素だけが書き換わる
|
|
146
|
-
2. **台本を直す:`n`。** 右に今のステップの台本が出る。直して保存(発言の追加・削除・話者の変更もできる)。`narration.md` のそのステップだけが書き換わる
|
|
147
|
-
3. **コメントを残す:Alt+クリック(Mac は ⌥ option キーを押したままクリック)。** 直してほしいことを書く(「この図を大きく」「このスライドを 2 枚に分けて」)。メモは `comments.json` に貯まり、`c` で一覧。AI のコーディング道具(Claude Code・Codex・Gemini CLI など)に「comments.json のメモを反映して」と頼むと直し、保存した時点で画面に出る
|
|
148
|
-
4. **元に戻す:** 書き換える前の `deck.html`・`narration.md` は `.cache/edits/` に残る(新しい 30 個)
|
|
149
|
-
|
|
150
|
-
| `e`+ダブルクリック:原稿を直す | `n`:台本を直す | Alt / ⌥ option+クリック:コメント |
|
|
151
|
-
|---|---|---|
|
|
152
|
-
|  |  |  |
|
|
153
|
-
|
|
154
|
-
詳しくは [docs/dev-server.ja.md](docs/dev-server.ja.md)([English](docs/dev-server.md))。
|
|
155
|
-
|
|
67
|
+
<a id="editor-app"></a>
|
|
156
68
|
## 編集アプリ(インストール不要)
|
|
157
69
|
|
|
158
70
|
開発サーバーと同じ編集を、Egatari ファイル(`.ega.html`)か作業フォルダを直接開くウェブページでできる。Node もターミナルも要らない。Egatari ファイルはどのブラウザでも開いて直せ、作業フォルダには**パソコンの Google Chrome か Microsoft Edge** が要る(File System Access API を使う。Safari と Firefox にはない)。
|
|
@@ -180,6 +92,7 @@ node server/dev.mjs path/to/deck.html # http://127.0.0.1:8730/ を開
|
|
|
180
92
|
|
|
181
93
|
詳しくは [docs/editor.ja.md](docs/editor.ja.md)([English](docs/editor.md))。
|
|
182
94
|
|
|
95
|
+
<a id="claude-code"></a>
|
|
183
96
|
## Claude Code で使う
|
|
184
97
|
|
|
185
98
|
Claude Code や Cowork(Claude のデスクトップアプリ)で教材を作る:[docs/with-claude.ja.md](docs/with-claude.ja.md)([English](docs/with-claude.md))。
|
|
@@ -192,8 +105,11 @@ Claude Code や Cowork(Claude のデスクトップアプリ)で教材を作
|
|
|
192
105
|
/plugin install egatari-studio@egatari
|
|
193
106
|
```
|
|
194
107
|
|
|
195
|
-
|
|
108
|
+
入れたら、自動更新を有効にする:`/plugin` → Marketplaces → egatari → Enable auto-update。Claude Code が初めから自動で更新するのは Anthropic の公式のマーケットプレイスだけで、egatari のようなほかのマーケットプレイスは初めは自動更新が切れている。スキルの指示と品質チェックは Studio の版ごとに変わるので、古いスキルのままだと、新しい決まりや直しが使われない。スキルが古いとわかれば、スキル自身が 1 回だけ知らせる(作業は止めない)。
|
|
196
109
|
|
|
110
|
+
studio スキルはコマンドを npm の包み egatari(`npx egatari@0.6.x …`、[npm で使う(clone しない)](#npm))で動かす。リポジトリの clone も `npm ci` も要らず、Node.js があればよい(初めに `npx egatari@0.6.x doctor` で足りないものと入れ方を確かめる)。更新は `/plugin update egatari@egatari` と `/plugin update egatari-studio@egatari`。入れている道具(Claude Code・Codex)すべてをまとめて更新するには `npx egatari@0.6.x skills update` を実行し、道具を再起動する。make だけを使う場合は、書き終えた作業フォルダを Chrome か Edge の <https://studio.egatari.org/> で開く。Mac の Safari は Egatari ファイル(.ega.html)で開く手順を使う。
|
|
111
|
+
|
|
112
|
+
<a id="codex"></a>
|
|
197
113
|
## Codex で使う
|
|
198
114
|
|
|
199
115
|
Codex も同じリポジトリの同じスキルを読む。ターミナルで:
|
|
@@ -204,9 +120,11 @@ codex plugin add egatari@egatari
|
|
|
204
120
|
codex plugin add egatari-studio@egatari
|
|
205
121
|
```
|
|
206
122
|
|
|
123
|
+
入れたら、Studio のリリースのたびに `npx egatari@0.6.x skills update` を実行して Codex を再起動する。スキルの指示と品質チェックは Studio の版ごとに変わるので、古いスキルのままだと、新しい決まりや直しが使われない。
|
|
124
|
+
|
|
207
125
|
教材を書くだけなら `egatari`(Node.js は要らない)、ローカルの品質チェック・組み立て・パーツ作成・動画には `egatari-studio` も入れる。Codex を再起動して教材を頼む。Codex の workspace-write サンドボックスはネットとブラウザを塞ぐので、`check` と `build` はサンドボックスの外で、またはネットとブラウザを許して動かす。更新は `codex plugin marketplace upgrade egatari` のあと `codex plugin add egatari@egatari` と `codex plugin add egatari-studio@egatari` をもう一度(Codex に更新だけの命令はない)。`npx egatari@0.6.x skills update` なら、Claude Code にも Codex にも同じことをする。入れたスキルが包みより古いときは `npx egatari@0.6.x doctor` が知らせる。
|
|
208
126
|
|
|
209
|
-
チャットの AI には `egatari-make-skill.zip`
|
|
127
|
+
チャットの AI には `egatari-make-skill.zip` をアップロードする。Studio が新しくなったら、Studio の『AI のスキルをダウンロード』で入れ直す。開発者は `node tools/make-llm-guide.mjs --zip out/release` で作れる。ZIP の `make/` は、生成してコミットする `plugins/egatari/skills/make/` と同じ内容。
|
|
210
128
|
|
|
211
129
|
| スキル | 使いどころ |
|
|
212
130
|
|---|---|
|
|
@@ -222,6 +140,23 @@ codex plugin add egatari-studio@egatari
|
|
|
222
140
|
|
|
223
141
|
スキルはまず構成案を見せ、承認を得てから HTML を書く。
|
|
224
142
|
|
|
143
|
+
<a id="npm"></a>
|
|
144
|
+
## npm で使う(clone しない)
|
|
145
|
+
|
|
146
|
+
npm の包み `egatari` は、同じ道具を 1 つのコマンド `egatari` にまとめたもの:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
npx egatari new mytalk --lang ja # mytalk/deck.html・mytalk/narration.md・mytalk/egatari.json を作る
|
|
150
|
+
npx egatari build mytalk/deck.html # -> mytalk/out/deck.html(--portable・--play-only などの組み立ての選択肢もそのまま使える)
|
|
151
|
+
npx egatari dev mytalk/deck.html # ブラウザで直す
|
|
152
|
+
npx egatari check mytalk/deck.html # 最後の行が「エラー 0」になればよい
|
|
153
|
+
npx egatari doctor # Node・uv・ffmpeg・ブラウザ・パーツの写しがあるか、ないものの入れ方
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Bun(`bunx egatari`)でも動きます。
|
|
157
|
+
|
|
158
|
+
ほかのコマンドと設定(`ids-of`・追加の字体・パーツの写し・TTS の環境変数):[docs/cli.ja.md](docs/cli.ja.md)。一覧は `npx egatari --help`。
|
|
159
|
+
|
|
225
160
|
## 動画にする(段 2)
|
|
226
161
|
|
|
227
162
|
```bash
|
|
@@ -238,6 +173,18 @@ node render/render.mjs $D/out/deck.html --out $D/video # 1 段階だけなら
|
|
|
238
173
|
- **音声入りの HTML**:`node kit/build.mjs $D/deck.html --embed-audio` で台本の音声を HTML の中に入れる。1 つのファイルだけで、どこでも `a`(自動再生)で音声付きで進む。音声は AAC(64 kbps・モノラル)に圧縮する(5 分で約 4.5 MB。WAV のままだと約 30 MB)。今の主要なブラウザはすべて再生できる。`--embed-audio` を付けなければ、HTML は `audio/` の WAV を参照するだけで変換しない。ffmpeg がなければ WAV のまま埋め込み、build が警告する
|
|
239
174
|
- 詳しく(キャッシュ、`timeline.json` での長さの調整、読み辞書):[docs/video.ja.md](docs/video.ja.md)([English](docs/video.md))
|
|
240
175
|
|
|
176
|
+
動画に要るもの(ffmpeg・uv・TTS のサーバー・参照音声)は [要るもの](#requirements) の「段 2」にある。段 1 と段 2 の違いは次の「2 つの使い方」。
|
|
177
|
+
|
|
178
|
+
## 2 つの使い方
|
|
179
|
+
|
|
180
|
+
| | 段 1:スライド(中心) | 段 2:読み上げ付きの動画(任意) |
|
|
181
|
+
|---|---|---|
|
|
182
|
+
| できるもの | HTML のスライド、発表者ビュー、先のステップを薄く見せる選び、PDF | ステップごとの MP4、全体の動画、音声入りの Egatari ファイル |
|
|
183
|
+
| 要るもの | Node 22 以上。Google Chrome は品質チェック・PDF・テストにだけ使う | 段 1 のもの+ffmpeg・uv・TTS のサーバー・参照音声 |
|
|
184
|
+
| あると良いもの | uv(字の絞り込み) | |
|
|
185
|
+
|
|
186
|
+
**スライドは TTS なしで全部使える。** 段 1 のコマンドは `tts/` と `render/` から何も読み込まない。`audio/` や `voice.json` がなくても build・check・開発サーバーは動く。音声がなければ、自動再生(`a`)は各ステップの既定の長さで進み、台本は発表者ビューにカンペとして出る。
|
|
187
|
+
|
|
241
188
|
## 操作(発表)
|
|
242
189
|
|
|
243
190
|
| キー | すること |
|
|
@@ -304,7 +251,95 @@ node kit/build.mjs examples/minimal/deck.html --theme mylab
|
|
|
304
251
|
|
|
305
252
|

|
|
306
253
|
|
|
307
|
-
|
|
254
|
+
<a id="clone"></a>
|
|
255
|
+
## クローンして使う
|
|
256
|
+
|
|
257
|
+
ここから先は、このリポジトリを clone して道具を動かすときの手順(Studio 自体を直すときや、`node` のスクリプトを直接使うとき)。clone しない使い方は [npm で使う(clone しない)](#npm)。
|
|
258
|
+
|
|
259
|
+
<a id="requirements"></a>
|
|
260
|
+
### 要るもの
|
|
261
|
+
|
|
262
|
+
**段 1(スライド)**
|
|
263
|
+
|
|
264
|
+
- [Node.js](https://nodejs.org/) 22 以上で、最新のセキュリティ修正を含む版([SECURITY.md](SECURITY.md) 参照)
|
|
265
|
+
- Google Chrome か Microsoft Edge:`kit/check.mjs`・`tools/pdf.mjs`・スクリーンショット・テストで使う(`playwright-core` で Chrome、なければ Edge を探す)。組むことと発表には、ファイルを開くブラウザがあればよい。どちらもなければ `npx playwright-core install chromium` を実行する(Playwright の Chromium を代わりに使う)か、`CHROME_PATH=/path/to/chrome-or-chromium` を指定する
|
|
266
|
+
- あると良い:[uv](https://docs.astral.sh/uv/)。`node tools/get-fonts.mjs` で BIZ UDPゴシック(と BIZ UDP明朝)の TTF を取ってくると、build が uv で `pyftsubset` を動かし、使っている字だけを埋め込む。TTF(または uv)がなければ `@fontsource` の分割ファイル(WOFF2)のうち使う字を含むものを埋め込む。ファイルは大きくなるが見た目は同じ
|
|
267
|
+
|
|
268
|
+
**Windows**
|
|
269
|
+
|
|
270
|
+
入れたばかりの Windows には Node.js も Git もない。PowerShell で:
|
|
271
|
+
|
|
272
|
+
```powershell
|
|
273
|
+
winget install OpenJS.NodeJS.LTS Git.Git # 入れたら端末を開き直す
|
|
274
|
+
winget install astral-sh.uv Gyan.FFmpeg # 任意:uv(字を小さくする)・ffmpeg(動画)
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
Edge は最初からあるので、Chrome がなくても品質チェックと PDF は動く。下のコマンドは PowerShell か Git Bash で打つ(`open` は `start` に読み替える)。Git がなければ GitHub から ZIP を落とす(Code → Download ZIP)。読み上げ音声を作る(ステップ 2)には TTS のサーバーが要る。確かめている mlx-audio は Apple silicon の Mac でしか動かない。Windows では、ほかの OpenAI 互換の TTS サーバーを使うか、編集アプリでステップごとに音声を作る・録音する([docs/video.ja.md](docs/video.ja.md#tts-のサーバーmacwindowslinux))。
|
|
278
|
+
|
|
279
|
+
**ブラウザ**
|
|
280
|
+
|
|
281
|
+
- 組んだ HTML の発表:Chrome/Edge 119 以上、Firefox 128 以上、Safari 18 以上(テーマが `--base` から淡色などを導くのに使う CSS の相対色の記法と `color-mix()` に対応しているもの)。それより古いブラウザでも表示はできるが、色はテーマの `--base` から導いたものではなく、既定のテーマから計算した固定の予備の色になる
|
|
282
|
+
- PDF(`tools/pdf.mjs`)・動画(`render/`)・`kit/check.mjs`・テストは Google Chrome(または Playwright の Chromium)だけで作り、確かめている(Edge も同じエンジン)
|
|
283
|
+
|
|
284
|
+
**段 2(動画)**
|
|
285
|
+
|
|
286
|
+
- ffmpeg と ffprobe(`PATH` に置く)
|
|
287
|
+
- uv(`tts/` の小さな Python プロジェクトを動かす)
|
|
288
|
+
- OpenAI 互換の音声合成 API を持つ TTS のサーバー。たとえば [mlx-audio](https://github.com/Blaizzy/mlx-audio) で `mlx-community/Irodori-TTS-v4.1-Small-fp16`(日本語)か `mlx-community/VoxCPM2-8bit`(英語など)を動かす。場所は `IRODORI_URL`(既定 `http://localhost:8882`)。mlx-audio は Apple silicon の Mac でだけ動く。Windows・Linux では[ほかの TTS サーバー](docs/video.ja.md#tts-のサーバーmacwindowslinux)
|
|
289
|
+
- 参照音声:既定の声 `bob` と `alice`(合成した声。日本語と英語)はリポジトリの `tts/voices/` にある([詳しく](tts/voices/README.md))。npm の包みには入れていない。使う声がなければ、初めての `egatari tts` がこのリポジトリの決まったタグから取り寄せ、`tts/voices.json` の sha256 と比べて利用者のキャッシュのフォルダ(macOS は `~/Library/Caches/egatari/voices/`、Linux は `~/.cache/egatari/voices/`、Windows は `%LOCALAPPDATA%\egatari\voices\`)に置く。自分の声は `<名前>.wav` としてそこ(git 管理外)か `IRODORI_REF_DIR` に置く
|
|
290
|
+
|
|
291
|
+
### はじめ方(段 1:スライド)
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
git clone --depth 1 https://github.com/egatari/egatari-studio.git
|
|
295
|
+
cd egatari-studio
|
|
296
|
+
npm ci
|
|
297
|
+
node tools/get-fonts.mjs # 任意:埋め込む字を小さくする(build で uv を使う)
|
|
298
|
+
|
|
299
|
+
node kit/build.mjs examples/minimal/deck.html # → examples/minimal/out/deck.html
|
|
300
|
+
open examples/minimal/out/deck.html # macOS。ほかの OS ではファイルをブラウザで開く
|
|
301
|
+
|
|
302
|
+
node kit/check.mjs examples/minimal/deck.html # 品質チェック。最後の行が「エラー 0」になる
|
|
303
|
+
node tools/pdf.mjs examples/minimal/out/deck.html examples/minimal/out/deck.pdf # PDF(1 スライド 1 ページ)
|
|
304
|
+
npm run sheet -- examples/minimal # 全スライドの最後のステップを 1 枚の PNG に(品質チェックで見えないものを目で見る)
|
|
305
|
+
node server/dev.mjs examples/minimal/deck.html # 開発サーバー http://127.0.0.1:8730/(Ctrl+C で止める)
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
#### 自分の教材を作る
|
|
309
|
+
|
|
310
|
+
```bash
|
|
311
|
+
npm run new -- talks/mytalk --theme default --title "発表の題名"
|
|
312
|
+
npm run build -- talks/mytalk/deck.html # -> talks/mytalk/out/deck.html
|
|
313
|
+
npm run dev -- talks/mytalk/deck.html # ブラウザで直す
|
|
314
|
+
npm run check -- talks/mytalk/deck.html # 最後の行が「エラー 0」になればよい
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
`npm run new -- <フォルダ>` は、きれいなテンプレートから `deck.html` と `narration.md` を作る(表紙と、ステップ・数式・強調・パーツの見本のスライド。台本は全ステップぶん)。`"componentsCatalogue": "2"` の `egatari.json` も書く:新しい教材は、チャットの AI への指示が説明するパーツライブラリ 2 で組む(その設定のないフォルダ、たとえば前からの教材は、パーツライブラリ 1 のまま)。選択肢は `--lang en|ja`(既定 `ja`)、`--theme <名前>`(既定 `default`)、`--title "…"`。空でないフォルダには書かない。テーマは後から `<html data-theme="business">` か `--theme business` で変えられる。`<html lang="en">` の教材は本文の字が Source Sans 3 になり、品質チェックも英語の規格になる。もっと作り込んだ見本は `examples/minimal/`。
|
|
318
|
+
|
|
319
|
+
新しい教材のスライドにはどれも変わらない id(`<section class="slide" id="s-k3f9q2">`)があり、台本の見出しがそれを指す(`## 見出し {#s-k3f9q2}`)。見出しを直しても、台本・音声・秒数の対応は崩れない。id のない頃に作った教材は、一度 `npm run ids -- talks/mytalk` を打つ:id を付け、`narration.md`・`audio/manifest.json`・`timeline.json`・`comments.json` の鍵を付け替える(控えは `.cache/edits/`)。
|
|
320
|
+
|
|
321
|
+
### ブラウザで直す(開発サーバー)
|
|
322
|
+
|
|
323
|
+
`deck.html` を手で開いて書き換える必要はほとんどない。開発サーバーを起動して、スライドの上で直す。
|
|
324
|
+
|
|
325
|
+
```bash
|
|
326
|
+
node server/dev.mjs path/to/deck.html # http://127.0.0.1:8730/ を開く(Ctrl+C で止める)
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
画面はいつもの発表画面(矢印・`p`・`a` などはそのまま使える)で、編集の道具はその外側に出る。スライドは sandbox の枠の中で動き、「どこを直したいか」を知らせることしかできず、編集の道具で「保存」を押すまで何も書き込まれない。スライドのファイルが変わると自動で読み込み直し、スライドとステップはそのまま残る。
|
|
330
|
+
|
|
331
|
+
1. **文字を直す:`e` → ダブルクリック。** 直せる要素に点線の枠が出る。ダブルクリックでその部分の原稿(HTML と `\( … \)` の式)が開くので、直して ⌘/Ctrl+Enter。`deck.html` のその要素だけが書き換わる
|
|
332
|
+
2. **台本を直す:`n`。** 右に今のステップの台本が出る。直して保存(発言の追加・削除・話者の変更もできる)。`narration.md` のそのステップだけが書き換わる
|
|
333
|
+
3. **コメントを残す:Alt+クリック(Mac は ⌥ option キーを押したままクリック)。** 直してほしいことを書く(「この図を大きく」「このスライドを 2 枚に分けて」)。メモは `comments.json` に貯まり、`c` で一覧。AI のコーディング道具(Claude Code・Codex・Gemini CLI など)に「comments.json のメモを反映して」と頼むと直し、保存した時点で画面に出る
|
|
334
|
+
4. **元に戻す:** 書き換える前の `deck.html`・`narration.md` は `.cache/edits/` に残る(新しい 30 個)
|
|
335
|
+
|
|
336
|
+
| `e`+ダブルクリック:原稿を直す | `n`:台本を直す | Alt / ⌥ option+クリック:コメント |
|
|
337
|
+
|---|---|---|
|
|
338
|
+
|  |  |  |
|
|
339
|
+
|
|
340
|
+
詳しくは [docs/dev-server.ja.md](docs/dev-server.ja.md)([English](docs/dev-server.md))。
|
|
341
|
+
|
|
342
|
+
### 構成
|
|
308
343
|
|
|
309
344
|
| 場所 | 中身 |
|
|
310
345
|
|---|---|
|