forked from kamo/post-it-contents
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.9 KiB
1.9 KiB
In [3]:
import frontmatter import os # list all the folders folders = [ name for name in os.listdir() if os.path.isdir(os.path.join('', name)) and not name.startswith('.') ] total = 0 for folder in folders: with open(f'{folder}/contents.md', 'r') as f: metadata, body = frontmatter.parse(f.read()) block = len(metadata['contents']) print(f'{metadata["title"]}: {block}') total = total + block print('\n') print(f'Total post-it: {total}')
Nim Fanfic: 73 What is a loot box?: 158 One-sentence game ideas: 98 Exquisite Branch: 22 Miriam the Leader: 32 Katamari Fanfic: 147 there are 2 types of treasure chest: 24 Total post-it: 554
In [ ]:
In [ ]: