Open smileaf419 opened 1 year ago
Progress update: HOMEPAGE - 159 DESCRIPTION - 300 LICENSE - 310
As the repository grows it becomes a bit depressing to see numbers increase rather than decrease for the progress of proper documentation. So I wrote a script to calculate these but added % completed.
#!/bin/sh
source /etc/spkg.conf
cd $PKG_DB_DIR
echo "Checking for missing Documentation:"
echo -n " * Number of Packages: "
N=$(find . -maxdepth 2 -mindepth 2 -type d | grep -Ev "git|spkg" | wc -l)
echo $N
echo -n " * HOMEPAGE: "
C=$(grep --include \*.build -r 'HOMEPAGE=""' | sed 's,/[^/]*$,,' | uniq)
HN=$(echo $C | tr ' ' '\n' | wc -l)
echo "$HN / $(( ( ( $N - $HN ) * 100 ) / $N )) %"
echo $C | tr ' ' '\n' | sort -R | head -n3
echo -n " * DESCRIPTION: "
C=$(grep --include \*.build -r 'DESCRIPTION=""' | sed 's,/[^/]*$,,' | uniq)
DN=$(echo $C | tr ' ' '\n' | wc -l)
echo "$DN / $(( ( ( $N - $DN ) * 100 ) / $N )) %"
echo $C | tr ' ' '\n' | sort -R | head -n3
echo -n " * LICENSE: "
C=$(grep --include \*.build -r 'LICENSE=""' | sed 's,/[^/]*$,,' | uniq)
LN=$(echo $C | tr ' ' '\n' | wc -l)
echo "$LN / $(( ( ( $N - $LN ) * 100 ) / $N )) %"
echo $C | tr ' ' '\n' | sort -R | head -n3
Progress report:
Previous reports included duplicate results Removing the duplicates results in a much better reflection
DESCRIPTION, HOMEPAGE, LICENSE variables are missing valuable and very important information. A simple: grep -r ‘HOMEPAGE=“”’ will find 243 unique package offenders.