Skip to content

natsumerinchan/GPTDictEditor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPTDictEditor

本项目用于编写Galgame AI翻译时所用的项目GPT字典,支持
语法高亮、注释和取消注释、查找替换(支持在特定字段进行)等功能,
且支持多种翻译器的字典格式之间的互相转换

界面展示

使用方法

1、环境配置

  • 操作系统: Windows 10 或 Windows 11 (Linux和mac上未测试)
  • 版本控制工具: git
  • python 3.13.7 :不保证其它python版本能否正常运行

2、克隆本仓库

git clone https://github.com/natsumerinchan/GPTDictEditor.git
cd .\GPTDictEditor

3、安装依赖

3.1 创建虚拟环境

python -m venv venv

3.2 激活虚拟环境

.\venv\Scripts\activate

3.3 安装依赖

pip install -r .\requirements.txt

4、运行脚本

python .\main.py

或双击运行run.bat

5、打包为exe(可选)

5.1 激活虚拟环境

.\venv\Scripts\activate

5.2 安装pyinstaller

pip install pyinstaller

5.3 配置upx(用于压缩exe体积)

下载upx的win64版并将upx.exeupx.1复制到
venv\Scripts文件夹(直接在.\github\bin复制亦可)

5.4 开始打包

pyinstaller --noconfirm --onefile --windowed --add-data "docs/help.md;docs" --name "GPTDictEditor" main.py

6、详细使用教程

详见help.md

支持的翻译器及其GPT字典格式

GalTransl_TSV

//格式为日文[Tab]中文[Tab]解释(可不写),参考项目wiki

原文1	译文1	注释1
原文2	译文2	注释2
原文3	译文3	注释3

GPPV2_TOML_SHORT

gptDict = [
	{org = "原文1", rep = "译文1", note = "注释1"},
	{org = "原文2", rep = "译文2", note = "注释2"},
	{org = "原文3", rep = "译文3", note = "注释3"},
]

GPPV2_TOML_FULL

gptDict = [
	{searchStr = "原文1", replaceStr = "译文1", note = "注释1"},
	{searchStr = "原文2", replaceStr = "译文2", note = "注释2"},
	{searchStr = "原文3", replaceStr = "译文3", note = "注释3"},
]

KeywordGacha_JSON

[
  {
    "src": "原文1",
    "dst": "译文1",
    "info": "注释1"
  },
  {
    "src": "原文2",
    "dst": "译文2",
    "info": "注释2"
  },
  {
    "src": "原文3",
    "dst": "译文3",
    "info": "注释3"
  }
]

About

Galgame AI翻译用 项目GPT字典编辑转换器

Resources

License

Stars

Watchers

Forks

Packages

No packages published