move data files out of repo

This commit is contained in:
olari
2021-06-19 11:50:19 +03:00
parent f4c4407ebc
commit 195c430797
6 changed files with 25 additions and 2254 deletions

View File

@@ -45,6 +45,7 @@ def parse_header(header):
title, *modules = split_into_blocks(header)
for module in modules:
print(module)
name, value = module.split('\n', maxsplit=1)
name = name.lower().removesuffix(':')
result[name] = header_modules[name](value)
@@ -182,5 +183,7 @@ for fpath in list(sorted((Path.home() / 'workspace' / 'journal').glob('*.md'))):
'entries': [parse_entry(e) for e in entries],
}
with open('journal.json', 'w') as fp:
script_path = Path(__file__).parent
with open(script_path / 'journal.json', 'w') as fp:
json.dump(result, fp, indent=4, ensure_ascii=False)