Extract note writing into function

This commit is contained in:
Marty Oehme 2023-02-21 14:48:21 +01:00
parent 2db5ce4cac
commit bc520497f8
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -80,6 +80,10 @@ def main(fpath, db):
notes[note_file] = [] notes[note_file] = []
notes[note_file].append(text) notes[note_file].append(text)
write_to_files(notes)
def write_to_files(notes):
# write to notes # write to notes
for f, entries in notes.items(): for f, entries in notes.items():
if f: if f: