感谢以下三个仓库给我提供的帮助:
- English-Document-translation-software提供的鼠标事件捕获思路
- 百度翻译 API 破解 提供的翻译帮助(暂时不可用)
- pdf.js 的pdf浏览支持
软件使用的第三方库:PyExecjs, OCRmyPDF, PyPDF2, PyQt5, PyQtWebEngine, requests
cd Translation
# Python Preparation
virtualenv venv
source venv/bin/activate
# Install translation and other dependencies
pip install -e .
cd translation
python main.py
- 划词/句翻译 [√]
- 从文件导入 PDF [√]
- 拉拽分割线调节布局 [√]
- 简单的调节字号大小 [√]
- 简单的翻译记录(每个PDF独立)[√]
- 简单的单词记录 (所有PDF共享) [√]
- 备份当前文件 & OCR (in place) 文字层覆盖[√]
- 重构代码逻辑
- 重命名各变量以增加代码易读性
- 完善以上简单功能
- 美化界面