Commit Graph
33 Commits
Author SHA1 Message Date
Jared Howland 747175fcef fix: cache subject pointer; tidy up tests
Cache the subject pointer in Individual.get_families by calling self.element.get_pointer() once outside the loop to avoid repeated calls and add a clarifying comment. Clean up tests: remove a duplicated TestIndividualBasicInfo fixture/block comment, drop redundant assertions about residence coordinates, and remove an unnecessary return in TestAttributes.
2026-04-16 22:51:45 -06:00
Jared Howland 2108325252 feat: extract place lat/long coordinates
* Show coordinates for any place that has them
* Add tests for coordinates
2026-04-16 22:16:34 -06:00
AlexKucera 3fd10f8530 Enhances individual filename generation
Improves the individual filename generation logic to include the birth year if available, providing more informative filenames.

Also updates the logging setup to use WARNING level for the root logger and INFO for the main module, and modifies the markdown generator to use YAML frontmatter for metadata.
2025-11-02 19:51:08 +01:00
AlexKucera aee0cbec4a Prepare v1.0.0 release
- Add version number and --version flag
  - Add GitHub Actions CI workflow
  - Update README with CI badges
  - Add CHANGELOG for v1.0.0
  - Enhance README with header image and better formatting
2025-11-02 19:33:14 +01: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 5fd41a8e06 Merge branch 'main' into canvas 2025-11-02 17:49:36 +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 3b5991c81c Simplifies exception handling
Removes unnecessary variable assignments in exception handlers.

This improves code readability and maintainability by reducing
redundancy without impacting functionality.
2025-11-02 17:44:50 +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 d6dc645de1 Improves error logging in file operations
Updates error handling to log full exception details
instead of just the error message, providing more context
for debugging file-related issues.
2025-11-02 17:38:29 +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 759b966598 Refactors Individual class for parser access
Simplifies Individual class initialization by directly passing the parser instance instead of the GedcomParser object.
This change streamlines the code and avoids unnecessary object attribute access.
Also, it ensures name formatting preserves the original capitalization.
2025-11-02 17:25:06 +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 2cd47a70b1 Enhances media file copying with robust handling
Improves media file import process with:
- Recursive directory structure preservation
- Case-insensitive extension filtering
- Collision handling with unique filename generation
- Error logging for copy failures

Adds comprehensive test cases to validate new media file copying behavior
2025-11-02 16:01:29 +01:00
AlexKucera 7c3eb1dde0 Enhances media file discovery in GEDCOM extraction
Improves media file search across nested directories by:
- Using rglob for recursive media file discovery
- Supporting more file extensions (including uppercase variants)
- Logging media file locations with greater detail

Enables finding media files in complex directory structures with multiple subdirectories
2025-11-02 14:37:18 +01:00
AlexKucera 64f42deb29 Improves death year extraction and pytest configuration
Fixes death year extraction using regex to correctly parse years
Removes manual sys.path modifications in test files
Adds pythonpath configuration to pytest.ini for simpler imports

Enhances test coverage for life span formatting
2025-11-02 14:35:23 +01:00
AlexKucera e0ea4a3cc4 Adds Obsidian canvas generation with root person selection
Enhances GEDCOM to Markdown conversion by introducing canvas generation feature

Implements flexible root person selection for canvas via:
- Command-line argument (`--root`)
- Numeric index selection
- Direct GEDCOM ID input
- Interactive fallback selection

Improves logging configuration to provide more granular control over output verbosity
2025-11-02 14:29:22 +01:00
AlexKucera 5a73b3ceeb Improves ancestor layout with overlap prevention
Enhances family tree positioning algorithm to prevent vertical overlaps by:
- Introducing shared tracking of minimum y-coordinates for each x-position
- Supporting separate tracking for upward and downward growth directions
- Adding more detailed logging for positioning decisions
- Preventing ancestor and sibling positions from overlapping

Resolves potential visual conflicts in complex multi-generational family tree layouts
2025-11-02 14:22:13 +01:00
AlexKucera 18fd58972f Enhance canvas generator with advanced tree layout
Refactors canvas generation to support more complex family tree visualization

Introduces sophisticated layout algorithms for:
- Generational positioning of individuals
- Handling spouse and children relationships
- Vertical and horizontal spacing strategies
- Support for disconnected family trees

Improves visual representation of genealogical data with more nuanced node placement and connection logic
2025-11-02 14:08:23 +01:00
AlexKucera cb960c41fc Adds Obsidian Canvas family tree generator
Introduces new functionality to create interactive family tree visualizations for Obsidian

Adds:
- CanvasGenerator class to generate JSON Canvas files
- Interactive root person selection for canvas creation
- Support for generational tree layout with nodes and edges
- Handling of disconnected family trees

Enhances family tree visualization by allowing users to generate an Obsidian-compatible canvas with person relationships
2025-11-01 17:14:43 +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 ac05f1ef01 Enhances index generator with subdirectory support
Adds optional subdirectory configuration for people files in index generation

Improves wiki link generation to support nested file structures while maintaining existing functionality
2025-11-01 14:08:15 +01:00
AlexKucera f60690454d Adds flexible directory structure option for GEDCOM export
Introduces new `--flat` flag to control output directory structure

Allows users to choose between:
- Default nested directories (people/, media/, stories/)
- Flat structure with all files in root output directory

Simplifies CLI and provides more flexibility for note organization
2025-11-01 14:08:01 +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 0cf70a57eb Adds GEDCOM file line endings compatibility fix
Detects and converts macOS legacy CR-only line endings to standard Unix LF line endings for GEDCOM file parsing

Improves file parsing robustness by automatically handling files with non-standard line endings from older macOS applications
2025-11-01 13:51:59 +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