move data files out of repo
This commit is contained in:
5
parse.py
5
parse.py
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user