Add plugin OCR 翻译 v1.0.0#194
Open
MermaidFAR wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new OCR translation plugin for ZTools, featuring a Vue 3 frontend and a Python-based local OCR server using RapidOCR. The plugin supports various cloud providers and a local engine with pre-processing capabilities. Feedback focused on improving the robustness of the Python server's header parsing, preventing UI blocking by using asynchronous file operations in the Electron preload script, and enhancing type safety by enabling strict mode in the TypeScript configuration.
| return | ||
|
|
||
| try: | ||
| content_length = int(self.headers.get("Content-Length", "0")) |
There was a problem hiding this comment.
| readImageAsDataUrl(file) { | ||
| const ext = path.extname(file).slice(1).toLowerCase() | ||
| const mimeType = imageMimeTypes[ext] || 'application/octet-stream' | ||
| const base64 = fs.readFileSync(file).toString('base64') |
Comment on lines
+14
to
+15
| "strict": false, | ||
| "noImplicitAny": false, |
Author
|
Contributor
Author
|
好的感谢,我这就修复本地RapidOCR封装后没考虑mac环境,
|
- feat: OCR 翻译插件 v1.0.0 初始版本,支持多引擎图片文字识别 - fix: 修复 macOS onnxruntime 兼容性,移除 Python 一键安装,纯内置 RapidOCR 运行时,新增 Logo
- feat: OCR 翻译插件 v1.0.0 初始版本,支持多引擎图片文字识别 - fix: 修复 macOS onnxruntime 兼容性,移除 Python 一键安装,纯内置 RapidOCR 运行时,新增 Logo - fix: 修复 macOS/Linux 构建脚本,使用真实 OCR 服务代码
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

插件信息
本次变更
截图 / 演示
自检清单
plugins/ocr-new/目录此 PR 由 ztools-plugin-cli 自动管理:每次
ztools publish在分支上追加一个 commit,PR 链接保持不变。