# Metrics for the current directory tree
python code_metrics.py
# Metrics for a specific project
python code_metrics.py C:/github/JimFawcett/NewSite/Code/Projects/TextFinder/CppTextFinder
# Output only the HTML table (for embedding in a web page)
python code_metrics.py C:/github/JimFawcett/NewSite/Code/Projects/TextFinder/CppTextFinder --html-only
# Scan top-level files only
python code_metrics.py . --no-recurse
Text output sample
C:\github\JimFawcett\NewSite\Code\Projects\TextFinder\CppTextFinder
+-----------------------------+-------+--------+
| File | Lines | Scopes |
+-----------------------------+-------+--------+
| CommandLine\src\CmdLine.ixx | 126 | 29 |
| CommandLine\src\test.cpp | 225 | 79 |
| DirNav\src\DirNav.ixx | 126 | 19 |
| DirNav\src\test.cpp | 491 | 82 |
| EntryPoint\src\main.cpp | 67 | 8 |
| EntryPoint\src\test.cpp | 435 | 59 |
| generate_part.py | 339 | 28 |
| Output\src\Output.ixx | 110 | 17 |
| Output\src\test.cpp | 469 | 70 |
+-----------------------------+-------+--------+
| TOTAL | 2388 | 391 |
+-----------------------------+-------+--------+