@lincyaw/skills 1.0.0-rc.2 → 1.0.0-rc.21
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/README.md +1 -1
- package/package.json +2 -3
- package/skills/index.json +9 -18
- package/skills/presmium-animate/SKILL.md +4 -2
- package/skills/presmium-animate/gallery/algorithms/lecture.json +171 -115
- package/skills/presmium-animate/gallery/anime/scenes/kmeans-seeded.ts +2 -1
- package/skills/presmium-animate/gallery/craft/lecture.json +109 -57
- package/skills/presmium-animate/gallery/data/lecture.json +711 -175
- package/skills/presmium-animate/gallery/emphasis/lecture.json +321 -79
- package/skills/presmium-animate/gallery/films/lecture.json +36 -10
- package/skills/presmium-animate/gallery/lengths/lecture.json +23 -88
- package/skills/presmium-animate/gallery/math-ml/lecture.json +238 -159
- package/skills/presmium-animate/gallery/paths-3d/lecture.json +74 -64
- package/skills/presmium-animate/gallery/product/lecture.json +27 -3
- package/skills/presmium-animate/gallery/story/lecture.json +23 -90
- package/skills/presmium-animate/gallery/structure/lecture.json +104 -65
- package/skills/presmium-animate/gallery/text/lecture.json +115 -63
- package/skills/presmium-animate/gallery/timeline/lecture.json +106 -187
- package/skills/presmium-animate/gallery/timeline/scenes/bubble.ts +1 -1
- package/skills/presmium-animate/gallery/transitions/lecture.json +103 -52
- package/skills/presmium-animate/references/lengths.md +1 -1
- package/skills/presmium-animate/references/libraries.md +12 -6
- package/skills/presmium-animate/references/procedural.md +1 -0
- package/skills/presmium-animate/references/story.md +21 -7
- package/skills/presmium-animate/references/team.md +176 -0
- package/skills/presmium-author/SKILL.md +53 -19
- package/skills/presmium-author/references/assistance.md +3 -1
- package/skills/{presmium-present → presmium-author}/references/classroom.md +2 -2
- package/skills/presmium-author/references/document.md +1 -1
- package/skills/{presmium-present → presmium-author}/references/lecture.md +3 -1
- package/skills/presmium-author/references/publishing.md +161 -13
- package/skills/presmium-author/references/writing.md +170 -7
- package/src/cli.ts +4 -4
- package/src/install.ts +42 -5
- package/src/messages.ts +5 -5
- package/src/resources.ts +5 -4
- package/skills/presmium-present/SKILL.md +0 -35
- package/skills/presmium-present/references/delivery.md +0 -122
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: presmium-present
|
|
3
|
-
description: "Present and deliver a Presmium document, run classroom interaction, export or record it, and manage structured narration, real speech synthesis, subtitles and video playback from lecture.json production settings. 放映、上课、导出、录课、配音、字幕与讲授视频时使用。"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Presenting and producing a lecture
|
|
7
|
-
|
|
8
|
-
The editable document is `lecture.json`. Reading, slides, notebook and narrated lecture are derived forms. The **lecture** is narrated playback/video, not a second editable source. Keep document editing, compiled presentation and video production separate.
|
|
9
|
-
|
|
10
|
-
| Task | Read |
|
|
11
|
-
|---|---|
|
|
12
|
-
| Present, share or prepare offline outputs | [Delivery](references/delivery.md) |
|
|
13
|
-
| Classroom questions, quizzes and interaction | [Classroom](references/classroom.md) |
|
|
14
|
-
| Narration, voice, captions, recording or video | [Lecture production](references/lecture.md) |
|
|
15
|
-
|
|
16
|
-
Read the document and installed plugin capabilities before operating. Compilation can fail while the document remains saved; identify which source version a displayed snapshot represents. Never use stale audio or a stale generated result as the current document's result.
|
|
17
|
-
|
|
18
|
-
## Run only the requested output
|
|
19
|
-
|
|
20
|
-
```sh
|
|
21
|
-
presmium check lesson --json
|
|
22
|
-
presmium dev lesson
|
|
23
|
-
presmium build lesson --to slides
|
|
24
|
-
presmium build lesson --to lecture
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Renderers are configured in `metadata.renderers`; document plugins in `metadata.plugins` and document plugin settings in `metadata.presmium`. Operator credentials and provider endpoints remain outside the document. Read the installed renderer's public configuration for actual export support.
|
|
28
|
-
|
|
29
|
-
## Narration and playback rules
|
|
30
|
-
|
|
31
|
-
Steps explicitly reference structured narrations. Voice source and playback timing are owned by `production`. Resolve actual provider voices and supported parameters instead of inventing a catalogue. Changing a voice or script does not synthesize automatically. Explain the target/provider and scope before an explicit paid action.
|
|
32
|
-
|
|
33
|
-
Audition and formal playback share exclusive ownership: starting either stops or pauses the other. Seeking pauses first and reconstructs the selected step state. Cancel a task without deleting valid completed cache entries. Confirm saved/generated results against target document, request and version.
|
|
34
|
-
|
|
35
|
-
Check visible content, captions, step navigation and audio on the actual output. A successful compile alone does not prove playable speech or a working exporter.
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
> Editable source is `lecture.json`; renderer settings are under `metadata.renderers`, steps and narrations are explicit entities, and production timing/voices live only in `production`.
|
|
2
|
-
|
|
3
|
-
# Publishing, export and offline
|
|
4
|
-
|
|
5
|
-
Pick the build from what the teacher hands out. Run every command in the document folder. Before building, read the `metadata.renderers`: it lists the forms (`web`, `slides`, `notebook`, `lecture`) with their options, among them `base`, the URL path a form's site is served at (such as `/course/week1/`). When `base` is already set, the site is meant for that path: keep it and the hosting the teacher already uses.
|
|
6
|
-
|
|
7
|
-
`presmium build` writes into `dist/` (or the folder given with `--out`): one subfolder per form, such as `dist/web/`. Building is not deploying: copy the output to whatever host the teacher chooses.
|
|
8
|
-
|
|
9
|
-
## Give readers a web address
|
|
10
|
-
|
|
11
|
-
```sh
|
|
12
|
-
presmium build --to web
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
When only the web form is built and `base` is not set, `dist/web/` is a site for the root path `/`. To serve it on this computer when the project has no static server yet:
|
|
16
|
-
|
|
17
|
-
```sh
|
|
18
|
-
pnpm add -D sirv-cli
|
|
19
|
-
pnpm exec sirv dist/web --port 8080
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Open the address the terminal prints; the document's first page appears. Chapter pages have their own HTML files; a document with `metadata.renderers.web.layout: landing` combines all sections into one HTML page. A host needs no single-page-app fallback rule. Restart sirv after every rebuild: the file names change and a running sirv does not see the new ones.
|
|
23
|
-
|
|
24
|
-
**Student version.** Build it into its own folder so nothing from a full build is mixed in, and serve `dist-student/web` instead:
|
|
25
|
-
|
|
26
|
-
```sh
|
|
27
|
-
presmium build --to web --audience student --out dist-student
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
`--audience student` leaves out content marked for teachers only (markers such as `:audience: teacher` are explained in `presmium-author/references/publishing.md`, "Content for students"). Every file written is then scanned for sentences of the left-out content; a hit is reported as `presmium.audience` and means teacher content leaked into the student version through some output; trace and fix it in the source. Then open the student site and look for teacher narration, answers and media.
|
|
31
|
-
|
|
32
|
-
## Publish a themed workspace
|
|
33
|
-
|
|
34
|
-
A website created with `presmium new my-site --type site --theme course` has an independent homepage (`site/home.json`), a teaching document (`intro/lecture.json`), workspace configuration and `.github/workflows/pages.yml`. In that project, use `pnpm install`, `pnpm serve` for local preview, and `pnpm build` to write `dist/web/`.
|
|
35
|
-
|
|
36
|
-
Read the workspace's `site` before changing appearance or hosting. `site.theme` selects `course`, `docs` or `showcase`; `site.params` selects `accent` (`blue`, `teal`, `violet`, `amber`), `typography` (`reading`, `sans`), `contentWidth` (`comfortable`, `wide`), and optional `logo`/`logoAlt`. Preserve a configured `base`. A workspace applies one theme and brand across documents; a document can set `metadata.renderers.web.layout` to `article`, `landing` or `wide`. When building a document by itself, its `metadata.renderers.web` can also select `theme` and `params`.
|
|
37
|
-
|
|
38
|
-
`site.landing: { source: './site/home.json' }` selects an independent homepage; the same site page object may be written inline. Its own title, hero and sections introduce the site without using a teaching-document model. Homepage files are outside `documents`; teaching content still has `lecture.json` as its only editable source.
|
|
39
|
-
|
|
40
|
-
`site.landing: { template: './site/home.html' }` selects a free HTML/CSS/JavaScript homepage instead. Its local assets are built with Vite and its injected `script#presmium-site-data` holds only the public site title, base, language and document collection. Read the JSON and use the published document links. Refresh the page to rebuild a served template; there is no template hot update channel. Build again before deployment.
|
|
41
|
-
|
|
42
|
-
Existing string configuration `site.landing: welcome` intentionally uses all sections of `welcome/lecture.json` at the website root and keeps its document URL and normal chapter pagination. A document's own `metadata.renderers.web.layout: landing` combines its sections into one webpage at that document's address. `site.home` retains redirect behavior and cannot be set together with any form of `landing`.
|
|
43
|
-
|
|
44
|
-
Each translation chooses its own document layout; an omitted layout means `article`, while the workspace's theme stays shared. Restart `pnpm serve` after editing website settings in `presmium.workspace.yaml`, or run `pnpm build` again to export them.
|
|
45
|
-
|
|
46
|
-
For GitHub Pages, the generated workflow reads the deployment base path and publishes `dist/web/`. The repository's Pages source must be GitHub Actions. After deploying, open the real root address and an inner-page direct link, use search, and play the media. Ordinary file links can publish PowerPoint or Word downloads; choosing a theme does not add Office import or an Office previewer.
|
|
47
|
-
|
|
48
|
-
## Hand out the web page and the slides together
|
|
49
|
-
|
|
50
|
-
Built together, with `base` set on neither, the web page is at `/web/` and the slides at `/slides/` of one site. Serve the whole `dist/` folder:
|
|
51
|
-
|
|
52
|
-
```sh
|
|
53
|
-
presmium build --to web,slides
|
|
54
|
-
pnpm exec sirv dist --port 8080
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Open `<address>/web/` and `<address>/slides/`. The slides are one page (`index.html`); the slide and step are in the address's query (`?slide=<number>&step=<step>`), so a host needs no fallback rule here either.
|
|
58
|
-
|
|
59
|
-
When only the slides are built and `base` is not set, serve `dist/slides` instead (`pnpm exec sirv dist/slides --port 8080`). When the site already lives under a sub-path, serve the output at that path.
|
|
60
|
-
|
|
61
|
-
Each section heading on the web page links to the same place in the slides. When the two are deployed at different addresses, write the slides' real address in the document metadata, then check that a heading link lands on the right slide and step:
|
|
62
|
-
|
|
63
|
-
```json
|
|
64
|
-
{ "presmium.web": { "slidesUrl": "https://example.com/slides/" } }
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## Export a PDF, images or PowerPoint
|
|
68
|
-
|
|
69
|
-
Export prints the slides in Chromium. Set it up once in the project:
|
|
70
|
-
|
|
71
|
-
```sh
|
|
72
|
-
pnpm add -D @lincyaw/addon-publish playwright-chromium
|
|
73
|
-
pnpm exec playwright install chromium
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
and list `'@lincyaw/addon-publish'` in the document metadata's `plugins`. Then, in the document folder:
|
|
77
|
-
|
|
78
|
-
```sh
|
|
79
|
-
pnpm exec presmium-export --format pdf --output lecture.pdf
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
| Option | Does |
|
|
83
|
-
|---|---|
|
|
84
|
-
| `--format pdf` (default), `png`, `pptx` | PDF; PNG images, one per slide, into the `--output` folder; PowerPoint, each slide a picture, the narration as speaker notes, no links |
|
|
85
|
-
| `--output <file or folder>` | Where to write |
|
|
86
|
-
| `--with-clicks` | One page (or image) per step instead of per slide |
|
|
87
|
-
| `--range 1,3-5` | Only these slides |
|
|
88
|
-
| `--dark` | The dark theme |
|
|
89
|
-
| `--timeout <ms>` | How long a page may take to be ready (default 120000) |
|
|
90
|
-
| `--json` | Print the result as JSON |
|
|
91
|
-
|
|
92
|
-
`presmium-export` builds its own copy of the slides before printing, so the site's `base` does not affect it. A PDF export checks that every link the slides show is still a link in the PDF, and exits with code 1 when one was lost. Exit code 2 means a page was missing or the export timed out: read the error, then retry or raise `--timeout`. A file from a failed run is not a finished export.
|
|
93
|
-
|
|
94
|
-
In the studio, **Export** in the command bar makes the same PDFs, images and PowerPoint (and lecture videos) without the publish plugin listed; the files can be opened, played and downloaded there.
|
|
95
|
-
|
|
96
|
-
Afterwards, open the file and check the page count, missing pages, long code running off the page and the key links. Code that readers can run in the browser is printed with its recorded output.
|
|
97
|
-
|
|
98
|
-
## Give students a runnable notebook
|
|
99
|
-
|
|
100
|
-
```sh
|
|
101
|
-
presmium build --to notebook
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
This writes `dist/notebook/<name>.ipynb`, named after the entry file (`lecture.ipynb` for `lecture.json`), with images and other files in `media/` beside it; hand out the whole `dist/notebook/` folder. The kernel is `python3` unless the `metadata.renderers.notebook` says otherwise. Interactive components that a notebook cannot hold become a static form; the build report lists them. To link them to the online version, set the web address:
|
|
105
|
-
|
|
106
|
-
```json
|
|
107
|
-
{ "notebook": { "kernel": "python3", "webUrl": "https://example.com/course/" } }
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Open the notebook in Jupyter and check that images show and code cells run.
|
|
111
|
-
|
|
112
|
-
## Prepare an offline class
|
|
113
|
-
|
|
114
|
-
A built web site keeps each document's pages and search in a separate browser cache after that document is opened. The code runtimes (what runs code in the browser) are larger and fetched only the first time code runs. So, while still online:
|
|
115
|
-
|
|
116
|
-
1. Open every document you will teach from at its exact deployed address, in the browser you will teach with, and wait until each page has loaded.
|
|
117
|
-
2. Run each piece of code the class uses once, or, with the publish plugin listed, click **Save for offline use** in the toolbar, which fetches the runtimes in advance. The publish plugin also copies remote images into the document at build time, so they show offline.
|
|
118
|
-
3. Disconnect the network and rehearse in the same browser at the same address: moving through slides, search, media, running code.
|
|
119
|
-
|
|
120
|
-
Remote Jupyter, the classroom server and AI models still need the network. When the class must be fully offline, prepare recorded outputs or a runtime that works locally.
|
|
121
|
-
|
|
122
|
-
`metadata.presmium["presmium.publish"].offline = false` in the document metadata turns the offline cache off; check whether it is set. Rehearse again after the site's address changes or after a rebuild: "it was opened before" does not prove this build's files are all cached.
|