diff --git a/count_lines.sh b/count_lines.sh new file mode 100644 index 000000000..fb6dd69a5 --- /dev/null +++ b/count_lines.sh @@ -0,0 +1,7 @@ +#! /bin/bash + +find . -name \*.html -print0 | xargs -0 egrep -vc "#|^\s*$" | grep -v ":0$" | grep -v ".venv" | awk -F ":" '{ sum +=$2; print $2, $1; } END {print sum}'| sort -n > lines-of-templates.txt + +find . -name \*.py -print0 | xargs -0 egrep -vc "#|^\s*$" | grep -v ":0$" | grep -v ".venv" | grep -v "/migrations/" |grep -v "troggle-inspectdb.py"| awk -F ":" '{ sum +=$2; print $2, $1; } END {print sum}'| sort -n > lines-of-python.txt +echo `tail -1 lines-of-python.txt` non-comment lines of python. +echo `tail -1 lines-of-templates.txt` non-comment lines of HTML templates.