From b951b1e152d2155806dd421aa4a14c7d944a0e51 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Sat, 9 May 2026 21:56:37 +0100 Subject: [PATCH] count lines --- count_lines.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 count_lines.sh 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.