Commit Graph
16 Commits
Author SHA1 Message Date
Jared Howland 6259bfffd6 feat: add source parsing and linking
- Respect GEDCOM CONC vs CONT semantics (concatenate vs newline)
 - Generate global sources index once (avoid O(N*S) stall)
 - Repair broken HTML tags spanning GEDCOM lines for whitelist tags
 - Escape markdown emphasis characters in notes to prevent formatting leakage
 - Consistent handling of CONT/CONC; skip empty CONT lines; handle trailing spaces for hard breaks
 - Added tests covering CONT/CONC and source index
2026-04-17 13:42:04 -06:00
AlexKucera f571727946 Fixes duplicate filename generation
Addresses an issue where duplicate filenames could be generated
for individuals with the same name, especially in large datasets.

This change introduces a mechanism to ensure unique filenames by
appending a counter to duplicate names. It updates the index
generator and markdown generator to use this mechanism, ensuring
that links between individuals are correctly resolved.
2025-11-02 19:05:51 +01:00
AlexKucera 79d7f281b8 Restructures note generation with YAML frontmatter
Refactors the markdown note generation to include YAML
frontmatter for individual attributes. This enhances the
structure and organization of the generated notes.
It replaces the previous "Attributes" section with a
YAML frontmatter block, improving data accessibility
and interoperability.
2025-11-02 17:57:55 +01:00
AlexKucera 85c67e8190 Handles missing birth/death years
Ensures that the "Lived" metadata field is only written if both
birth and death years are available to prevent generating
incomplete entries.

Also, simplifies exception handling during note generation by
removing the unused exception variable.
2025-11-02 17:45:15 +01:00
AlexKucera 17c97b5188 Refactors marriage header formatting.
Updates marriage header generation to use f-string formatting consistently, improving readability and maintainability.
2025-11-02 17:38:56 +01:00
AlexKucera 6d7a41fc88 Simplifies code and improves error handling
Refactors code for clarity and conciseness by removing unused variables.

Improves error handling by logging only the necessary information,
making debugging easier.
2025-11-02 17:38:00 +01:00
AlexKucera b335a137d3 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.
2025-11-02 17:29:49 +01:00
AlexKucera 449439225e Refactors family metadata generation in markdown writer
Improves family section generation logic to:
- Always write Marriage header
- Conditionally write partner metadata
- Simplify metadata and children writing process

Ensures more consistent markdown generation for family records
2025-11-02 16:02:45 +01:00
AlexKucera ecd9889e21 Merge remote-tracking branch 'origin/initial_features' into initial_features 2025-11-01 14:22:11 +01:00
AlexKucera 3e7dc7e916 Initializes project with GEDCOM to Markdown converter
Sets up core functionality for converting genealogy GEDCOM files to Obsidian markdown notes

Implements key components:
- GEDCOM parsing and individual data extraction
- Markdown note generation with rich metadata
- Index file creation
- Comprehensive test suite for robust functionality

Adds initial project structure, configuration, and essential modules for genealogy data conversion
2025-11-01 14:20:53 +01:00
coderabbitai[bot] 2190dc214e 📝 Add docstrings to initial_features
Docstrings generation was requested by @AlexKucera.

* https://github.com/AlexKucera/gedcom-to-markdown/pull/1#issuecomment-3476366503

The following files were modified:

* `src/gedcom_parser.py`
* `src/index_generator.py`
* `src/individual.py`
* `src/main.py`
* `src/markdown_generator.py`
2025-11-01 13:14:59 +00:00
AlexKucera 3b41e4b111 Enhance markdown generation with separate story files
Extends markdown generator to create separate story files for individuals, improving documentation structure and readability

Key improvements:
- Generates individual story files with rich metadata
- Supports optional story and media subdirectories
- Creates WikiLinks between individual notes and story files
- Tracks and prevents duplicate story generation

Improves flexibility in managing personal history documentation
2025-11-01 14:08:38 +01:00
AlexKucera 02b27409d8 Adds GEDZIP support and media file management
Enhances GEDCOM converter with:
- ZIP file extraction and processing
- Automatic media file copying
- Line ending detection and correction
- Optional media subdirectory support

Improves user experience by simplifying genealogy file import and media handling
2025-11-01 13:54:37 +01:00
AlexKucera cc46f0a523 Enhance image metadata handling in GEDCOM processing
Improves image reference resolution by extracting additional metadata like file, title, and format

Changes image handling to return richer dictionary information instead of simple references, enabling more detailed image display in markdown generation

Updates markdown output to use extracted image title and filename for more informative image rendering
2025-10-31 15:17:08 +01:00
AlexKucera 3a9112de60 Enhances GEDCOM story parsing and markdown generation
Improves individual story extraction to support:
- More detailed story structure with sections
- Subtitle and description metadata
- Inline image references

Updates README with GEDCOM version compatibility guidelines and line ending troubleshooting tips
2025-10-31 15:02:12 +01:00
AlexKucera e8a2f0b5a4 Initializes GEDCOM to Markdown converter project
Creates core project structure for converting GEDCOM genealogy files to Obsidian-compatible markdown notes

Implements key components:
- GEDCOM file parsing
- Individual data extraction
- Markdown note generation
- Alphabetical index creation

Includes comprehensive documentation and CLI interface for easy usage
2025-10-31 14:44:23 +01:00