Giter Club home page Giter Club logo

thesis-helper's Introduction

thesis-helper

毕业论文小助手:一个翻译英文并将中文结果显示在侧边的PDF阅读器 。

2019.11.4下午,看英文论文,总是要在pdf阅读器和谷歌翻译之间来回折腾,好麻烦,想着能不能一个窗口解决问题,就有了下面这个程序。

效果图

效果图

微信群

二维码

技术栈

  • PyQt5 用于GUI的实现
  • pdfjs 用于解析PDF
  • 最新版谷歌翻译 用于翻译

使用方法

Windows

  1. 稳定下载地址,下载相应版本极速下载地址
  2. 解压缩 !!!此步骤务必保证解压后的文件夹在全英文路径下,中文路径会闪退
  3. 运行thesis-helper.exe
  4. pdf拖拽进来
  5. 选中要翻译的文本,然后侧边栏就有中文翻译结果了

Mac OS X

仍在构建中~敬请期待~

或者参考源码构建。

Linux

  1. 稳定下载地址,下载相应版本

  2. 进入刚刚下载的文件所在的目录,打开一个shell并输入

tar -xf thesis-helper-linux-v2.0.tar.xz
cd thesis-helper
./thesis-helper

源码构建

由于本项目还在快速增长期,从源码里直接构建,可以享用到最新的功能。需要拥有Python环境。

无Git环境

  1. 下载压缩包

  2. 解压缩

  3. 进入解压缩的目录并在这个目录下打开一个控制台

  4. 控制台里执行

    pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
    python thesis-helper.py
    
  5. pdf拖拽进来

  6. 选中要翻译的文本,然后侧边栏就有中文翻译结果了

有Git环境

  1. 命令行输入如下指令即可。
git clone [email protected]:do-something-for-fun/thesis-helper.git
cd thesis-helper
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
python thesis-helper
  1. pdf拖拽进来

  2. 选中要翻译的文本,然后侧边栏就有中文翻译结果了

致谢

感谢杨帅昊(QSCTech-Sange)、Jarvisss、Wye(Lucas-Wye)、dendenxu、qiqiph和ametake对thesis-helper做出的贡献(提交过 Issue 或者 PR)。

thesis-helper's People

Contributors

icmoon527 avatar jarvisss avatar muhualing avatar qsctech-sange avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

thesis-helper's Issues

PDF浏览器加载问题

最近使用出现谷歌浏览器打开本地pdf文献时候,无法打开,只显示一个PDF.js viewer,文献根本打不开。从插件管理里面查询到一个错误信息,希望作者能给解决一下,谢谢!
Uncaught ReferenceError: require is not defined
代码较长,截图显示一下:
image

Permission Error when dragging files in MacOS

安装完整,正常打开,拖拽文件进入显示栏无反应,命令行报错:
[12972:775:1105/211956.349852:ERROR:permission_manager_qt.cpp(82)] Not implemented reached in ProfileAdapter::PermissionType QtWebEngineCore::toQt(content::PermissionType)Unsupported permission type: 13

不知是否是我用法有问题。

QtWebEngineWidgets not found, Win10 python 3.6 64bit

PS E:\Software\PaperTools\thesis-helper> python .\thesis-helper.py Traceback (most recent call last):
File ".\thesis-helper.py", line 9, in
from PyQt5.QtWebEngineWidgets import QWebEngineView
ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidgets'
PS E:\Software\PaperTools\thesis-helper> python -V Python 3.6.3 :: Anaconda custom (64-bit)
PS E:\Software\PaperTools\thesis-helper> pip show pyqt5 Name: PyQt5
Version: 5.13.2
Summary: Python bindings for the Qt cross platform UI and application toolkit
Home-page: https://www.riverbankcomputing.com/software/pyqt/
Author: Riverbank Computing Limited
Author-email: [email protected]
License: GPL v3
Location: c:\software\anaconda3\lib\site-packages
Requires: PyQt5-sip
Required-by: PyQtWebEngine
PS E:\Software\PaperTools\thesis-helper>

execute error

Download the thesis-helper-windows-v2.1'
and the directory is C:\Users\12345\Downloads\Compressed\thesis-helper-windows-v2.1\thesis-helper
execute the .exe will show error

System: Windows
Traceback (most recent call last):
File "thesis-helper.py", line 233, in
File "thesis-helper.py", line 165, in init
File "thesisUtils\text_filter.py", line 11, in init
File "thesisUtils\text_filter.py", line 14, in __loadDictFromTxt
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Windows/system32/dictionary/words_alpha.txt'
[11980] Failed to execute script thesis-helper

翻译不出

试用了一下,发现翻译不出嘛,侧边栏什么也没有

image

请导出requirements.txt

采用 pip freeze > requirements.txt 来导出python依赖信息,不然各个版本不一致,无法运行成功

googletrans.compat模块不存问题以及修改建议

  • 出现问题:googletrans.compat模块不存在
  • 问题原因:通过pip install -r requirements.txt安装包文件,如果未指定版本,会默认安装最新版本。而googletrans此时(2020.6.16)已是3.0.0版本,里面googletrans.compat模块已移除。
  • 解决方案:googletrans包通过指定版本安装——pip install googletrans=2.4.0
  • 结论:建议修改requirements.txt文件,在里面加入包的版本号。

Feature #1: Manage Pdf

Idea from: winding(cc98)
image

What we want:
image

How to do:

  1. add a left sidebar which could be hidden
  2. one button to show all pdf at the current folder
  3. one button to show all pdf used in history

Little advice

I've developed a similar program for similar reasons.
However, the translation API blocks your IP address after several translation attempts.
This also happens when you use translate.googleapi.com or translate.google.cn.
Haven't tested for baidu translator.

My advice is, use your web browser to do the translation.
May end up with a better look right?
My try is here(using chrome): https://github.com/dendenxu/Chrome-Based-Thesis-Translator

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.