Skip to content

fix: 修复跨平台配置及完整解析结果输出 - #8

Merged
yangyouzai merged 2 commits into
mainfrom
fix/cross-platform-parser-output
Aug 4, 2026
Merged

yangyouzai merged 2 commits into
mainfrom
fix/cross-platform-parser-output

Conversation

@yangyouzai

Copy link
Copy Markdown
Collaborator
  • 补充 Bash、Fish、Windows PowerShell 与 CMD 的 API Key 和运行指引
  • 修复中文文件名在上传时被百分号编码的问题
  • 将 JSON 输出改为保存完整 API 响应,保留 code、message、data、任务元数据与解析结果
  • 明确加密或密码保护文件不受支持,并提示用户先解除加密
  • 将 README 中的账号 QPS 限制更新为 4
  • bump version 1.0.9 -> 1.0.10

- 补充 Bash、Fish、Windows PowerShell 与 CMD 的 API Key 和运行指引
- 修复中文文件名在上传时被百分号编码的问题
- 将 JSON 输出改为保存完整 API 响应,保留 code、message、data、任务元数据与解析结果
- 明确加密或密码保护文件不受支持,并提示用户先解除加密
- 将 README 中的账号 QPS 限制更新为 4
- bump version 1.0.9 -> 1.0.10
Copilot AI lite review requested due to automatic review settings August 4, 2026 05:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

该 PR 聚焦于提升 SoMark document parser 的跨平台可用性与输出可追溯性:补充不同终端/系统的 API Key 配置指引、修复中文文件名上传时被编码的问题,并将 JSON 输出调整为保存完整 API 响应,以便保留任务元数据与解析结果。

Changes:

  • 文档补齐 Bash/Zsh、Fish、Windows PowerShell 与 CMD 的环境变量与运行示例,并更新账号 QPS 为 4。
  • 提交任务时调整 multipart 表单字段处理方式,避免中文文件名被百分号编码。
  • JSON 输出改为写出完整 API 响应(code/message/data),并相应调整解析结果与元数据提取逻辑;版本号 bump 至 1.0.10。

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
skills/somark-document-parser/somark_parser.py 调整 multipart 上传与轮询返回值结构;JSON 输出改为保存完整 API 响应,并更新元数据/outputs 抽取方式与 CLI 提示
skills/somark-document-parser/SKILL.md 增加分 shell 的环境变量/运行指引,更新 QPS 限制说明,并明确加密文件不支持
skills/somark-document-parser/_meta.json 版本号从 1.0.9 升级到 1.0.10
README.md 补充多终端环境变量示例,更新 QPS 为 4
README.zh-CN.md 补充多终端环境变量示例,更新 QPS 为 4

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- 统一 JSON 输出存在性判断,支持空对象结果
- 校验上传文件名中的 CR/LF 字符

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Suppressed comments (1)

skills/somark-document-parser/somark_parser.py:223

  • aiohttp.FormData(quote_fields=False) may not be available in older aiohttp versions (it would raise TypeError: __init__() got an unexpected keyword argument 'quote_fields'). Since the repo doesn’t pin aiohttp versions and other skills still call aiohttp.FormData() (e.g. skills/contract-reviewer/contract_reviewer.py:142), consider making this backward-compatible (and then reusing the same approach across the other async skills to keep upload filename behavior consistent).
    data = aiohttp.FormData(quote_fields=False)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Suppressed comments (1)

skills/somark-document-parser/somark_parser.py:402

  • 这里新增的 API Key 设置提示(4 行)是英文输出,但仓库约定/现有脚本的 CLI 输出均为中文(例如 skills/contract-reviewer/contract_reviewer.py:208-210 仅输出中文错误提示)。建议将这些提示也改为中文,以保持一致性并便于中文用户理解。
        print('macOS/Linux (Bash/Zsh): export SOMARK_API_KEY="your_key_here"')
        print('Linux (Fish):           set -x SOMARK_API_KEY "your_key_here"')
        print('Windows PowerShell:     $env:SOMARK_API_KEY = "your_key_here"')
        print('Windows CMD:            set "SOMARK_API_KEY=your_key_here"')

@yangyouzai
yangyouzai requested a review from Soul-Code August 4, 2026 05:53
@yangyouzai
yangyouzai merged commit 622a1e0 into main Aug 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants