File: README.md
Pot (派了个萌的翻译器)
🌈 一个跨平台的划词翻译软件 (QQ 频道)
多接口并行翻译 (支持接口)
多接口文字识别 (支持接口)
多接口语音合成 (支持接口)
导出到生词本 (支持接口)
外部调用 (详情)
支持插件系统 (插件系统)
支持所有 PC 平台 (Windows, macOS, Linux)
支持 Wayland (在 KDE、Gnome 以及 Hyprland 上测试)
多语言支持
翻译
- OpenAI
- 智谱 AI
- Gemini Pro
- Ollama (离线)
- 阿里翻译
- 百度翻译
- 彩云小译
- 腾讯翻译君
- 腾讯交互翻译
- 火山翻译
- 小牛翻译
- Bing
- Bing 词典
- DeepL
- 有道翻译
- 剑桥词典
- Yandex
- Lingva (插件)
- Tatoeba (插件)
- ECDICT (插件)
更多接口支持见 插件系统
文字识别
- 系统 OCR (离线)
- Windows.Media.OCR on Windows
- Apple Vision Framework on MacOS
- Tesseract OCR on Linux
- Tesseract.js (离线)
- 百度
- 腾讯
- 火山
- 迅飞
- 腾讯图片翻译
- 百度图片翻译
- Simple LaTeX
- OCRSpace (插件)
- Rapid (离线 插件)
- Paddle (离线 插件)
更多接口支持见 插件系统
语音合成
更多接口支持见 插件系统
生词本
更多接口支持见 插件系统
软件内置接口数量有限,但是您可以通过插件系统来扩展软件的功能。
插件安装
你可以在 Plugin List 查找你需要的插件,然后前往插件仓库下载插件。
pot 插件的扩展名为 .potext, 下载得到.potext文件之后, 在 偏好设置-服务设置-添加外部插件-安装外部插件 选择对应的 .potext 即可安装成功,添加到服务列表中即可像内置服务一样正常使用了。
故障排除
找不到指定的模块 (Windows)
出现类似这样的报错是因为系统缺少 C++库,前往这里安装即可解决问题。
不是有效的 Win32 应用程序 (Windows)
出现类似这样的报错说明你没有下载对应系统或者架构的插件,前往插件仓库下载正确的插件即可解决问题。
插件开发
在 Plugin List 中的 模板 章节提供了各种插件的开发模板,具体的开发文档请查看对应的模板仓库。
Windows
通过 Winget 安装
winget install Pylogmon.pot手动安装
在 Release 页面下载最新
exe安装包。- 64 位机器下载
pot_{version}_x64-setup.exe - 32 位机器下载
pot_{version}_x86-setup.exe - arm64 机器下载
pot_{version}_arm64-setup.exe
- 64 位机器下载
双击安装包进行安装。
故障排除
启动后没有界面,点击托盘图标没有反应
检查是否卸载/禁用了 WebView2,如果卸载/禁用了 WebView2,请手动安装 WebView2 或将其恢复。
如果是企业版系统不方便安装或无法安装 WebView2,请尝试在 Release 下载内置 WebView2 的版本
pot_{version}_{arch}_fix_webview2_runtime-setup.exe若问题仍然存在请尝试使用 Windows7 兼容模式启动。
MacOS
通过 Brew 安装
- 添加我们的 tap:
brew tap pot-app/homebrew-tap- 安装 pot:
brew install --cask pot- 更新 pot
brew upgrade --cask pot手动安装
- 从 Release 页面下载最新的
dmg安装包。(如果您使用的是 M1 芯片,请下载名为pot_{version}_aarch64.dmg的安装包,否则请下载名为pot_{version}_x64.dmg的安装包) - 双击下载的文件后将 pot 拖入 Applications 文件夹即可完成安装。
故障排除
由于开发者无法验证,“pot”无法打开。
点击 取消 按钮,然后去 设置 -> 隐私与安全性 页面,点击 仍要打开 按钮,然后在弹出窗口里点击 打开 按钮即可,以后打开 pot 就再也不会有任何弹窗告警了
如果在 隐私与安全性 中找不到以上选项,或启动时提示文件损坏。打开 Terminal.app,并输入以下命令,然后重启 pot 即可:
bashsudo xattr -d com.apple.quarantine /Applications/pot.app如果每次打开时都遇到辅助功能权限提示,或者无法进行划词翻译,请前往设置 -> 隐私与安全 -> 辅助功能,移除 “pot”,并重新添加 “pot”。
Linux
Debian/Ubuntu
从 Release 页面下载最新的对应架构的
deb安装包。使用
apt-get进行安装bashsudo apt-get install ./pot_{version}_amd64.deb
Arch/Manjaro
[!WARNING]
在最新版本的 Webkit2Gtk (2.42.0) 中,由于 Nvidia 专有驱动未完全实现 DMABUF,将导致无法启动和崩溃的情况发生。
请降级或在/etc/environment(或者其他设置环境变量的地方)中加入WEBKIT_DISABLE_DMABUF_RENDERER=1环境变量关闭 DMABUF 的使用。
- 在 AUR 查看
使用 AUR helper 安装:
yay -S pot-translation # 或 pot-translation-bin
# paru -S pot-translation # 或 pot-translation-bin- 如果你使用
archlinuxcn源,可以直接使用 pacman 安装
sudo pacman -S pot-translationFlatpak
[!WARNING]
Flatpak 版本缺失托盘图标。
Pot 提供了完整的 HTTP 接口,以便可以被其他软件调用。您可以通过向 127.0.0.1:port 发送 HTTP 请求来调用 pot,其中的port是 pot 监听的端口号,默认为60828,可以在软件设置中进行更改。
API 文档:
POST "/" => 翻译指定文本(body为需要翻译的文本),
GET "/config" => 打开设置,
POST "/translate" => 翻译指定文本(同"/"),
GET "/selection_translate" => 划词翻译,
GET "/input_translate" => 输入翻译,
GET "/ocr_recognize" => 截图OCR,
GET "/ocr_translate" => 截图翻译,
GET "/ocr_recognize?screenshot=false" => 截图OCR(不使用软件内截图),
GET "/ocr_translate?screenshot=false" => 截图翻译(不使用软件内截图),
GET "/ocr_recognize?screenshot=true" => 截图OCR,
GET "/ocr_translate?screenshot=true" => 截图翻译,示例:
调用划词翻译:
如果想要调用 pot 划词翻译,只需向
127.0.0.1:port发送请求即可。例如通过 curl 发送请求:
bashcurl "127.0.0.1:60828/selection_translate"
不使用软件内截图
这一功能可以让您在不使用软件内截图的情况下调用截图 OCR/截图翻译功能,这样您就可以使用您喜欢的截图工具来截图了,也可以解决在某些平台下 pot 自带的截图无法使用的问题。
调用流程
- 使用其他截图工具截图
- 将截图保存在
$CACHE/com.pot-app.desktop/pot_screenshot_cut.png - 向
127.0.0.1:port/ocr_recognize?screenshot=false发送请求即可调用成功
$CACHE为系统缓存目录,例如在 Windows 上为C:\Users\{用户名}\AppData\Local\com.pot-app.desktop\pot_screenshot_cut.png
示例
在 Linux 下调用 Flameshot 进行截图 OCR:
rm ~/.cache/com.pot-app.desktop/pot_screenshot_cut.png && flameshot gui -s -p ~/.cache/com.pot-app.desktop/pot_screenshot_cut.png && curl "127.0.0.1:60828/ocr_recognize?screenshot=false"现有用法 (快捷划词翻译)
SnipDo (Windows)
- 从 Microsoft Store 下载安装 SnipDo。
- 从 Release 下载 pot 的 SnipDo 扩展 (pot.pbar)
- 双击下载的扩展文件完成安装。
- 选中文字,可以看到弹出的 SnipDo 工具条,点击翻译按钮即可翻译。
PopClip (MacOS)
- 从 App Store 下载安装 PopClip
- 从 Release 下载 pot 的 PopClip 扩展 (pot.popclipextz)
- 双击下载的扩展文件完成安装。
- 在 PopClip 的扩展中启用 pot 扩展,选中文本即可点击翻译。
Starry (Linux)
Starry 目前仍处于开发阶段,因此您只能手动编译它。
Github: ccslykx/Starry
由于各大发行版对于 Wayland 的支持程度不同,所以 pot 本身没法做到特别完美的支持,这里可以提供一些常见问题的解决方案,通过合理的设置之后,pot 也可以在 Wayland 下完美运行。
快捷键无法使用
由于 Tauri 的快捷键方案并没有支持 Wayland,所以 pot 应用内的快捷键设置在 Wayland 下无法使用。 您可以设置系统快捷用 curl 发送请求来触发 pot,详见外部调用
截图无法使用
在一些纯 Wayland 桌面环境/窗口管理器(如 Hyprland)上,pot 内置的截图无法使用,这时可以通过使用其他截图工具代替,详见 不使用软件内截图
下面给出在 Hyprland 下的配置示例(通过 grim 和 slurp 实现截图):
bind = ALT, X, exec, grim -g "$(slurp)" ~/.cache/com.pot-app.desktop/pot_screenshot_cut.png && curl "127.0.0.1:60828/ocr_recognize?screenshot=false"
bind = ALT, C, exec, grim -g "$(slurp)" ~/.cache/com.pot-app.desktop/pot_screenshot_cut.png && curl "127.0.0.1:60828/ocr_translate?screenshot=false"其他桌面环境/窗口管理器也是类似的操作
划词翻译窗口跟随鼠标位置
由于目前 pot 在 Wayland 下还无法获取到正确的鼠标坐标,所以内部的实现无法工作。 对于某些桌面环境/窗口管理器,可以通过设置窗口规则来实现窗口跟随鼠标位置,这里以 Hyprland 为例:
windowrulev2 = float, class:(pot), title:(Translator|OCR|PopClip|Screenshot Translate) # Translation window floating
windowrulev2 = move cursor 0 0, class:(pot), title:(Translator|PopClip|Screenshot Translate) # Translation window follows the mouse position.手动编译
环境要求
Node.js >= 18.0.0
pnpm >= 8.5.0
Rust >= 1.80.0
开始编译
Clone 仓库
bashgit clone https://github.com/pot-app/pot-desktop.git安装依赖
bashcd pot-desktop pnpm install安装依赖(仅 Linux 需要)
bashsudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev patchelf libxdo-dev libxcb1 libxrandr2 libdbus-1-3开发调试
bashpnpm tauri dev # Run the app in development mode打包构建
bashpnpm tauri build # Build into installation package
- Bob 灵感来源
- bob-plugin-openai-translator OpenAI 接口参考
- @uiYzzi 实现思路
- @Lichenkass 维护 Deepin 应用商店中的 pot
- Tauri 好用的 GUI 框架
File: README_EN.md
Pot (A cute translator)
A cross-platform translator application (Telegram Group)
- Usage
- Features
- Supported Services
- Plugin System
- Installation
- External Calls
- Wayland Support
- Internationalization
- Contributors
- Thanks
| Translation by selection | Translate by input | External calls |
|---|---|---|
| Select text and press the shortcut to translate | Press shortcut to open translation window, translate by hitting Enter | More efficient workflow by integrating other apps, see External Calls |
| Clipboard Listening | Screenshot OCR | Screenshot Translation |
|---|---|---|
| Click the top left icon on any translation panel to start clipboard listening. Copied text will be translated automatically. | Press shortcut, select area to OCR | Press shortcut, select area to translate |
- Parallel translations with multiple services (Supported Services)
- OCR with multiple services (Supported Services)
- Text-to-Speech with multiple services (Supported Services)
- Export to vocabulary apps (Supported Services)
- External calls (External Calls)
- Plugin system (Plugin System)
- Support Windows, macOS and Linux
- Support Wayland (Tested on KDE, Gnome and Hyprland)
- Multi-language support
Translation
- OpenAI
- ChatGLM
- Gemini Pro
- Ollama (Offline)
- Ali Translate
- Baidu Translate
- Caiyun
- Tencent Transmart
- Tencent Interactive Translate
- Volcengine Translate
- NiuTrans
- Google Translate
- Bing Translate
- Bing Dictionary
- DeepL
- Youdao
- Cambridge Dictionary
- Yandex
- Lingva (Plugin)
- Tatoeba (Plugin)
- ECDICT (Plugin)
More Services see Plugin System
Text Recognize
- System OCR (Offline)
- Windows.Media.OCR on Windows
- Apple Vision Framework on MacOS
- Tesseract OCR on Linux
- Tesseract.js (Offline)
- Baidu
- Tencent
- Volcengine
- iflytek
- Tencent Image Translate
- Baidu Image Translate
- Simple LaTeX
- OCRSpace (Plugin)
- Rapid (Offline Plugin)
- Paddle (Offline Plugin)
More Services see Plugin System
Text-to-Speech
More Services see Plugin System
Collection
More Services see Plugin System
The built-in services are limited. But you can expand the app's functionality through the plugin system.
Install Plugin
You can find plugins you need in the Plugin List, and then go to the plugin repo to download it.
The file extension of pot plugin is .potext. After downloading the .potext file, go to Preferences - Service Settings - Add External Plugin - Install External Plugin to select the corresponding .potext to install it. It will then be added to the service list and can be used like a built-in service.
Troubleshooting
The specified module could not be found (Windows)
Errors like this occur because the system lacks C++ libraries,Go to here download and install it.
Not a valid Win32 application (Windows)
An error like this indicates that you did not download the plugin for the corresponding system or architecture. Go to the plugin repository and download the correct plugin to solve the problem.
Develop Plugin
The Template section in the Plugin List provides plugin development templates for various plugins. Please check the corresponding template repo for specific documentation.
Windows
Install via Winget
winget install Pylogmon.potInstall Manually
Download the installation package ending in
.exefrom the Latest Release page.- 64-bit machine download
pot_{version}_x64-setup.exe - 32-bit machine download
pot_{version}_x86-setup.exe - arm64 machine download
pot_{version}_arm64-setup.exe
- 64-bit machine download
Double click the downloaded file to install it.
故障排除
There is no interface after startup, and there is no response when clicking the tray icon.
Check if WebView2 is uninstalled/disabled, if so, install WebView2 manually or restore it.
If the enterprise edition system is inconvenient to install or cannot install WebView2, please try to download the fix WebView2 version
pot_{version} at [Release](https://github.com/pot-app/pot-desktop/releases/latest) _{arch}_fix_webview2_runtime-setup.exeIf the issue persists, please try starting in Windows 7 compatibility mode.
MacOS
Install via Brew
- Add our tap:
brew tap pot-app/homebrew-tap- Install pot:
brew install --cask pot- Upgrade pot
brew upgrade --cask potInstall Manually
- Download the installation package ending in
.dmgfrom the Latest Release page. (If you are using M1, please download the installation package namedpot_{version}_aarch64.dmg, otherwise download the installation package namedpot_{version}_x64.dmg) - Double click the downloaded file to install it.
Troubleshooting
"pot" can’t be opened because the developer cannot be verified.
Click the Cancel button, then go to the Settings -> Privacy and Security page, click the Still Open button, and then click the Open button in the pop-up window. After that, there will be no more pop-up warnings when opening pot.
If you cannot find the above options in Privacy & Security, or get error prompts such as broken files with Apple Silicon machines. Open Terminal.app and enter the following command (you may need to enter a password halfway through), then restart pot:
bashsudo xattr -d com.apple.quarantine /Applications/pot.appIf you encounter a permission prompt every time you open it, or if you cannot perform a shortcut translation, please go to Settings -> Privacy & Security -> Supporting Features to remove pot, and then re-add pot.
Linux
Debian/Ubuntu
We provide deb packages for Linux.
Please note that: There are two deb package, universal is based on glibc2.28 and openssl-1.1, If the regular deb package can't run on your machine due to dependency problems, please download the universal package, Due to its low version dependency, it can run on most systems.
Arch/Manjaro
[!WARNING]
In newer version of Webkit2Gtk (2.42.0), Because Nvidia Proprietary drives are not fully implemented DMABUF, it will cause failure to start and crash.
Please downgrade or add theWEBKIT_DISABLE_DMABUF_RENDERER=1environment variable to/etc/environment(or other places where environment variables are set) to turn off the use of DMABUF.
- View on AUR
Use aur helper:
yay -S pot-translation # or pot-translation-bin or pot-translation-git
# or
paru -S pot-translation # or pot-translation-bin or pot-translation-git- If you are using
archlinuxcn, you can install directly using pacman:
sudo pacman -S pot-translationFlatpak
[!WARNING]
The tray icon is missing in Flatpak version.
Pot provides a complete HTTP interface for integration with other software. You can call pot by sending HTTP requests to 127.0.0.1:port, where port is the listening port of pot, default to 60828, and can be changed in the app settings.
API Docs:
POST "/" => Translate given text (body is text to translate)
GET "/config" => Open settings
POST "/translate" => Translate given text (same as "/")
GET "/selection_translate" => Translate selected text
GET "/input_translate" => Open input translation
GET "/ocr_recognize" => Perform OCR on screenshot
GET "/ocr_translate" => Perform translation on screenshot
GET "/ocr_recognize?screenshot=false" => OCR without taking screenshot
GET "/ocr_translate?screenshot=false" => Translate screenshot without taking screenshot
GET "/ocr_recognize?screenshot=true" => OCR with screenshot
GET "/ocr_translate?screenshot=true" => Translate screenshotExample:
Call translation by selection:
To call pot's translation by selection, simply send a request to
127.0.0.1:port:E.g. using curl:
bashcurl "127.0.0.1:60828/selection_translate"
OCR without internal screenshot
This allows you to perform OCR/translation without using pot's internal screenshot, so you can use your own screenshot tools. It also solves the problem where pot's internal screenshot doesn't work on some platforms.
Workflow:
- Take screenshot using other tool
- Save screenshot to
$CACHE/com.pot-app.desktop/pot_screenshot_cut.png - Send request to
127.0.0.1:port/ocr_recognize?screenshot=falseto call
$CACHEis the system cache dir, e.g.C:\Users\{username}\AppData\Local\com.pot-app.desktop\pot_screenshot_cut.pngon Windows.
Example
OCR using Flameshot on Linux:
rm ~/.cache/com.pot-app.desktop/pot_screenshot_cut.png && flameshot gui -s -p ~/.cache/com.pot-app.desktop/pot_screenshot_cut.png && curl "127.0.0.1:60828/ocr_recognize?screenshot=false"Existing Usages (Quick selection translation)
SnipDo (Windows)
- Download and install SnipDo in the Microsoft Store
- Download the SnipDo extension of pot from the Latest Release (pot.pbar)
- Double click the downloaded file to install it.
- Selection some text, you can see the pot icon in the upper right corner of the selection, click the icon to translate.
PopClip (MacOS)
- Download and install PopClip in the App Store
- Download the PopClip extension of pot from the Latest Release (pot.popclipextz)
- Double click the downloaded file to install it.
- Enable the pot extension in PopClip settings, and then you can translate by selecting text.
Starry (Linux)
Starry is still in the development stage, so you can only compile him manually
Github: ccslykx/Starry
Due to the varying levels of support for Wayland among different distributions, pot itself cannot achieve perfect compatibility. However, here are some solutions to common issues that can be implemented through proper configuration, allowing pot to run flawlessly on Wayland.
Shortcut key cannot be used
Due to Tauri's lack of support for Wayland, the shortcut key scheme in the pot application cannot be used under Wayland.
You can set the system shortcut and send a request with curl to call pot, see External Calls for details
Screenshot doesn't work
In some pure Wayland desktop environments/window managers (such as Hyprland), the built-in screenshot feature of pot cannot be used. In this case, you can use other screenshot tools instead. For more details, please refer to the section Not Using Built-in Screenshot.
Below is a configuration example for Hyprland using grim and slurp to achieve screenshot functionality:
bind = ALT, X, exec, grim -g "$(slurp)" ~/.cache/com.pot-app.desktop/pot_screenshot_cut.png && curl "127.0.0.1:60828/ocr_recognize?screenshot=false"
bind = ALT, C, exec, grim -g "$(slurp)" ~/.cache/com.pot-app.desktop/pot_screenshot_cut.png && curl "127.0.0.1:60828/ocr_translate?screenshot=false"Other desktop environments/window managers also have similar operations.
The translation window follows the mouse position.
Due to the current inability of pot to obtain accurate mouse coordinates under Wayland, its internal implementation cannot function properly.
For certain desktop environments/window managers, it is possible to achieve window following mouse position by setting window rules. Here we take Hyprland as an example:
windowrulev2 = float, class:(pot), title:(Translator|OCR|PopClip|Screenshot Translate) # Translation window floating
windowrulev2 = move cursor 0 0, class:(pot), title:(Translator|PopClip|Screenshot Translate) # Translation window follows the mouse position.Manual compilation
Requirements
Node.js >= 18.0.0
pnpm >= 8.5.0
Rust >= 1.80.0
Start compilation
Clone the repository
bashgit clone https://github.com/pot-app/pot-desktop.gitInstall dependencies
bashcd pot-desktop pnpm installInstall dependencies(Only Linux)
bashsudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev patchelf libxdo-dev libxcb1 libxrandr2 libdbus-1-3Development (Optional)
bashpnpm tauri dev # Run the app in development modeBuild
bashpnpm tauri build # Build into installation package
- Bob Inspiration
- bob-plugin-openai-translator OpenAI API Reference
- @uiYzzi Implementation ideas
- @Lichenkass Maintaining the Deepin App Store.
- Tauri A user-friendly GUI framework.
File: README_KR.md
Pot (간편 번역기)
A cross-platform translator application (Telegram Group)
| 선택영역 자동번역 | 입력단어 번역 | 외부호출 |
|---|---|---|
| 문장을 선택하고 번역단축키를 누릅니다 | 번역창을 열고, 번역할 문장을 입력합니다 | 다른 프로그램과 연동하여 효율적으로 사용가능합니다, External Calls 참고 |
| 클립보드 자동인식 | 스크린샷 OCR언어인식 | 스크린샷 자동번역 |
|---|---|---|
| 클립보드 모니터링 옵션을 통해, 텍스트를 복사하면 자동으로 번역합니다 | 화면캡쳐를 통해 문자를 인식합니다 | 화면을 캡쳐하면 인식한 문장을 번역합니다 |
- 여러 번역 사이트를 사용한 동시번역 (상세 페이지)
- 문자인식 OCR (상세 페이지)
- 텍스트 음성 변환 (상세 페이지)
- 사전 앱에 내보내기 (상세 페이지)
- 외부호출 (External Calls)
- 플러그인 시스템 (Plugin System)
- 운영체제 지원 - Windows, macOS and Linux
- Wayland 지원 (Tested on KDE, Gnome and Hyprland)
- 다중언어 지원
번역
- OpenAI
- ChatGLM
- Gemini Pro
- Ollama (Offline)
- Ali Translate
- Baidu Translate
- Caiyun
- Tencent Transmart
- Tencent Interactive Translate
- Volcengine Translate
- NiuTrans
- Google Translate
- Bing Translate
- Bing Dictionary
- DeepL
- Youdao
- Cambridge Dictionary
- Yandex
- Lingva (Plugin)
- Tatoeba (Plugin)
- ECDICT (Plugin)
추가항목은 다음을 참고 Plugin System
문자인식
- System OCR (Offline)
- Windows.Media.OCR on Windows
- Apple Vision Framework on MacOS
- Tesseract OCR on Linux
- Tesseract.js (Offline)
- Baidu
- Tencent
- Volcengine
- iflytek
- Tencent Image Translate
- Baidu Image Translate
- Simple LaTeX
- OCRSpace (Plugin)
- Rapid (Offline Plugin)
- Paddle (Offline Plugin)
추가항목은 다음을 참고 Plugin System
문자-음성변환
추가항목은 다음을 참고 Plugin System
사전
추가항목은 다음을 참고 Plugin System
정해진 기본 설정항목 외에, -플러그인 시스템-을 통해 사용자가 원하는 기능을 추가할 수 있습니다.
-플러그인-의 설치
설치가능한 플러그인 항목은 다음을 참고하세요 Plugin List. 그리고 필요한 항목을 다운받으십시오.
플러그인의 확장자는 .potext 입니다. 다운받은 .potext 확장자 파일을 프로그램 설정메뉴 - 서비스 - Add External Plugin - Install External Plugin 메뉴에서 등록하여 설치합니다. 파일을 등록하면 해당 항목을 프로그램의 사용목록에 표시가 되어 사용이 가능해 집니다.
문제해결
특정모듈을 불러오지 못할 때 (Windows)
C++ 라이브러리가 없을 때 이러한 문제가 주로 발생합니다. 다음페이지를 방문하여 필요한 라이브러리를 설치합니다. 참고 페이지
유효하지 않은 Win32 프로그램 (Windows)
시스템 또는 프로그램과 호환되지 않는 플러그인을 다운받아 설치한 경우입니다. 플러그인에서 적절한 파일을 다운받았는지 확인하시고 재설치 하십시오.
-플러그인-의 개발
템플릿 Template 항목에서 다양한 항목을 플러그인들을 찾을 수 있습니다 Plugin List. 이 곳에서 필요한 문서를 참고하십시오.
Windows 윈도우
Winget 을 이용한 설치
winget install Pylogmon.pot수동 설치
최신버전 다운로드 페이지 Release에서
.exe파일을 다운받습니다.- 64-bit 버전 사용시,
pot_{version}_x64-setup.exe - 32-bit 버전 사용시,
pot_{version}_x86-setup.exe - arm64 버전 사용시,
pot_{version}_arm64-setup.exe
- 64-bit 버전 사용시,
더블클릭하여 설치를 합니다.
문제해결
설치 후 프로그램창이 보이지 않거나 오른쪽 하단 시스템 트레이 항목에 아이콘이 표시되지 않을 경우,
윈도우-브라우저에서 사용하는 WebView2 기능이 설치되지 않았거나 비활성화 된 경우 입니다. 이 때는 WebView2 를 설치하거나 기능을 재설정 하십시오.
회사/기업 사용자의 경우 WebView2 기능이 설치되지 않았거나 비활성화된 경우가 있습니다. 이 경우 다음을 설치하십시오. WebView2 version
pot_{version} at [Release](https://github.com/pot-app/pot-desktop/releases/latest) _{arch}_fix_webview2_runtime-setup.exe문제가 해결되지 않는 경우, Windows 7 compatibility mode에서 시도해 보십시오.
MacOS 맥OS
Brew를 통한 설치
- 탭에 추가:
brew tap pot-app/homebrew-tap- 설치:
brew install --cask pot- 업데이트:
brew upgrade --cask pot수동설치
- 최신버전 다운로드 페이지 Release에서
.dmg파일을 다운받습니다. (M1 사용자이면, 다음 파일명을 다운로드 합니다pot_{version}_aarch64.dmg, 기타 사용자는 다음 파일을 다운로드 합니다.pot_{version}_x64.dmg) - 더블클릭하여 설치를 합니다.
문제해결
"pot" 을 열 수 없는 경우는 개발자 인증이 되지 않아서 입니다.
취소 버튼을 누르고 설정 메뉴로 들어갑니다 -> 개인정보 및 보안 메뉴에서 설정을 합니다.
열기 버튼을 클릭한 다음 팝업 창에서 열기 버튼을 클릭합니다. 그 이후에는 포트를 열 때 더 이상 팝업 경고가 표시되지 않습니다.개인정보 및 보안에서 위의 옵션을 찾을 수 없거나 Apple Silicon 컴퓨터에서 파일 손상과 같은 오류 메시지가 표시되는 경우. Terminal.app을 열고 다음 명령을 입력한 다음(중간에 비밀번호를 입력해야 할 수도 있음), pot을 다시 시작합니다:
bashsudo xattr -d com.apple.quarantine /Applications/pot.app열 때마다 권한 프롬프트가 나타나거나 바로 가기 번역을 수행할 수 없는 경우 설정 -> 개인정보 및 보안 -> 지원 기능으로 이동하여 Pot을 제거한 다음 Pot을 다시 추가하세요..
Linux
Debian/Ubuntu 데비안/우분투
리눅스 환경을 위해 deb 파일이 제공됩니다
참고 : 두 가지 버전이 제공됩니다. glibc2.28기반의 universal과 openssl-1.1 버전입니다. 프로그램이 당신의 컴퓨터에서 정상적으로 실행되지 않는다면 dependency와 관련된 문제일 경우가 많습니다. universal버전을 사용하면 이전 버전의 dependency를 사용하여 실행하면 대부분 실행이 가능합니다.
Arch/Manjaro
[!WARNING]
In newer version of Webkit2Gtk (2.42.0), Because Nvidia Proprietary drives are not fully implemented DMABUF, it will cause failure to start and crash.
Please downgrade or add theWEBKIT_DISABLE_DMABUF_RENDERER=1environment variable to/etc/environment(or other places where environment variables are set) to turn off the use of DMABUF.
- View on AUR
Use aur helper:
yay -S pot-translation # or pot-translation-bin or pot-translation-git
# or
paru -S pot-translation # or pot-translation-bin or pot-translation-git- If you are using
archlinuxcn, you can install directly using pacman:
sudo pacman -S pot-translationFlatpak
[!WARNING]
시스템 트레이 아이콘이 Flatpak을 통해 설치하면 표시되지 않습니다.
Pot은 완벽한 HTTP 인터페이스를 제공합니다. 이를 통해 다른 프로그램과 연동해서 사용이 가능합니다. 타 프로그램은 HTTP requests를 127.0.0.1:port 주소로 보내어 활용할 수 있습니다. 기본 포트는 60828입니다. 이는 사용자 설정에서 변경이 가능합니다.
API 상세:
POST "/" => Translate given text (body is text to translate)
GET "/config" => Open settings
POST "/translate" => Translate given text (same as "/")
GET "/selection_translate" => Translate selected text
GET "/input_translate" => Open input translation
GET "/ocr_recognize" => Perform OCR on screenshot
GET "/ocr_translate" => Perform translation on screenshot
GET "/ocr_recognize?screenshot=false" => OCR without taking screenshot
GET "/ocr_translate?screenshot=false" => Translate screenshot without taking screenshot
GET "/ocr_recognize?screenshot=true" => OCR with screenshot
GET "/ocr_translate?screenshot=true" => Translate screenshot예제:
선택영역 자동번역:
"선택영역 자동번역"을 호출하려면 간단히
127.0.0.1:port에 호출요청을 합니다:E.g. curl 사용시:
bashcurl "127.0.0.1:60828/selection_translate"
자체스크린샷 미사용 OCR 기능
OCR 및 번역을 위해서 pot은 자체 스크린샷(화면캡쳐)기능을 사용하지 않을 수 있습니다. 자체 화면캡쳐 툴을 사용하면 특정환경에서 자체 스크린샷 기능이 정상적으로 동작하지 않는 것을 해결할 수 있습니다.
Workflow:
- 타 스크린샷 프로그램을 사용하여 화면을 캡쳐합니다
- 캡쳐한 화면을 다음 위치에 저장합니다.
$CACHE/com.pot-app.desktop/pot_screenshot_cut.png - 외부호출을 통해 번역요청을 요청합니다.
127.0.0.1:port/ocr_recognize?screenshot=false
$CACHE는 시스템 캐시 폴더입니다. e.g. 윈도우는 다음경로를 확인하세요C:\Users\{username}\AppData\Local\com.pot-app.desktop\pot_screenshot_cut.png.
예제
리눅스에서 Flameshot을 활용한 OCR:
rm ~/.cache/com.pot-app.desktop/pot_screenshot_cut.png && flameshot gui -s -p ~/.cache/com.pot-app.desktop/pot_screenshot_cut.png && curl "127.0.0.1:60828/ocr_recognize?screenshot=false"Existing Usages (Quick selection translation)
SnipDo (Windows)
- SnipDo를 Microsoft Store 에서 다운받아 설치합니다.
- DSnipDo 확장팩을 최신버전 다운 경로에서 Release (pot.pbar) 다운받습니다.
- 더블클릭하여 설치합니다.
- 특정단어를 선택하게 되면, 선택영역의 오른쪽 윗 부분에 번역아이콘이 보이게 됩니다. 클릭하여 번역을 진행합니다.
PopClip (MacOS)
- PopClip를 App Store 에서 다운받아 설치합니다.
- PopClip 확장팩을 최신버전 다운 경로에서 Release (pot.popclipextz) 다운받습니다.
- 더블클릭하여 설치합니다.
- PopClip settings에서 기능을 활성화 하면 선택영역의 번역을 할 수 있습니다.
Starry (Linux)
Starry는 아직 개발단계에 머물러 있습니다.따라서 사용자가 직업 컴파일해야 합니다.
Github: ccslykx/Starry
배포판마다 Wayland에 대한 지원 수준이 다르기 때문에 pot 자체로는 완벽한 호환성을 달성할 수 없습니다. 하지만 다음은 적절한 구성을 통해 구현할 수 있는 몇 가지 일반적인 문제에 대한 해결책으로, Wayland에서 pot을 완벽하게 실행할 수 있습니다.
단축키를 적용할 수 없을 때,
타우리Tauri는 웨이랜드Wayland를 지원하지 않기 때문에, pot의 단축키 기능은 웨이랜드Waylan에서 사용할 수 없습니다.
시스템 단축키를 설정하고 curl로 요청을 보내 팟을 호출할 수 있으며, 자세한 내용은External Calls 을 참조하세요.
단축키가 동작하지 않을 때,
일부 순수 웨이랜드Wayland 데스크톱 환경/창 관리자(예: 하이프랜드)에서는 pot의 기본 제공 스크린샷 기능을 사용할 수 없습니다. 이 경우 다른 스크린샷 도구를 대신 사용할 수 있습니다. 자세한 내용은 Not Using Built-in Screenshot 섹션을 참조하세요.
아래는 스크린샷 기능을 구현하기 위해 grim과 slurp를 사용하는 Hyprland의 구성 예시입니다:
bind = ALT, X, exec, grim -g "$(slurp)" ~/.cache/com.pot-app.desktop/pot_screenshot_cut.png && curl "127.0.0.1:60828/ocr_recognize?screenshot=false"
bind = ALT, C, exec, grim -g "$(slurp)" ~/.cache/com.pot-app.desktop/pot_screenshot_cut.png && curl "127.0.0.1:60828/ocr_translate?screenshot=false"다른 데스크톱 환경/창 관리자도 비슷한 작업을 수행합니다.
번역창은 마우스 좌표를 따라갑니다.
현재 웨이랜드Wayland에서 정확한 마우스 좌표를 얻을 수 없기 때문에 내부 구현이 제대로 작동하지 않습니다. 특정 데스크톱 환경/창 관리자의 경우 창 규칙을 설정하여 마우스 위치에 따른 창을 구현할 수 있습니다. 여기서는 하이프랜드Hyprland를 예로 들어보겠습니다:
windowrulev2 = float, class:(pot), title:(Translator|OCR|PopClip|Screenshot Translate) # Translation window floating
windowrulev2 = move cursor 0 0, class:(pot), title:(Translator|PopClip|Screenshot Translate) # Translation window follows the mouse position.사용자 컴파일
요구사항
Node.js >= 18.0.0
pnpm >= 8.5.0
Rust >= 1.80.0
컴파일 방법
repository을 복사합니다
bashgit clone https://github.com/pot-app/pot-desktop.gitdependencies를 설치합니다
bashcd pot-desktop pnpm install(Only Linux) dependencies를 설치합니다
bashsudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev patchelf libxdo-dev libxcb1 libxrandr2 libdbus-1-3개발모드 (Optional)
bashpnpm tauri dev # Run the app in development mode빌드
bashpnpm tauri build # Build into installation package
- Bob Inspiration
- bob-plugin-openai-translator OpenAI API Reference
- @uiYzzi Implementation ideas
- @Lichenkass Maintaining the Deepin App Store.
- Tauri A user-friendly GUI framework.