egatari 0.6.9 → 0.6.10
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 +28 -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 +12 -8
- 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,32 @@ 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.10] - 2026-11-13
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Quality check (`npm run check` and the editor app): a warning `predictAnswerWithCount` (R-steps) when a prediction (`m-predict`) opens its answer at the same step as the vote count, that is `answer-step` 1 or less (read as the part reads it: missing, `0` and non-numbers mean the default 2). The class would see the answer before counting; set `answer-step` to 2 or more. The warning goes into the fix request
|
|
16
|
+
- Quality check (`npm run check` and the editor app): a warning `predictAnswerNeverShown` (R-steps) when an `m-predict` has a `steps` attribute below its answer step, so the answer never shows (the player stops a part at its `steps`); set `steps` to `answer-step` or more. It replaces `predictAnswerWithCount` on the same part
|
|
17
|
+
- Site player (`tools/build-site-player.mjs`, `play/site-player.mjs`): plays a sample lesson on a static site such as egatari.org the way Egatari Viewer plays a file, after checking its bytes against the site's lock.
|
|
18
|
+
- The make and studio skills tell the user once per conversation when they are older than the Studio in use, and keep working: “The Egatari skill is an old version (<version>). You can update it with /plugin (Marketplaces → egatari → Enable auto-update keeps it updated automatically).” (in Codex, `npx egatari@0.6.x skills update`). studio compares its version with the new `egatari doctor` line; make compares it with the Studio version recorded in a file the user opens (`generator.version` in the `deck-meta` of a `.ega.html`, or `version` in the `deck-meta` of a working folder's `out/deck.html`). No network calls
|
|
19
|
+
- `egatari doctor` prints the skill instructions and Studio version it carries: `ok skills 指示の版 b2ad9e7c(Studio 0.6.10)/ skill instructions b2ad9e7c (Studio 0.6.10)`. Both skills carry a generated skill version line (`**スキルの版:…**` / `**Skill version: …**`) under the instruction version
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- Quality check (`npm run check` and the editor app): the Japanese messages now say 「ステップ」 for a click-forward within a slide, as the glossary decides, instead of 「段階」 (for example 「ステップ 2」, 「結論のステップ」, 「このステップの口述原稿がない」). The wording of the messages is otherwise unchanged and the English messages are untouched. The terms lint (`npm run lint:terms`) now scans `kit/check-messages.mjs` too, so the old word cannot come back; the spec and file-name words that the messages quote on purpose (口述原稿, 部品, デッキ and so on) are listed in `docs/terms-allow.json`
|
|
24
|
+
- Quality check (`npm run check`, the editor app and the fix request) and the AI instructions (the instruction pack in New…, `docs/authoring-with-llms*`, `docs/llm-parts/*`, the make and studio skills, and the insert and outline requests) now use the glossary words (`docs/terms.md`), so the AI reads the same words in the instructions and in the findings: 部品 → パーツ (component → part), 口述原稿 → 台本 (narration → script), デッキ → 教材 (deck → lesson, for example 「教材全体」 / “Whole lesson”), 雛形 → テンプレート, 検査 → 品質チェック (for example 「品質チェックが終わっていない」 / “the quality check did not finish”), 注目の演出 → 強調 (attention marks → emphasis), 1 ファイル → Egatari ファイル (the single file → the Egatari file). The English stale-audio finding is now in English after its fixed head `audio: stale —`. File names, tags, codes and rule names (`deck.html`, `narration.md`, `<m-…>`, `R-components`) are unchanged. The part notes that come from the parts library keep its own words
|
|
25
|
+
- Components 2.0 lessons use egatari/components **v2.6.2** by default. `m-flow` 2.0.4: an edge between two boxes that are apart along one axis now ends at the middle of the target's facing side and leaves from the nearest point of the source's facing side; a fan-out from one box to a column of boxes no longer ends in the gaps between them. An edge whose `shift` pushes it off its side is reported (`[flow] … leaves the side of its box`, a layout warning in the quality check). `m-predict` 2.0.5: the `answer-step` description now says it must be 2 or more (after the count at step 1); the part itself is unchanged. No other part changes version
|
|
26
|
+
- Egatari Player 1.5.1 (the bundled player that files carry, `player` in the index and `deck-meta`): patch release. Only the script parser's warnings changed (`kit/core/narration-parse.mjs`): they say 「ステップ」 and 「ステップの指定」 instead of 「段階」, and an unusable `[k]` lists the valid step labels (「使えるステップの指定は [0]・[1]…・[concl]」). Playback, keys and the embed commands are unchanged
|
|
27
|
+
- Install steps (README “Get started”, “Using it with Claude Code” and “Using it with Codex”, docs/with-claude, both skills) now say to turn on auto-update right after installing: in Claude Code `/plugin` → Marketplaces → egatari → Enable auto-update (third-party marketplaces start with auto-update off); in Codex `npx egatari@0.6.x skills update` after each Studio release, because the skill's instructions and quality checks change with each release.
|
|
28
|
+
The editor's “Download the AI skill” hint (New… and, newly, Help) adds “Add it again when Studio is updated”
|
|
29
|
+
- Quality check, the build warnings and the fix request: the words that were kept with a narrower sense now follow the glossary too. A slide's key is 「スライドの id」 / “slide id” (for example 「スライドの id「…」が手書きの data-key で決まっている」); the `[0]` … `[concl]` at the start of a script line is 「ステップの指定」 / “step label”, with the valid ones listed on first use (「使えるステップの指定は [0] [1] [concl]」); 「アクセスの鍵」 → 「アクセスキー」; 原稿 meaning `deck.html` → 「スライド(deck.html)」; 「書き出し直す」 → 「元のアプリでエクスポートし直す」; 「TTS が読み」 → 「AI 音声が読み」 (“the AI voice reads it”), also in the stale-audio finding; the box around a figure label is 「ラベルの枠」 / “label frame”. The script parser's warnings say 「ステップ」 and 「ステップの指定」 instead of 「段階」, and the build refusals say 「パーツ」 and 「パーツライブラリ」 instead of 「部品」 and 「部品庫」. 秘密鍵, `data-mode="lecture"`, 古い形式の Office and the verb 「囲み」 (wrap the math in `\( … \)`) are kept
|
|
30
|
+
- AI instructions (the instruction pack in New…, `docs/authoring-with-llms*`, `docs/llm-parts/*`, the make and studio skills) and the fix, insert and outline requests use the same words as the findings: 段階 → ステップ, 段階の印 → ステップの指定 (English “step markers” → “step labels”), and コードの囲み → コードブロック, written 「灰色の枠(コードブロック)」 on first mention. The part notes that come from the parts library keep their own words (段階, 部品, 口述原稿) until components 2.7.0
|
|
31
|
+
- Glossary (`docs/terms.md`): two new rows, slide-id (スライドの id / Slide id) and step-label (ステップの指定 / Step label), which avoid 鍵, スライドの鍵 and ステップの鍵. The Japanese guides (`docs/reference.ja.md`, `docs/editor.ja.md`, `docs/distributing.ja.md`, `docs/contract.ja.md`) say 「スライドの id」 and 「スライドの id とステップ」 instead. New lessons start their script with 「# 台本:」 / “# Script:”. The terms lint also checks the AI instructions for 段階, 部品 and 口述原稿
|
|
32
|
+
- English guides (`docs/reference.md`, `docs/editor.md`, `docs/distributing.md`, `docs/contract.md`) say “slide id” (and “slide id and step”) instead of “slide key”, as the Japanese ones do; the spec's term is written “slide key (spec)”. The old anchor `#slide-keys` in the reference still works. The command-line messages of `render`, `npm run ids`, `tools/narration-json.mjs` and `egatari --help` / `egatari doctor` use the same words (ステップ, スライドの id, 台本, テンプレート, パーツ, Egatari ファイル, AI 音声), and the book's citation messages say 「引用キー」 / “citation key”
|
|
33
|
+
- Viewer: the Markup button shows whenever a lesson plays; with no book on screen its bar says highlights go in the book (表示 → 本) and not yet in the script, or that the lesson has no book.
|
|
34
|
+
- Viewer: the page's HTML is served with `Cache-Control: … no-transform`, so the CDN never rewrites it (Cloudflare Web Analytics cannot inject its beacon script).
|
|
35
|
+
- Viewer markup: a ruby segment is one unit. A selection inside a word with one reading (代表値) is stored as the whole word, painted and hidden in 暗記 together with its reading as one box; per-character readings stay per character. Older highlights ending inside such a word are widened once when the lesson opens, keeping their id, colour and date.
|
|
36
|
+
|
|
11
37
|
## [0.6.9] - 2026-11-11
|
|
12
38
|
|
|
13
39
|
### Added
|
|
@@ -1447,7 +1473,8 @@ First public release.
|
|
|
1447
1473
|
- 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
|
|
1448
1474
|
- Tests (`npm test`) and GitHub Actions running them on Node 22 and 24, plus a TTS dry-run through video export
|
|
1449
1475
|
|
|
1450
|
-
[Unreleased]: https://github.com/egatari/egatari-studio/compare/v0.6.
|
|
1476
|
+
[Unreleased]: https://github.com/egatari/egatari-studio/compare/v0.6.10...HEAD
|
|
1477
|
+
[0.6.10]: https://github.com/egatari/egatari-studio/compare/v0.6.9...v0.6.10
|
|
1451
1478
|
[0.6.9]: https://github.com/egatari/egatari-studio/compare/v0.6.8...v0.6.9
|
|
1452
1479
|
[0.6.8]: https://github.com/egatari/egatari-studio/compare/v0.6.7...v0.6.8
|
|
1453
1480
|
[0.6.7]: https://github.com/egatari/egatari-studio/compare/v0.6.6...v0.6.7
|
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
|
|---|---|
|