22 lines
527 B
Python
22 lines
527 B
Python
from database_tools import *
|
|
|
|
configjson = load_dict("文本文件/config.json")["文件或剪贴板提取答案.py"]
|
|
preamble = configjson["前缀"]
|
|
|
|
|
|
if configjson["来自剪贴板"] == True:
|
|
data = getCopy()
|
|
else:
|
|
data = ReadTextFile(configjson["文件地址"])
|
|
|
|
anslist = generateAnswerList(data,preamble)
|
|
|
|
output = "ans\n\n"
|
|
for id,ans in anslist:
|
|
if not ans == "暂无答案":
|
|
output += f"{id}\n{ans}\n\n"
|
|
|
|
SaveTextFile(output,"文本文件/metadata.txt")
|
|
os.system("code 文本文件/metadata.txt")
|
|
|