项目作者: MrMonk3y

项目描述 :
Translates LaTex Files with DeepL
高级语言: Python
项目地址: git://github.com/MrMonk3y/texTrans.git
创建时间: 2018-09-28T09:15:42Z
项目社区:https://github.com/MrMonk3y/texTrans

开源协议:

下载


texTrans

Translates LaTex Files with DeepL
Credits for the Python DeepL Wrapper “pydeepl” go to EmilioK97. The cool progress-bar comes from the tqdm developers.

This project is currently in its alpha state. It works but is still a mess. Sadly DeepL has a problem accepting longer texts with many hashes (used e.g. for newline and tabs). Therefor the translation is carried out line by line, which obviously takes some time.

Prerequisites

  1. pip install pydeepl
  2. pip install tqdm

Usage

  1. python textTrans.py -f <FROM> -t <TO> -i <input File>
  2. Example:
  3. python texTrans.py -f DE -t EN -i myfile.tex

Output will be created as input_trans.tex

ToDo

DeepL changed their API which causes problems sending the text

  • Fix pydeepl API or use something else

Disclaimer

Using this script could violate the ToS of DeepL. Therefore the purpose of this script is purely educational. Furthermore, the translation API can easily be switched to another API.