Repository navigation
Releases
v0.5.11
Send a page to a chat app: am export
Discord, Telegram, Slack and WeChat show an .html file as source. am export turns a rendered page into files they show (QingYunA#350, QingYunA#354):
am export page.html --pdf page.pdf # A4, the page's own print rules
am export page.html --png out/ # out/page-1.png, out/page-2.png ...--pngrenders at 1200 CSS px wide and 2x, hides the toolbar, the reply and remark controls and the new-version notice, and cuts the page into slices no taller than 1800 CSS px. A cut falls in a gap between panels.- Exporting into the same folder again removes the
<page-name>-<n>.pngslices it did not write this time, so a shorter page leaves no old slices behind. Other files stay. A slice that is the input page, or that cannot be removed, is left in place and reported (QingYunA#362, QingYunA#363). - It needs Chrome, Chromium or Edge (
AM_CHROMEsets the path) and Node.js 22 or later.
Sort and filter a table
Write {table sort} right after a Markdown table, and the reader clicks a header to sort it. {table filter} adds a text filter over every cell; {table sort filter} gives both (QingYunA#357, QingYunA#365).
- Columns of numbers,
1,200,$900,12%or ISO dates sort by value, including integers larger than 2^53. Other columns sort as text. - The controls work from the keyboard, are hidden in print and in PDF/PNG export, and do not appear without JavaScript. A table without the attribute stays static.
- A
<script>in anhtmlorsvgblock cannot run under the page's Content-Security-Policy.am rendernow warns about it, with the draft line.
Video narration from your own audio files
am video draft.md --audio-map lines.json takes the narration from audio files you already have, with no speech server: the JSON maps each narration line to a file, {"First the client sends SYN.": "audio/01.mp3"} (QingYunA#356, QingYunA#366).
- Relative paths start at the map file's folder. A narration line without a key, or a missing file, stops the render and names it.
- 16-bit PCM WAV works as is; other WAV encodings and other formats need ffmpeg. Clips get the same silence trimming and speech cache as
--voice local, and the cache notices a changed file. --audio-mapcannot be combined with an explicit--voice. A command-line TTS source (QingYunA#356) is still to come.
Fewer crossings in flow diagrams, and a warning for the rest
flowanderdiagrams no longer draw a crossing that swapping two neighbouring nodes removes. Before, two edges that left one node kept the order of the draft and could cross (QingYunA#369).- When a
flowedge still runs through another node or another edge's label,am renderwarns with the draft line and a way out: the other direction when it draws the diagram clean (```flow TB), otherwise a split into an overview and a detail diagram. The page is still written (QingYunA#378). - The check follows the curve the page draws, not the layout points, so it matches what the reader sees (QingYunA#382, QingYunA#384).
Other changes
- Claude Code plugin: the plugin no longer ships with a
node_modulesfolder, so it is no longer turned off in a Claude Code desktop SSH session ("has a symbolic link, node_modules/.bin/esbuild"). Runclaude plugin update answer-me-with-html@answer-me-with-html(QingYunA#361, QingYunA#368). am serve: a page opened over http keeps its answers, comments and remarks on the server, so a phone that discards a background tab no longer loses them (QingYunA#322, QingYunA#343).- Themes: every installed theme appears in the page's theme picker, not only the default one (QingYunA#348, QingYunA#353).
- flow: a literal
\nin a node or edge label breaks the line, as agents used to Mermaid write it (QingYunA#347, QingYunA#352). - File names: page and draft files are named with ASCII letters and digits only, at most 24 characters, so a ctrl-click in Windows Terminal or a wrapping TUI opens the whole path. A title with no ASCII gives
page-<time>.html, so a draft can name its file withfile: tcp-handshakein the front matter (QingYunA#344, QingYunA#351, QingYunA#379, QingYunA#383). - Korean: Korean pages break lines between words, not between syllables. A status badge with a long note wraps beside its icon instead of widening the table (QingYunA#355).
- Skill: commands use
${CLAUDE_SKILL_DIR}again, and other hosts are told to replace it with the skill's directory, which fixesCannot find module '/scripts/am.mjs'in opencode (QingYunA#326, QingYunA#327). - Dependencies: dagre 3.1.3 and marked 18.1.2 (QingYunA#376, QingYunA#377).
- Docs: INSTALL.md says there is no npm package and that
-a '*'reports agents without global skills as failed, which is expected (QingYunA#345). The reference says an automatic panel ID can name another panel after a new render, so give panels letters befoream patch --panel B(QingYunA#346). SKILL.md says the ask count and word limits are advice; the CLI checks only 2 to 6 options (QingYunA#358, QingYunA#360).
Full list: QingYunA#327, QingYunA#343, QingYunA#345, QingYunA#346, QingYunA#351, QingYunA#352, QingYunA#353, QingYunA#354, QingYunA#355, QingYunA#359, QingYunA#360, QingYunA#363, QingYunA#365, QingYunA#366, QingYunA#367, QingYunA#368.
把页面发到聊天工具:am export
Discord、Telegram、Slack 和微信会把 .html 文件显示成源码。am export 把渲染好的页面转成它们能直接显示的文件(QingYunA#350、QingYunA#354):
am export page.html --pdf page.pdf # A4,按页面自己的打印样式
am export page.html --png out/ # out/page-1.png、out/page-2.png ……--png按 1200 CSS px 宽、2 倍分辨率渲染,隐藏工具栏、回复和标注控件以及新版本提示,把页面切成每张不超过 1800 CSS px 高的图。切口落在面板之间的空隙里。- 再次导出到同一个目录时,会删掉这次没有重新写入的
<页面名>-<n>.png切片,所以页面变短后不会留下旧图。其他文件不动。如果某个切片就是输入的页面,或者删不掉,就保留原样并给出提示(QingYunA#362、QingYunA#363)。 - 需要 Chrome、Chromium 或 Edge(用
AM_CHROME指定路径),以及 Node.js 22 或更高版本。
表格排序和筛选
在 Markdown 表格后面紧接着写 {table sort},读者点表头就能排序。{table filter} 加一个对所有单元格的文字筛选框;{table sort filter} 两个都要(QingYunA#357、QingYunA#365)。
- 数字、
1,200、$900、12%或 ISO 日期组成的列按数值排序,超过 2^53 的整数也准确。其他列按文字排序。 - 控件可以用键盘操作,打印和 PDF/PNG 导出时隐藏,没有 JavaScript 时不出现。没写这个属性的表格保持静态。
html或svg块里的<script>在页面的 Content-Security-Policy 下无法运行,am render现在会给出警告,并指出草稿里的行号。
用现成的音频文件做视频旁白
am video draft.md --audio-map lines.json 直接用你已有的音频文件做旁白,不需要语音服务:JSON 里把每行旁白对应到一个文件,例如 {"First the client sends SYN.": "audio/01.mp3"}(QingYunA#356、QingYunA#366)。
- 相对路径从映射文件所在的目录算起。某行旁白没有对应的键、或者文件不存在时,渲染会停下并指出是哪一行。
- 16-bit PCM WAV 可以直接用,其他 WAV 编码和其他格式需要 ffmpeg。音频和
--voice local一样会裁掉首尾静音、使用语音缓存,文件改动后缓存会重新读取。 --audio-map不能和显式的--voice同时使用。命令行 TTS(QingYunA#356)还没做。
flow 图交叉更少,剩下的会给出提示
flow和er图里,交换两个相邻节点就能消除的交叉不会再画出来。以前从同一个节点出发的两条连线按草稿顺序排列,可能互相交叉(QingYunA#369)。flow的连线仍然穿过别的节点或别的连线标签时,am render会带上草稿行号给出提示和解决办法:换个方向能画干净时建议换方向(```flow TB),否则建议拆成总览图和细节图。页面照常生成(QingYunA#378)。- 检查按页面实际画出的曲线进行,而不是按布局给出的折点,所以和读者看到的一致(QingYunA#382、QingYunA#384)。
其他改动
- Claude Code 插件: 插件里不再带
node_modules目录,所以在 Claude Code 桌面版的 SSH 会话里不会再被关掉("has a symbolic link, node_modules/.bin/esbuild")。执行claude plugin update answer-me-with-html@answer-me-with-html即可(QingYunA#361、QingYunA#368)。 am serve: 通过 http 打开的页面,回答、评论和标注保存在服务端,手机回收后台标签页后也不会丢(QingYunA#322、QingYunA#343)。- 主题: 页面的主题切换器里会列出所有已安装的主题,不只是默认主题(QingYunA#348、QingYunA#353)。
- flow: 节点或连线标签里的
\n会换行,按 Mermaid 习惯写的草稿可以直接用(QingYunA#347、QingYunA#352)。 - 文件名: 页面和草稿文件名只用 ASCII 字母和数字,最长 24 个字符,在 Windows Terminal 里 ctrl+点击、或者在会自动折行的 TUI 里点击,都能打开完整路径。没有 ASCII 字符的标题生成
page-<时间>.html,这时可以在草稿 frontmatter 里写file: tcp-handshake指定文件名(QingYunA#344、QingYunA#351、QingYunA#379、QingYunA#383)。 - 韩文: 韩文页面在词与词之间换行,不再把一个词从音节中间拆开。带长备注的状态标记会在图标旁边换行,不再把表格撑宽(QingYunA#355)。
- Skill: 命令里重新使用
${CLAUDE_SKILL_DIR},并告诉其他宿主把它换成 skill 所在的目录,修复了 opencode 里的Cannot find module '/scripts/am.mjs'(QingYunA#326、QingYunA#327)。 - 依赖: dagre 3.1.3、marked 18.1.2(QingYunA#376、QingYunA#377)。
- 文档: INSTALL.md 说明没有 npm 包,并说明用
-a '*'时不支持全局 skill 的 agent 会显示安装失败,这是正常的(QingYunA#345)。参考文档说明重新渲染后自动编号的面板字母可能指向另一个面板,所以用am patch --panel B之前先给面板写上字母(QingYunA#346)。SKILL.md 说明提问数量和字数限制只是建议,CLI 只检查每个提问 2 到 6 个选项(QingYunA#358、QingYunA#360)。
v0.5.10
Write a component as a ::: block
A component written the way VitePress and Docusaurus write an admonition now renders exactly like the fenced block, instead of the error 0.5.9 reported (QingYunA#341):
:::callout ok Done
It works.
:::is the same as
```callout ok Done
It works.
```- Only a component name counts:
:::note, a bare:::, and:::inside a code block stay text. - The block ends at a line of at least as many colons as its opener, so a block that opens with
::::can hold a:::line. - An opener with no closing line is the same error as an unclosed ``` block.
- The docs still teach the ``` form;
:::is accepted so a draft written from habit renders the first time.
Full list: QingYunA#341.
元件也可以寫成 ::: 塊
按 VitePress、Docusaurus 提示框的寫法寫的元件,現在和 ``` 程式碼塊寫法渲染結果完全相同,不再像 0.5.9 那樣報錯(QingYunA#341):
:::callout ok Done
It works.
:::等同於
```callout ok Done
It works.
```- 只有元件名才算:
:::note、單獨的:::,以及程式碼塊裡的:::照舊是文字。 - 塊在冒號數不少於開頭的那一行結束,所以用
::::開頭的塊裡可以寫:::行。 - 有開頭沒有結尾,和 ``` 沒閉合報同一個錯。
- 檔案仍然教 ``` 寫法;接受
:::是為了讓按習慣寫的草稿一次就能渲染成功。