1
0
Files
lanyuanxiaoyao 6b4fcf2647 创建 lyxy-reader-html skill
- 新增 skill: lyxy-reader-html,用于解析 HTML 文件和 URL 网页内容
- 支持 URL 下载(pyppeteer → selenium → httpx → urllib 优先级回退)
- 支持 HTML 解析(trafilatura → domscribe → MarkItDown → html2text 优先级回退)
- 支持查询功能:全文提取、字数统计、行数统计、标题提取、章节提取、正则搜索
- 新增 spec: html-document-parsing
- 归档 change: create-lyxy-reader-html-skill
2026-03-08 02:02:03 +08:00

27 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## Why
当前已有 `lyxy-reader-office` skill 用于解析办公文档,但缺少对 HTML 网页内容的解析能力。用户需要从 URL 或本地 HTML 文件中提取内容并转换为 Markdown 格式,同时支持标题提取、内容搜索等查询功能。
## What Changes
- 创建新 skill `lyxy-reader-html`,目录结构参考 `lyxy-reader-office`
- 实现命令行工具 `scripts/parser.py`,接受 URL 或 HTML 文件作为输入
- URL 模式下按优先级尝试下载器pyppeteer → selenium → httpx → urllib
- HTML 解析按优先级尝试trafilatura → domscribe → MarkItDown → html2text
- 支持 HTML 预处理清理(移除 script/style/link 等标签和 URL 属性)
- 实现查询功能:全文输出、字数统计、行数统计、标题提取、章节提取、正则搜索
## Capabilities
### New Capabilities
- `html-document-parsing`: HTML 文档和 URL 内容解析能力,将 HTML 转换为 Markdown 并支持多种查询模式
### Modified Capabilities
(无)
## Impact
- 新增目录 `skills/lyxy-reader-html/`
- 新增 Python 脚本依赖trafilatura、domscribe、markitdown、html2text、httpx、pyppeteer、selenium、beautifulsoup4
- 与现有 skill 完全隔离,不影响其他功能