Skip to content

Commit

Permalink
Remove Periods in Word Count (#1364)
Browse files Browse the repository at this point in the history
* Enhance command for counting word with removal of periods before counting
* LaTeX files often use period signs to seperate names of sections/subsections from their page number in the content table. To avoid these periods being counted as words, periods should be removed before counting the word number.
  • Loading branch information
felix-seifert authored Apr 26, 2021
1 parent c968a62 commit a004051
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/essay-word-count.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
added_file=${item//;/ };
echo "Checking file: $added_file"
if [[ "$added_file" == *"contributions/essay/"* ]] && [[ "$added_file" == *"pdf" ]] ; then
words=$(sudo pdftotext "${added_file}" - | wc -w)
words=$(sudo pdftotext "${added_file}" - | tr -d '.' | wc -w)
echo "File $added_file has $words words"
if [ $words -lt 1900 ] || [ $words -gt 2100 ]; then
exit 1
Expand Down

0 comments on commit a004051

Please sign in to comment.