old_ids = "20462" # 需要添加关联题目的id字符串
new_ids = "19879" # 目的地的id字符串, 其中空闲位置需不少于old_ids中的题目数量
editor = "王伟叶" # 修改人姓名

from database_tools import *

tempfilepath = "临时文件/problem_edit.json"

pro_dict = load_dict("../题库0.3/problems.json")
links = CreateIDLinks(generate_number_set(old_ids),generate_number_set(new_ids),pro_dict)
CreateRelatedProblems(links,pro_dict,tempfilepath,editor)

print("编辑完毕后, 保存关闭文件继续.")
os.system("code -w -g "+tempfilepath) #-w表示关闭窗口后继续下一步

ImportRelatedProblems(tempfilepath,"../题库0.3/problems.json")