Initializes GEDCOM to Markdown converter project #1

Merged
AlexKucera merged 29 commits from initial_features into main 2025-11-02 17:47:20 +01:00
29 Commits
Author SHA1 Message Date
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 c177211359 Renames unused parser variable
The 'parser' variable was assigned but not used. This commit
renames it to '_parser' to indicate that it is intentionally
unused.
2025-11-02 17:44:27 +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 46502f7d66 Ignores unused variable in test
Updates test to ignore the unused `media_dir` variable
returned by `extract_gedzip`. This prevents linting warnings
without changing the functionality of the test.
2025-11-02 16:03:24 +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 c072ebb2cd Updates documentation and gitignore configuration
Improves README formatting and readability
Adds output and test_output directories to gitignore
Adjusts code block formatting and syntax highlighting
2025-11-02 14:30:54 +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
AlexKucera b073ec1f1a Merge pull request #2 from AlexKucera/coderabbitai/docstrings/24ebaea
📝 Add docstrings to `initial_features`
2025-11-01 14:16:21 +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 24ebaea8d9 Adds CodeRabbit PR review badge to README
Enhances project documentation with a visual indicator of CodeRabbit PR review status

Improves README by adding a GitHub-hosted badge that provides insights into the project's pull request review process
2025-11-01 14:13:21 +01:00
AlexKucera 939196329d Updates README with comprehensive project documentation
Enhances project description with detailed usage instructions, features, and best practices

Adds sections on:
- Expanded feature list
- Detailed installation and usage guidelines
- Directory structure explanation
- Output format description
- Common issues and compatibility notes

Improves overall documentation clarity and user onboarding experience
2025-11-01 14:08:45 +01: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
AlexKucera f1a372e6b4 Update .gitignore with additional entries
Adds macOS system file and examples directory to ignored files

Prevents unnecessary files from being tracked in the repository
2025-10-31 14:44:01 +01:00