- Windows
- python3
- pypiwin32
- selenium
- pynput
-
Install dependencies
pip install pypiwin32 selenium pynput
-
Edit source code line 11 to use your prefer browser
- default is my prefer browser: new Microsft Edge
-
Make sure your browser driver is in your environment path
- You can find more information from here
-
Run script
python realtime_pdf_translate.py
-
Copy pdf text and enjoy
- 用 selenium 打開 google 翻譯
- 按下 ctrl+c 時自動把 windows 剪貼簿裡的換行刪掉
- 把結果丟到 google 翻譯
期末報告要報 paper,對英文苦手來說真的是生不如死, 論文 pdf 複製的文字下來會一堆換行, 丟翻譯就會翻得很怪, 手動去掉換行實在太麻煩了, 就寫了這個來逃避現實中 QQ