Skip to content

Commit

Permalink
stats: remove some of the "aim" data and make it pure stats
Browse files Browse the repository at this point in the history
  • Loading branch information
bagder committed Aug 18, 2022
1 parent 131154e commit f123e57
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions stats.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,24 @@ content=`echo "$titles-$tbd" | bc`

words=`cat $book | wc -w`
lines=`cat $book | wc -l`
nonspace=`cat $book | tr -d ' #' | wc -c`

echo "Section titles: $titles"
echo "Sections with content: $content"
echo "Sections to go: $tbd"
#echo "Sections with content: $content"
#echo "Sections to go: $tbd"
echo "Words: $words"
echo "Lines: $lines"
echo "Non-space bytes: $nonspace"

wordlen=`echo "scale=2; $nonspace / $words" | bc`
echo "Average word length: $wordlen characters"

complete=`echo "scale=1; $content*100/$titles" | bc`
secsize=`echo "$words/$content" | bc`

echo "Words per section: $secsize"
echo "Completeness: $complete %"
#echo "Completeness: $complete %"

left=`echo "$tbd * $secsize" | bc`
total=`echo "$secsize * $titles" | bc`
echo "Estimated $left words left until $total"
#echo "Estimated $left words left until $total"

0 comments on commit f123e57

Please sign in to comment.