用ChatGPT给的
<task>
<name>Extract RPG Maker MV Dialogues from JSON files</name>
<input>
<source>path/to/json/files/*.json</source>
</input>
<output>
<destination>path/to/output/folder</destination>
<format>csv</format>
</output>
<parameters>
<parameter>
<name>dialogueKey</name>
<label>Dialogue key</label>
<type>string</type>
<description>The key in the JSON object that contains the dialogue text.</description>
</parameter>
<parameter>
<name>characterKey</name>
<label>Character key</label>
<type>string</type>
<description>The key in the JSON object that contains the character name.</description>
</parameter>
</parameters>
<script><![CDATA[
import json
import glob
dialogue_key = parameters['dialogueKey']
character_key = parameters['characterKey']
for file_path in glob.glob(input['source']):
with open(file_path) as file:
data = json.load(file)
for dialogue in data:
character = dialogue.get(character_key, '')
text = dialogue.get(dialogue_key, '')
output.write(f'{character},{text}\n')
]]></script>
</task>
会把事件名称,事件注释,插件指令,地图备注,脸图,人物图引用的内容全部都翻译了。