eLOCuent
Node.js script to analyze lines of code in a (smallish) codebase and generate a CSV with stats about each line.
It works by running git blame
, then parsing the output.
The metadata stored in the CSV is:
file
: the file the line is fromline
: the line numbertype
: The type of code ("html"
, "css"
, "js"
, "svelte"
). CSS and JS defined in Svelte files is recognized as HTML and CSS, so "svelte"
is only used for the HTML in Svelte files.commit
: The identifier (SHA hash) of the commit that last changed this linedate
, time
, timezone
: The date, time, and timezone respectively that the commit was madedatetime
: The full date and time (including timezone) in ISO 8601 formatauthor
: The full name of the author of the last commit that changed this line. For your own website this will likely be your own name on every line.depth
: the indentation level of the linelength
: the number of characters in the line after trimming (i.e. excluding whitespace at the start and end).