diff --git a/novel_stats/novel_stats.py b/novel_stats/novel_stats.py index 86a7f61..b4b19f2 100755 --- a/novel_stats/novel_stats.py +++ b/novel_stats/novel_stats.py @@ -8,6 +8,7 @@ import sys CHAPTER_MARKER = '## ' STATUS_MARKER = '[status]: # ' ACT_MARKER = '[act]: # ' +COMMENT_MARKER = '[//]: # ' def count_words(line): @@ -48,6 +49,8 @@ def main(): elif line.startswith(ACT_MARKER): act_number = int(line[len(ACT_MARKER):].strip('()\n')) word_count_by_act[act_number] = 1 + elif line.startswith(COMMENT_MARKER): + pass else: line_word_count = count_words(line) word_count_by_chapter[chapter_number] += line_word_count