Blog Post | BilibiliVideo(zh) | 中文readme
Use Baidu Translation API Customize translate your value in json file
Download the version that matches your system in the release
Or you can run:
$ git clone "https://github.com/0ojixueseno0/TranslateJson.git"
$ cd TranslateJson
$ .\TJson.py "example.json or example.yaml"
#Or compiled as a program to use
#Windows
$ Tjson.exe example.json
#or
$ Tjson.exe example.yaml
#linux
$ Tjson example.json
#or
$ Tjson example.yaml
When it completed, you will find a file named output.json or output.y(a)ml
with result
Config.yml
Config:
#Help of Baidu-Trans API:http://api.fanyi.baidu.com/doc/21
#Default address is Baidu-Trans general API
api_url: "http://api.fanyi.baidu.com/api/trans/vip/translate"
app_id: #Fill in your AppID here
secret: "" #Fill in your key here
transfrom: en #from "from" trans to "to"
transto: zh
#program will not translate the chars in the list
DetranslateList:
- "&"
- "*"
- ":"
- "!"
#Filter mode:whitelist/blacklist will Match the whitelist and blacklist list below
listmode: whitelist
#put the key of json in the list
Whitelist:
- Title
- Thursday
Blacklist:
- lore
Click the star
button pls !!!