This commit is contained in:
olari
2021-06-20 21:30:52 +03:00
parent bf589d94b5
commit 96dda8ec5e
4 changed files with 57 additions and 0 deletions

13
test.py Normal file
View File

@@ -0,0 +1,13 @@
from pathlib import Path
from generate import generate_page
from parse import parse_page
for fpath in list(sorted((Path.home() / 'workspace' / 'journal').glob('*.md'))):
text = fpath.read_text()
parsed = parse_page(text)
generated = generate_page(fpath.stem, parsed['header'], parsed['entries'])
for l1, l2 in zip(text.split('\n'), generated.split('\n')):
if l1 != l2:
print('\n'.join([fpath.stem, l1, l2]))
breakpoint()