DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

Sanshui258 /

Sanshui258/dsh-hwp-translate

Verified

DSH plugin: translate HWP/HWPX (??) documents to Chinese with layout preserved, via Yeobaek HWP Translator

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@b1187ba3

dsh-hwp-translate

DSH 插件:把 .hwp / .hwpx(한글)文档翻成中文,保留表格、项目符号与缩进。

不需要任何 API Key:翻译由当前会话的模型完成,插件只负责本地抽取与写回。

三个工具

工具 作用 联网
hwp_extract(path, offset?, limit?) 抽取待翻段落(id + 原文) 否
hwp_apply(path, translations, out_dir?) 把 {id: 译文} 写回文档 否
hwp_translate(path, target?, out_dir?) 旧接口:让 exe 自己调 API(需自带 Key) 是

典型用法(模型自动完成)

用户:把 D:\资料\행정절차.hwpx 翻成中文

1. hwp_extract → 4 段韩文
2. 模型自己翻译成中文
3. hwp_apply({"1": "专业体验活动照片", ...}) → 输出 D:\资料\행정절차_zh.hwpx

分页:hwp_extract 返回 next_offset,用它继续取下一页; 写回后返回值里的 missing 是没交回的 id。

前置

  • Windows;
  • 翻译旧版 .hwp 还需要本机 한글(HWP)(写回走 COM);.hwpx 不需要;
  • 不需要 API Key、不需要另装 Yeobaek——翻译器随包分发(bin/HWP_Translator.exe,16.8 MB)。

安装

在 DSH 的插件安装界面安装,或:

dsh plugin --profile web add github:Sanshui258/dsh-hwp-translate

离线命令行(不经 DSH 也能用)

HWP_Translator.exe --file 文档.hwpx --extract-json segments.json
HWP_Translator.exe --file 文档.hwpx --apply-json translations.json --output-dir out

已知限制

  • 仅 Windows;.hwpx 纯 Python,.hwp 需要本机 한글;
  • 长文档要分页抽取(每页默认 50 段);
  • 旧接口 hwp_translate 仍需用户自己的 API Key,仅为兼容保留;
  • 许可证:本插件 MIT;随包翻译器为个人非商业使用许可。
—/ 5

No ratings yet

Verified DSH bundle

Commit b1187ba33d9a

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout