Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

希望能在zotero中选定不同的翻译服务 #18

Open
liuyun16 opened this issue Feb 11, 2025 · 3 comments
Open

希望能在zotero中选定不同的翻译服务 #18

liuyun16 opened this issue Feb 11, 2025 · 3 comments

Comments

@liuyun16
Copy link

liuyun16 commented Feb 11, 2025

非常好用,希望增强上述功能

@guaguastandup
Copy link
Owner

好的,感谢建议!过段时间会加上!在这之前可以用这个方法(较为)灵活切换翻译服务:

############ 配置 ############
pdf2zh = "pdf2zh"                        # 设置pdf2zh指令: 默认为'pdf2zh'
thread_num = 8                           # 设置线程数: 默认为4
port_num = 8888                          # 设置端口号: 默认为8888
service = 'bing'                         # 设置翻译服务: 默认为bing
translated_dir = "./translated/" # 设置翻译文件的输出路径(临时路径, 可以在翻译后删除)
config_path = './config.json'    # 设置配置文件路径
#############################

# 添加下面这一段:
import sys
if len(sys.argv) > 1:
    service = sys.argv[1]

在命令行里输入你选择的翻译服务
python3 main.py google

@liuyun16
Copy link
Author

liuyun16 commented Feb 12, 2025

谢谢!这个代码够用了,暂时。哈哈

@guaguastandup
Copy link
Owner

更新了新版本,已经支持该功能了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants