Bug fixes and features #1

Merged
witten merged 12 commits from deroshkin/novel-stats-fork:deroshkin_branch into master 2021-10-22 20:05:18 +00:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit 93340fb3f4 - Show all commits

View File

@ -78,6 +78,8 @@ def main():
word_count_by_status[current_status] += line_word_count
status_by_chapter[chapter_heading][current_status] += line_word_count
mdfile.close()
# Do some final accounting after the last chapter.
word_count_by_act[act_heading] += word_count_by_chapter[chapter_heading]
total_word_count += word_count_by_chapter[chapter_heading]
@ -114,8 +116,6 @@ def main():
print(f'{status}: {status_word_count:,} words (~{status_word_count * 100 // total_word_count}%)')
print(f'total: {total_word_count:,} words')
Review

Code changes look great! At some point it'd probably be good to switch to "formal" argument parsing (argparse, etc.), but certainly not needed now.

Code changes look great! At some point it'd probably be good to switch to "formal" argument parsing (`argparse`, etc.), but certainly not needed now.
mdfile.close()
if __name__ == '__main__':