Enhances individual death info and note generation

Extracts and includes the death year from the death date in individual data.

Adds a flag to control subdirectory usage for generated files.
This ensures correct linking and image paths in notes when using a
subdirectory structure (people/, stories/, media/).

Also, improves error logging during note generation.
This commit is contained in:
AlexKucera committed 2025-11-02 17:29:49 +01:00
1 parent 759b966598
commit b335a137d3
5 files changed
+26 -13

No files matched your search

+2 -2
View File
@@ -142,8 +142,8 @@ class TestMetadataFormatting:
file_path = generator.generate_note(john_doe)
content = file_path.read_text()
# Death date extraction gets first 4 chars which is "15 J" from "15 JUN 2020"
assert '[Lived:: 1950-15 J]' in content or '[Lived:: 1950-2020]' in content
# Death year is now extracted robustly using regex
assert '[Lived:: 1950-2020]' in content
assert '[Born:: 1 JAN 1950]' in content
assert '[Passed away:: 15 JUN 2020]' in content