Skip to content

Commit 15cd033

Browse files
committed
script
1 parent 5781fc0 commit 15cd033

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

auto.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
lines = index.readlines()
44

55
all = 0
6+
all_index = 0
67
for i in range (0,len(lines)):
78
if lines[i].startswith("["):
89
line = lines[i]
@@ -18,8 +19,12 @@
1819
s = line.split("个]")[1]
1920
all += total
2021
lines[i] = p + "- " + str(total) + "个]" + s
22+
print(suffix + ":" + str(total))
23+
if lines[i].startswith("当前问题总数"):
24+
all_index = i
2125

26+
print("total:" + str(all))
27+
lines[all_index] = "当前问题总数:"+ str(all) + "\n"
2228
index.seek(0)
2329
index.truncate()
2430
index.writelines(lines)
25-
print(all)

0 commit comments

Comments
 (0)