-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
30 lines (21 loc) · 750 Bytes
/
Copy pathmain.py
File metadata and controls
30 lines (21 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""
CLI 진입점 — 백엔드 단독 테스트용
python main.py [경로1] [경로2] ...
"""
import sys
from pathlib import Path
from backend import Scanner, Analyzer, Reporter, output_path
def main():
roots = [Path(p) for p in sys.argv[1:]] if len(sys.argv) > 1 else [Path.home()]
print(f"스캔 시작: {roots}")
scanner = Scanner(root_paths=roots, phase=1, progress_cb=print)
result = scanner.run()
analyzer = Analyzer()
report = analyzer.analyze(result, roots)
reporter = Reporter()
reporter.print_summary(report)
# frozen(exe): exe 옆 outputs/ , dev: CWD/outputs/
out = output_path("outputs", "overflow_report.md")
reporter.save_markdown(report, out)
if __name__ == "__main__":
main()