2022-04-04 10:56:12 +02:00
|
|
|
print("really?")
|
|
|
|
exit()
|
|
|
|
|
2022-03-31 16:46:30 +02:00
|
|
|
import os
|
|
|
|
import json
|
|
|
|
|
|
|
|
with open("shema.tex","r") as f:
|
|
|
|
shema=f.read()
|
|
|
|
|
|
|
|
|
|
|
|
for fn,fno in [[f"dics/{zw}",zw.replace(".json","")] for zw in os.listdir("dics")]:
|
|
|
|
with open(fn,"r") as f:
|
|
|
|
dic=json.loads(f.read())
|
|
|
|
print(dic["paper"]+", "+dic["by"]+"("+dic["when"]+")")
|
|
|
|
ac=shema.replace("##name##",fno)
|
|
|
|
for key,val in dic.items():
|
|
|
|
ac=ac.replace(f"##{key}##",str(val))
|
|
|
|
|
|
|
|
ac=ac.replace("\item {null}","")
|
|
|
|
|
|
|
|
|
|
|
|
with open(f"topics/{fno}.tex","w") as f:
|
|
|
|
f.write(ac)
|
|
|
|
|
|
|
|
|
|
|
|
|