# Served copy of the line counter behind the "about 52,000 lines" figure on this page. # Usage: git archive 9e22d35 | tar -x -C ; python3 count_lines.py # The figure sums the sloc of the py rows of agent, tools, evals and tests plus the sh and html rows of tools # (33,261 source + 18,794 tests = 52,055). json and plist rows, evals html (generated reports) and kit/ are not counted. """Count non-blank, non-comment lines (SLOC) by bucket and language. Rules: blank lines skipped everywhere. .py: tokenize; a line counts if it carries any token other than COMMENT/NL/NEWLINE/INDENT/DEDENT, and lines belonging only to a docstring (a STRING token that is a whole expression statement) are skipped. .sh/.yml/.yaml/.toml/.plist-free: lines whose lstrip starts with '#' skipped (shebang included). .js/.css: lines starting with // skipped, /* ... */ block lines skipped. .html: lines inside skipped; inline