countcode(1)
π countcode(1) π
okay bestie, so this is the manual page for countcode, straight out of the General Commands Manual, and I need you to know that this little icon is lowkey a whole vibe. it counts your source lines. per file type. periodt. β¨
πΈ NAME πΈ
countcode β counts per known source file type the number of source lines
no fr, that's it, that's the whole job π«Ά
π SYNOPSIS π
countcode [-h] [-b] [-c] [-s] [-l] [-p PRINTLEVEL] [-d] [-t] [-v]
[directory]
π DESCRIPTION π
so countcode counts, per known source file type, the number of source lines in the files in the given directory and recursively in all its subdirectories. it supports many file types, like genuinely a lot of them. the type gets recognized from the file name extension or from the shebang script type. use -s to see all the supported types π
here's the tea on which line types get counted:
code:β pure code linescomment:β pure comment linesblank:β empty lines, or lines that are nothing but whitespaceheader:β the copyright header (aka the leading comment lines)other:β literally everything else
unless you pass-b, a pure code or comment line has to contain an alphanumeric character. so like, a lonely little}by itself? not a code line. sorry bestie, rules are rules π
it calculates the percentage of code and comment lines in the total number of lines β or, if -l is given, in the sum of code and comment lines. unless -t is given, files in test directories get counted separately. normal output goes on stdout; verbose output goes on stderr. files with an unknown type get reported on stderr. and ngl, note that -bt should give you about the same results as a tool like cloc π
π¦ positional arguments π¦
directoryβ name of top directory to count source files (default is.)
β¨ optional arguments β¨
-h,--helpβ show this help message and exit-b,--basicβ count copyright header and lines without an alphanumeric character as code/comment lines-c,--codeβ only use source files containing code (e.g. no.parset)-s,--sumβ only calculate and print the sum of all file types-l,--limitpercβ limit to the nr of code and comment lines to determine percentages-p PRINTLEVEL,--printlevel PRINTLEVELβ first directory level to print (default0(=top))-d,--displaytypesβ display the currently recognized file types (full info with-v)-t,--testincludeβ do not count test directories separately-v,--verboseβ print count for each source file
π AUTHOR π
this manual page was written with the help of help2man by Benda Xu <heroxbd@gentoo.org>, for the Debian GNU/Linux system. iconic of them honestly π«Ά
and that's the whole page, bestie!! this version came from caascore and it's dated 2016-03-25 β go forth and count some code, mwah ππ
π¦ where this page comes from
- debian bookworm: casacore-tools 3.5.0-2+b3 Β· LGPL-2.0-or-later
- debian trixie: casacore-tools 3.7.1-1 Β· LGPL-2.0-or-later
- ubuntu jammy: casacore-tools 3.4.0-2build1 Β· LGPL-2.0-or-later
- ubuntu noble: casacore-tools 3.5.0-4.1ubuntu2 Β· LGPL-2.0-or-later
- ubuntu questing: casacore-tools 3.7.1-2
- ubuntu resolute: casacore-tools 3.8.0-4 Β· LGPL-2.0-or-later
- ubuntu stonking: casacore-tools 3.8.1-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms