MCPcopy Create free account
hub / github.com/Kuangcp/Note / main

Function main

create_tree.py:93–110  ·  view source on GitHub ↗
(verb=None)

Source from the content-addressed store, hash-verified

91 readFolder(fold, 1)
92
93def main(verb=None):
94 if verb == '-h':
95 help()
96 return
97 # 只在终端输出
98 if verb == "-s":
99 readAll()
100 for res in result:
101 print(res)
102 # 追加到SUMMARY
103 if verb == "-a":
104 readAll()
105 subprocess.call('mv SUMMARY.md SUMMARY.md.bak',shell=True)
106 with open('SUMMARY.md','w+') as dest:
107 dest.write('# Summary\n\n* [ Introduction ](README.md)\n\n')
108 for res in result:
109 dest.write(res+'\n')
110 logInfo('重新生成目录树完成!')
111
112fire.Fire(main)

Callers

nothing calls this directly

Calls 3

helpFunction · 0.85
readAllFunction · 0.85
logInfoFunction · 0.85

Tested by

no test coverage detected