We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
利用 OpenAI API 打造的命令行工具,支持多种格式文件的翻译,包括 .txt、.pdf、.docx、.md、.mobi 和 .epub。 轻松快捷地翻译您的文本文件,让语言不再成为阻碍。
python easy_translator.py filename [--show] [--tlist] [--azure] [--test]
python translate_all.py
请在.md文档中没有结束标点符号的位置添加英文格式的句号.
filename: 指定要翻译的文件名,支持 txt、pdf、docx、epub、mobi 格式
filename
--show: 显示文本翻译过程
--show
--tlist: 使用译名表
--tlist
--azure: 使用 Azure 调用 OpenAI API
--azure
--test: 用于测试翻译效果,翻译三段文字,通常用于调试程序
--test
translate_all.py:使用脚本 translate_all.py 批量翻译文本
translate_all.py
首先,请确保文件名的格式为 01_filea.txt, 02_fileb.txt 等,在每个文件名前添加排序前缀
其次,请将您想要翻译的文本放置在 book 目录中,如果需要,可以在源代码中修改此目录
最后,请注意 Linux 和 Windows 处理事务的方式不同,为了确保正确执行,请根据您的操作系统进入源代码,并取消或注释掉必要部分
python easy_translator.py ./book/profile.txt
python easy_translator.py ./book/profile.txt --azure
python easy_translator.py ./book/profile.pdf --show
python easy_translator.py ./book/profile.pdf --azure --show
python easy_translator.py ./book/profile.mobi --show --tlist
python easy_translator.py ./book/profile.mobi --show --tlist --azure
python easy_translator.py ./book/profile.epub --show --tlist --test
python easy_translator.py ./book/profile.epub --show --tlist --azure --test
仓库:EasyTranslator 领英:Linkedin Github:Github
The text was updated successfully, but these errors were encountered:
No branches or pull requests
📑 介绍
利用 OpenAI API 打造的命令行工具,支持多种格式文件的翻译,包括 .txt、.pdf、.docx、.md、.mobi 和 .epub。
轻松快捷地翻译您的文本文件,让语言不再成为阻碍。
🏃 使用方法
👏 说明
filename
: 指定要翻译的文件名,支持 txt、pdf、docx、epub、mobi 格式--show
: 显示文本翻译过程--tlist
: 使用译名表--azure
: 使用 Azure 调用 OpenAI API--test
: 用于测试翻译效果,翻译三段文字,通常用于调试程序translate_all.py
:使用脚本 translate_all.py 批量翻译文本首先,请确保文件名的格式为 01_filea.txt, 02_fileb.txt 等,在每个文件名前添加排序前缀
其次,请将您想要翻译的文本放置在 book 目录中,如果需要,可以在源代码中修改此目录
最后,请注意 Linux 和 Windows 处理事务的方式不同,为了确保正确执行,请根据您的操作系统进入源代码,并取消或注释掉必要部分
📌 举例
📜 仓库及个人联系方式
仓库:EasyTranslator
领英:Linkedin
Github:Github
The text was updated successfully, but these errors were encountered: