MCPcopy Create free account
hub / github.com/0xAX/linux-insides / __main__

Function __main__

scripts/check_code_snippets.py:63–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61 continue
62
63def __main__():
64 path = ''
65 md_files = []
66
67 if len(sys.argv) == 1:
68 path = '.'
69 else:
70 path = sys.argv[1]
71
72 for root, _dirs, files in os.walk(path):
73 for name in files:
74 if name.endswith('.md'):
75 md_files.append(os.path.join(root, name))
76 else:
77 continue
78
79 for md in md_files:
80 print("Checking code in the", md)
81 if os.path.dirname(md) in exclude_dirs:
82 continue
83
84 with open(md, "r", encoding="utf-8") as f:
85 md = f.read()
86
87 __handle_md__(md, path)
88
89if __name__ == "__main__":
90 __main__()

Callers 1

Calls 1

__handle_md__Function · 0.85

Tested by

no test coverage detected