Skip to content

Commit 5088541

Browse files
committed
Add icons for word count
1 parent 7e9ac19 commit 5088541

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

checks.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828

2929
# Count paper file length
3030
word_count = Open3.capture3("cat #{paper_path} | wc -w")[0].to_i
31-
word_count_msg = "📄 Wordcount for `#{File.basename(paper_path)}` is **#{word_count}**"
31+
word_count_icon = word_count > 1999 ? "🚨" : (word_count > 1200 ? "⚠️" : "📄")
32+
word_count_msg = "#{word_count_icon} Wordcount for `#{File.basename(paper_path)}` is **#{word_count}**"
3233

3334
# Detect a "Statement of need" section
3435
paper_file_text = File.open(paper_path).read

0 commit comments

Comments
 (0)