新增 / Added
- 支持 Kaze 浏览器:Openmd 扩展可在 Kaze 里加载使用(与 Chrome 使用同一个扩展文件夹);Kaze 缺少的可选接口(通知、右键菜单等)不再报错;弹出页显示最近一次保存结果。 / Added Kaze browser support: the Openmd extension can be loaded in Kaze (using the same extension folder as Chrome), missing optional APIs in Kaze (notifications, context menus, etc.) no longer cause errors, and the popup displays the latest save result.
- Kaze 运行时,Openmd 可通过 Kaze 自带的 MCP 接口读取已加载页面,作为网页与 X 的补充路线(设置环境变量
OPENMD_KAZE=0 可关闭);实测中文维基某页表格经 Kaze 读到 55 行(直接抓取 31 行),某 GitHub 页面约 2.8 万字(直接抓取 2,279 字)。 / While Kaze is running, Openmd can read already-loaded pages via Kaze's built-in MCP interface as an additional route for web pages and X (set OPENMD_KAZE=0 to disable); in testing, a Chinese Wikipedia page table yielded 55 rows via Kaze (vs. 31 via direct fetch) and a GitHub page yielded about 28,000 characters (vs. 2,279 via direct fetch).
- X 长帖可借助已登录的浏览器读取全文,接口约 1 秒返回。 / Long X posts can now be read in full via a signed-in browser, with the interface returning in about 1 second.
- 扫描件 OCR 模型改为按固定版本从 HuggingFace / hf-mirror / ModelScope 测速下载 GGUF 文件(支持断点续传与 SHA256 校验),再在本机通过
ollama create 创建,解决此前新用户执行 ollama pull 维护者自定义模型名必然失败的问题。 / Scanned-document OCR model setup now downloads pinned GGUF files from the fastest of HuggingFace, hf-mirror and ModelScope (with resume support and SHA256 verification) and creates the models locally via ollama create, replacing the previous ollama pull of a maintainer-defined model name that always failed for new users.
- 首次处理扫描件时会询问是否安装 OCR 模型(说明模型、体积与目录),命令行、PDF 右键菜单和图片右键菜单(PNG/JPG/JPEG/WebP/BMP)均支持,安装完成后继续处理当前文件;非交互调用只返回安装命令。 / On first use with a scanned document, Openmd now prompts to install the OCR model (showing the model, size, and directory) across the CLI, PDF context menu, and image context menu (PNG/JPG/JPEG/WebP/BMP), then continues processing the current file; non-interactive calls return only the install command.
- 扫描件版面检测支持 NVIDIA GPU(
auto | cpu | cuda,默认 auto);实测 RTX 4060 Laptop 单页耗时 14.5 秒,CPU 为 44.2 秒。 / Scanned-document layout detection now supports NVIDIA GPUs (auto | cpu | cuda, default auto); measured at 14.5 s per page on an RTX 4060 Laptop compared to 44.2 s on CPU.
改进 / Changed
- 扫描件不再因原文中正常的重复内容(表格行、页眉、公式编号)将整页标为“不完整”,仅在模型实际连续重复输出时标记;同一 12 页样本中,不完整页由 8/12 降至 0/12,中文 / 英文综合分由 33.01 / 31.93 升至 95.52 / 92.28,合成样本由 68.76 升至 85.20(扫描件中的表格 45.7 / 30.6 和公式 26.5 / 23.2 仍然偏弱)。 / Scanned pages are no longer marked "incomplete" for normal source repetition (table rows, headers, equation numbers) and are flagged only when the model actually loops consecutively; on the same 12-page sample, incomplete pages dropped from 8/12 to 0/12, Chinese / English composite scores rose from 33.01 / 31.93 to 95.52 / 92.28, and the synthetic sample rose from 68.76 to 85.20 (tables at 45.7 / 30.6 and formulas at 26.5 / 23.2 remain weak).
- 命令行与 MCP 对同一网页快照采用同一种转换并取表格更完整的结果(某测试页 MCP 原先仅输出 6 行表格,现与命令行一致为 57 行)。 / CLI and MCP now use the same conversion for the same web page snapshot and keep the result with more complete tables (on one test page, MCP previously output 6 table rows and now matches the CLI at 57 rows).
- Chrome 与 Kaze 同时安装 Openmd 扩展时两边均可使用;若某个浏览器在打开页面阶段失败,会自动切换另一个浏览器重试一次,无需手动设置。 / When the Openmd extension is installed in both Chrome and Kaze, both can be used; if one browser fails at opening a page, Openmd automatically retries once with the other without user configuration.
- B 站字幕接口偶尔返回空列表时最多再重试两次,仍无法获取时照旧改用语音识别。 / When Bilibili's subtitle API occasionally returns an empty list, Openmd now retries up to two more times before falling back to speech recognition as before.
修复 / Fixed
- 修复网址中直接包含未编码中文字符时部分入口保存失败的问题,所有入口现均可正常保存。 / Fixed URLs containing unencoded Chinese characters so they now save properly across all entry points.
- 安全修复:MCP 的
html_path 现仅接受真正的 .html/.htm/.mhtml/.xhtml 文件(检查文件内容并拒绝符号链接),网页内容无法再诱导其读取本机任意文件。 / Security: MCP's html_path now accepts only genuine .html/.htm/.mhtml/.xhtml files (verifying content and rejecting symlinks), preventing web content from inducing arbitrary local file reads.
- 修复在 Kaze 里点击扩展保存时会拉起 Chrome 的问题;后台桥接现仅在真正运行需要浏览器读取的路线时启动。 / Fixed clicking the extension to save in Kaze launching Chrome; the background bridge now starts only when a route that requires browser reading actually runs.
- 修复 Chrome 157 拒绝在屏幕外创建后台窗口导致经浏览器桥读取(B 站字幕、需登录的 X、小鹅通等)全部失败的问题,后台窗口现以最小化、不抢焦点的方式打开。 / Fixed Chrome 157 rejecting off-screen background window creation, which broke all browser-bridge reads (Bilibili subtitles, signed-in X, Xiaoe-tech, etc.); background windows now open minimized without stealing focus.
- 修复 Chrome 与 Kaze 同时安装 Openmd 扩展时两个浏览器互相顶掉与 Openmd 后台连接的问题。 / Fixed Chrome and Kaze disconnecting each other from the Openmd background connection when the extension is installed in both browsers.
更新 / Update
pip install -U openmd-cli
openmd browser-setup # 仅 Windows:更新后重跑,同步扩展 / Windows only: rerun to sync extension
下载 / Download
| 系统 / OS |
CLI(Python 3.10+) |
浏览器扩展 / Browser extension |
| Windows |
openmd_cli-0.3.1-py3-none-any.whl |
支持 / Supported:openmd-extension-0.3.1.zip,解压后在 chrome://extensions 开发者模式加载 / unzip and Load unpacked |
| macOS |
openmd_cli-0.3.1-py3-none-any.whl |
暂不支持浏览器扩展,CLI 可用 / Extension unavailable; CLI supported |
| Linux |
openmd_cli-0.3.1-py3-none-any.whl |
暂不支持浏览器扩展,CLI 可用 / Extension unavailable; CLI supported |