feat: extract place lat/long coordinates

* Show coordinates for any place that has them
* Add tests for coordinates
This commit is contained in:
Jared Howland committed 2026-04-16 22:16:34 -06:00
1 parent 48e339c119
commit 2108325252
4 files changed
+1007 -171

No files matched your search

+28
View File
@@ -236,6 +236,34 @@ class TestEventFormatting:
# Birth should not appear as a separate event
assert 'Birth' not in life_events_section or 'Marriage' in content
def test_coordinates_written(self, generator, temp_dir):
"""Ensure that coordinates extracted from PLAC/MAP are written into notes."""
gedcom_content = """0 HEAD
1 SOUR TestApp
1 GEDC
2 VERS 5.5.1
1 CHAR UTF-8
0 @I1@ INDI
1 NAME Locator /Person/
1 RESI
2 PLAC Mapville
3 MAP
4 LATI 51.5074
4 LONG -0.1278
0 TRLR
"""
temp_file = temp_dir / "coords_note.ged"
temp_file.write_text(gedcom_content, encoding='utf-8')
parser = GedcomParser(temp_file)
individuals = parser.get_individuals()
person = Individual(individuals[0], parser.parser)
file_path = generator.generate_note(person)
content = file_path.read_text()
assert '- **Coordinates**: 51.5074, -0.1278' in content
class TestImageHandling:
"""Tests for image embedding in notes."""