Introduces a comprehensive Python-based GEDCOM file converter for generating Obsidian-compatible markdown notes:
Features
Parses GEDCOM genealogy files with robust error handling
Extracts comprehensive individual data including:
Personal attributes
Life events
Family relationships
Images and media
Narrative stories
Generates Obsidian-compatible markdown notes with WikiLinks
Supports flexible output directory structures
Handles GEDZIP archives and media file management
Fixes line ending compatibility issues for GEDCOM files
Key Components
GEDCOM parser with line ending detection
Individual data model for rich genealogical information
Markdown note generator with comprehensive metadata
Flexible index file generation
Command-line interface for easy conversion
Improvements
Supports multiple marriages
Extracts and links story narratives
Handles custom genealogy software tags
Provides configurable output options
Summary by CodeRabbit
New Features
Full GEDCOM→Markdown tool with CLI, per-person Obsidian-style notes, media handling, story files, and optional alphabetical index.
Documentation
Added developer guidance and updated README header/badge.
Tests
Comprehensive test suites for parsing, indexing, individual data, markdown generation, and CLI workflows.
Chores
Added test configuration, dependency list, and updated ignore rules (.DS_Store, examples/, output/, test_output/).
Introduces a comprehensive Python-based GEDCOM file converter for generating Obsidian-compatible markdown notes:
## Features
- Parses GEDCOM genealogy files with robust error handling
- Extracts comprehensive individual data including:
- Personal attributes
- Life events
- Family relationships
- Images and media
- Narrative stories
- Generates Obsidian-compatible markdown notes with WikiLinks
- Supports flexible output directory structures
- Handles GEDZIP archives and media file management
- Fixes line ending compatibility issues for GEDCOM files
## Key Components
- GEDCOM parser with line ending detection
- Individual data model for rich genealogical information
- Markdown note generator with comprehensive metadata
- Flexible index file generation
- Command-line interface for easy conversion
## Improvements
- Supports multiple marriages
- Extracts and links story narratives
- Handles custom genealogy software tags
- Provides configurable output options
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **New Features**
* Full GEDCOM→Markdown tool with CLI, per-person Obsidian-style notes, media handling, story files, and optional alphabetical index.
* **Documentation**
* Added developer guidance and updated README header/badge.
* **Tests**
* Comprehensive test suites for parsing, indexing, individual data, markdown generation, and CLI workflows.
* **Chores**
* Added test configuration, dependency list, and updated ignore rules (.DS_Store, examples/, output/, test_output/).
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@AlexKucera has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 32 seconds before requesting another review.
⌛ How to resolve this issue?
After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.
We recommend that you space out your commits to avoid hitting the rate limit.
🚦 How do rate limits work?
CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Reviewing files that changed from the base of the PR and between 17c97b5188 and 85c67e8190.
📒 Files selected for processing (3)
src/main.py (1 hunks)
src/markdown_generator.py (1 hunks)
tests/test_gedcom_parser.py (1 hunks)
Walkthrough
Adds a GEDCOM-to-Markdown toolset: parser, Individual model, Markdown and index generators, CLI with ZIP/media support, pytest configuration and extensive tests, documentation, requirements, and .gitignore additions.
Changes
Cohort / File(s)
Summary
Repository config & ignores \.gitignore
Adds ignore entries: .DS_Store, examples/, output/, and test_output/.
Dependencies & test config requirements.txt, pytest.ini
Adds requirements.txt with python-gedcom==1.0.0, pytest>=7.4.0, pytest-cov>=4.1.0; adds pytest.ini with test discovery and coverage settings.
Documentation CLAUDE.md, README.md
Adds CLAUDE.md guidance for repository usage; replaces README top header with a CodeRabbit PR badge image.
Parser src/gedcom_parser.py
New GedcomParser: validates input path, fixes CR-only line endings in-place, parses GEDCOM, logs steps, exposes get_individuals() and get_element_by_pointer().
Data model src/individual.py
New Individual wrapper exposing IDs, names, birth/death, gender, relationships, events, media, notes, stories, and attribute accessors; resolves cross-references via parser.
Markdown generation src/markdown_generator.py
New MarkdownGenerator: renders Obsidian-compatible notes, generates separate story files, handles media paths and cross-links, supports batch generation and configurable subdirs.
Index generator src/index_generator.py
New IndexGenerator: produces alphabetical Index.md grouped by last-name initial with wiki-style links and life spans.
CLI & workflow src/main.py
New CLI and functions: setup_logging, extract_gedzip (ZIP extraction), convert_gedcom_to_markdown (conversion pipeline, media copying, optional index, flat/nested output), and main().
Unit tests — index generator tests/test_index_generator.py
Tests alphabetical index creation, grouping, wiki links, life-span formatting, and edge cases.
Unit tests — individual model tests/test_individual.py
Tests Individual extraction for names, dates, events, relationships, media, notes, stories, and attributes.
Unit tests — CLI workflow tests/test_main.py
Tests CLI behaviors: logging, ZIP extraction scenarios, conversion flow, argument parsing, media handling, and error cases.
Unit tests — markdown generator tests/test_markdown_generator.py
Tests Markdown note generation, metadata formatting, families/parents/children, images, story file generation and linking, and duplicate suppression.
Sequence Diagram(s)
sequenceDiagram
actor User
User->>+main: run CLI (GEDCOM or ZIP, output dir, flags)
alt input is ZIP
main->>+extract_gedzip: extract archive, find .ged and media dir
extract_gedzip-->>-main: (gedcom_file, media_dir?)
end
main->>+GedcomParser: parse(gedcom_file)
GedcomParser->>GedcomParser: fix CR-only line endings (if needed)
GedcomParser-->>-main: parsed elements
main->>+Individual: wrap parsed individuals
loop per individual
main->>+MarkdownGenerator: generate_note(individual)
MarkdownGenerator->>File: write individual note
alt stories present
MarkdownGenerator->>File: write story files (avoid duplicates)
end
end
alt create_index
main->>+IndexGenerator: generate_index(individuals)
IndexGenerator->>File: write Index.md
end
alt media_dir provided
main->>File: copy media -> output/media (resolve collisions)
end
main-->>-User: exit code (0 on success, 1 on error)
src/markdown_generator.py: path handling for media/stories, hidden vs visible metadata, story-file deduplication.
src/main.py: ZIP extraction edge cases, temp-dir cleanup, error/exit codes.
tests/*: fixture correctness (CR-only line endings, stories, attributes) and filesystem isolation.
Poem
🐇 I nibbled through GEDCOM leaves at dawn,
Notes sprouted bright where tangled roots were drawn.
Stories hopped out, with images in tow,
An index sprang up where family names now grow.
Hooray — the warren’s Markdown garden glows! 🌿✨
Pre-merge checks and finishing touches
✅ Passed checks (3 passed)
Check name
Status
Explanation
Description Check
✅ Passed
Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check
✅ Passed
The pull request title "Initializes GEDCOM to Markdown converter project" accurately and specifically describes the main objective of the changeset. The PR introduces a comprehensive new project with all foundational components including a GEDCOM parser, individual data model, markdown generator, index generator, CLI, supporting configuration files, and a complete test suite. The title is concise, clear, and avoids generic language or noise. It directly conveys that this is an initial project setup rather than a feature addition or bug fix to an existing codebase.
Docstring Coverage
✅ Passed
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
<!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- This is an auto-generated comment: rate limited by coderabbit.ai -->
> [!WARNING]
> ## Rate limit exceeded
>
> @AlexKucera has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait **14 minutes and 32 seconds** before requesting another review.
>
> <details>
> <summary>⌛ How to resolve this issue?</summary>
>
> After the wait time has elapsed, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR.
>
> We recommend that you space out your commits to avoid hitting the rate limit.
>
> </details>
>
>
> <details>
> <summary>🚦 How do rate limits work?</summary>
>
> CodeRabbit enforces hourly rate limits for each developer per organization.
>
> Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
>
> Please see our [FAQ](https://docs.coderabbit.ai/faq) for further information.
>
> </details>
>
> <details>
> <summary>📥 Commits</summary>
>
> Reviewing files that changed from the base of the PR and between 17c97b51884f9a1a0105bd8fc2906a32c9e76c1a and 85c67e81905d499dda5864ad72513fd42a815e66.
>
> </details>
>
> <details>
> <summary>📒 Files selected for processing (3)</summary>
>
> * `src/main.py` (1 hunks)
> * `src/markdown_generator.py` (1 hunks)
> * `tests/test_gedcom_parser.py` (1 hunks)
>
> </details>
<!-- end of auto-generated comment: rate limited by coderabbit.ai -->
<!-- walkthrough_start -->
## Walkthrough
Adds a GEDCOM-to-Markdown toolset: parser, Individual model, Markdown and index generators, CLI with ZIP/media support, pytest configuration and extensive tests, documentation, requirements, and .gitignore additions.
## Changes
| Cohort / File(s) | Summary |
|---|---|
| **Repository config & ignores** <br> `\.gitignore` | Adds ignore entries: `.DS_Store`, `examples/`, `output/`, and `test_output/`. |
| **Dependencies & test config** <br> `requirements.txt`, `pytest.ini` | Adds `requirements.txt` with `python-gedcom==1.0.0`, `pytest>=7.4.0`, `pytest-cov>=4.1.0`; adds `pytest.ini` with test discovery and coverage settings. |
| **Documentation** <br> `CLAUDE.md`, `README.md` | Adds `CLAUDE.md` guidance for repository usage; replaces README top header with a CodeRabbit PR badge image. |
| **Parser** <br> `src/gedcom_parser.py` | New `GedcomParser`: validates input path, fixes CR-only line endings in-place, parses GEDCOM, logs steps, exposes `get_individuals()` and `get_element_by_pointer()`. |
| **Data model** <br> `src/individual.py` | New `Individual` wrapper exposing IDs, names, birth/death, gender, relationships, events, media, notes, stories, and attribute accessors; resolves cross-references via parser. |
| **Markdown generation** <br> `src/markdown_generator.py` | New `MarkdownGenerator`: renders Obsidian-compatible notes, generates separate story files, handles media paths and cross-links, supports batch generation and configurable subdirs. |
| **Index generator** <br> `src/index_generator.py` | New `IndexGenerator`: produces alphabetical `Index.md` grouped by last-name initial with wiki-style links and life spans. |
| **CLI & workflow** <br> `src/main.py` | New CLI and functions: `setup_logging`, `extract_gedzip` (ZIP extraction), `convert_gedcom_to_markdown` (conversion pipeline, media copying, optional index, flat/nested output), and `main()`. |
| **Tests package & fixtures** <br> `tests/__init__.py`, `tests/conftest.py` | Adds tests package init and pytest fixtures (temp dirs, sample GEDCOMs including CR-only, stories, attributes, and output_dir). |
| **Unit tests — parser** <br> `tests/test_gedcom_parser.py` | Tests GedcomParser loading, errors, line-ending fixes, individual extraction, and pointer lookups. |
| **Unit tests — index generator** <br> `tests/test_index_generator.py` | Tests alphabetical index creation, grouping, wiki links, life-span formatting, and edge cases. |
| **Unit tests — individual model** <br> `tests/test_individual.py` | Tests Individual extraction for names, dates, events, relationships, media, notes, stories, and attributes. |
| **Unit tests — CLI workflow** <br> `tests/test_main.py` | Tests CLI behaviors: logging, ZIP extraction scenarios, conversion flow, argument parsing, media handling, and error cases. |
| **Unit tests — markdown generator** <br> `tests/test_markdown_generator.py` | Tests Markdown note generation, metadata formatting, families/parents/children, images, story file generation and linking, and duplicate suppression. |
## Sequence Diagram(s)
```mermaid
sequenceDiagram
actor User
User->>+main: run CLI (GEDCOM or ZIP, output dir, flags)
alt input is ZIP
main->>+extract_gedzip: extract archive, find .ged and media dir
extract_gedzip-->>-main: (gedcom_file, media_dir?)
end
main->>+GedcomParser: parse(gedcom_file)
GedcomParser->>GedcomParser: fix CR-only line endings (if needed)
GedcomParser-->>-main: parsed elements
main->>+Individual: wrap parsed individuals
loop per individual
main->>+MarkdownGenerator: generate_note(individual)
MarkdownGenerator->>File: write individual note
alt stories present
MarkdownGenerator->>File: write story files (avoid duplicates)
end
end
alt create_index
main->>+IndexGenerator: generate_index(individuals)
IndexGenerator->>File: write Index.md
end
alt media_dir provided
main->>File: copy media -> output/media (resolve collisions)
end
main-->>-User: exit code (0 on success, 1 on error)
```
## Estimated code review effort
🎯 4 (Complex) | ⏱️ ~60 minutes
- Focus review on:
- src/individual.py: cross-reference resolution, nullable fields, filename safety.
- src/markdown_generator.py: path handling for media/stories, hidden vs visible metadata, story-file deduplication.
- src/main.py: ZIP extraction edge cases, temp-dir cleanup, error/exit codes.
- tests/*: fixture correctness (CR-only line endings, stories, attributes) and filesystem isolation.
## Poem
> 🐇 I nibbled through GEDCOM leaves at dawn,
> Notes sprouted bright where tangled roots were drawn.
> Stories hopped out, with images in tow,
> An index sprang up where family names now grow.
> Hooray — the warren’s Markdown garden glows! 🌿✨
<!-- walkthrough_end -->
<!-- pre_merge_checks_walkthrough_start -->
## Pre-merge checks and finishing touches
<details>
<summary>✅ Passed checks (3 passed)</summary>
| Check name | Status | Explanation |
| :----------------: | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title Check | ✅ Passed | The pull request title "Initializes GEDCOM to Markdown converter project" accurately and specifically describes the main objective of the changeset. The PR introduces a comprehensive new project with all foundational components including a GEDCOM parser, individual data model, markdown generator, index generator, CLI, supporting configuration files, and a complete test suite. The title is concise, clear, and avoids generic language or noise. It directly conveys that this is an initial project setup rather than a feature addition or bug fix to an existing codebase. |
| Docstring Coverage | ✅ Passed | Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. |
</details>
<!-- pre_merge_checks_walkthrough_end -->
<!-- tips_start -->
---
Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=AlexKucera/gedcom-to-markdown&utm_content=1)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
<details>
<summary>❤️ Share</summary>
- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
</details>
<sub>Comment `@coderabbitai help` to get the list of available commands and usage tips.</sub>
<!-- tips_end -->
<!-- internal state start -->
<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKPR1AGxJcAkhnXwaB7wAF7SkADiAKIAIgDCAPIAspAEkEnOANa0+ADuWEwYUhQ0fLz4ImKQABS2kGYAjACUkJAGAKo2ADJcsLi43IgcAPTDROqw2AIaTMzDAIJeAB4A0tgMymN0s2AEYMxZOfnD3NgeHsMNrR2IlFyLJKvrytcAyvjYFBuQAlQYDLAuPB/OIggB9ABmJGon3CgCTCGDOUi4H5/AFcA7At64GFDfjcMjXOIUaE0ejULgAJgADJSAKxgBoNMDUhrQBoAZg41IAnBwORyAFpGGLSBgUeDccT4DAcAxQea0WjINDWWS4WAysACNC3ejReLJXaEDIUbJ5Aoy4qlSCkchUcQYIiQBICRDwWiBDBgWbcajwAReSAYfA0RAaeWQABipNhQwMrSgNkE2EQKINiRSfoo7qdkFyE0gwXIYDInrzShoYngMvQGHolAo+D4sEwtGLRAA3JAIfAluFiyRIGXgc7ff61MFcPIkA5pBHE5AoktcFRq7X8BCFMxeCRYGR3VIUPXJB7sEFILRqGguASczKL9RVwG8NIADRF+BQ4dSDC4RAfhCaDMPAHjyCSHj+jKiAIIMH7wAcpCIMMbCemgH5tsGzgOpIQ5ps28DzgmuiQK82DcNwzYohCzaQMwZziNwQYHBQEpoEhdb0AwqYEMwtpkNCHj4EQ8iIJuuC5M4Q44kQ4bEVAprmvk/H2lBWAFhqkAAOrwJk8BdMCmQqvW267vuGCHkObA4leOILiRUbLAGQYfAMeCXvAJJiM2omrusuBxh+hS9kQnwqEGwJKEsPagUOdrKN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MCDIQ2SEpCr/YiGv9r/DD15FSPVuwIYC/XihQx9AIAA -->
<!-- internal state end -->
This documentation provides valuable context for AI code assistants:
Clear project overview and architecture description
Practical setup and usage examples
Detailed implementation insights
Common issues and troubleshooting guidance
Code style expectations
This will significantly improve the quality of AI-assisted development on this project.
requirements.txt (1)
1-3: All dependencies are current and secure—no issues found.
python-gedcom==1.0.0 is pinned to the latest stable version (no vulnerabilities)
pytest>=7.4.0 and pytest-cov>=4.1.0 use flexible constraints allowing updates (no vulnerabilities)
No known security advisories for any package
**Actionable comments posted: 4**
<details>
<summary>🧹 Nitpick comments (2)</summary><blockquote>
<details>
<summary>README.md (1)</summary><blockquote>
`61-61`: **Consider improving documentation formatting.**
A few optional improvements for documentation quality:
1. **Line 61, 135, 156**: Add language identifiers to fenced code blocks for proper syntax highlighting (e.g., ` ```plaintext ` or ` ```text `)
2. **Line 102**: Use "long-form" (hyphenated) instead of "long form" per standard English usage
Apply these changes for improved formatting:
**For code blocks without language:**
```diff
-```
+```text
output/
├── Index.md # Alphabetical index of all people
...
```
**For grammar:**
```diff
-**Using long form arguments:**
+**Using long-form arguments:**
```
Also applies to: 102-102, 135-135, 156-156
</blockquote></details>
<details>
<summary>tests/test_gedcom_parser.py (1)</summary><blockquote>
`15-16`: **Consider using a more maintainable import approach.**
The `sys.path` manipulation works but isn't ideal for long-term maintenance. Consider these alternatives:
- Install the package in development mode: `pip install -e .`
- Set `PYTHONPATH` in test configuration
- Use pytest's built-in `pythonpath` configuration in `pytest.ini`
Add to `pytest.ini`:
```diff
[pytest]
testpaths = tests
+pythonpath = src
```
Then remove lines 15-16 from the test file.
</blockquote></details>
</blockquote></details>
<details>
<summary>📜 Review details</summary>
**Configuration used**: CodeRabbit UI
**Review profile**: CHILL
**Plan**: Pro
<details>
<summary>📥 Commits</summary>
Reviewing files that changed from the base of the PR and between 69ee4555f5b8c2b0fb0279b311b57ac7dd701bd1 and ecd9889e21aae46522f4c707abaeb8e4f1c01869.
</details>
<details>
<summary>📒 Files selected for processing (17)</summary>
* `.gitignore` (1 hunks)
* `CLAUDE.md` (1 hunks)
* `README.md` (1 hunks)
* `pytest.ini` (1 hunks)
* `requirements.txt` (1 hunks)
* `src/gedcom_parser.py` (1 hunks)
* `src/index_generator.py` (1 hunks)
* `src/individual.py` (1 hunks)
* `src/main.py` (1 hunks)
* `src/markdown_generator.py` (1 hunks)
* `tests/__init__.py` (1 hunks)
* `tests/conftest.py` (1 hunks)
* `tests/test_gedcom_parser.py` (1 hunks)
* `tests/test_index_generator.py` (1 hunks)
* `tests/test_individual.py` (1 hunks)
* `tests/test_main.py` (1 hunks)
* `tests/test_markdown_generator.py` (1 hunks)
</details>
<details>
<summary>🧰 Additional context used</summary>
<details>
<summary>🧬 Code graph analysis (3)</summary>
<details>
<summary>src/index_generator.py (1)</summary><blockquote>
<details>
<summary>src/individual.py (5)</summary>
* `get_names` (49-57)
* `get_file_name` (69-82)
* `get_birth_info` (84-101)
* `get_death_info` (103-117)
* `get_full_name` (59-67)
</details>
</blockquote></details>
<details>
<summary>src/main.py (4)</summary><blockquote>
<details>
<summary>src/gedcom_parser.py (2)</summary>
* `GedcomParser` (19-114)
* `get_individuals` (89-102)
</details>
<details>
<summary>src/individual.py (1)</summary>
* `Individual` (18-466)
</details>
<details>
<summary>src/markdown_generator.py (2)</summary>
* `MarkdownGenerator` (18-498)
* `generate_all` (474-498)
</details>
<details>
<summary>src/index_generator.py (2)</summary>
* `IndexGenerator` (18-104)
* `generate_index` (36-104)
</details>
</blockquote></details>
<details>
<summary>src/markdown_generator.py (1)</summary><blockquote>
<details>
<summary>src/individual.py (15)</summary>
* `Individual` (18-466)
* `get_file_name` (69-82)
* `get_full_name` (59-67)
* `get_birth_info` (84-101)
* `get_death_info` (103-117)
* `get_id` (40-47)
* `get_gender` (119-126)
* `get_attributes` (449-466)
* `get_events` (238-272)
* `get_families` (184-236)
* `get_parents` (128-137)
* `get_children` (139-156)
* `get_images` (274-312)
* `get_notes` (314-352)
* `get_stories` (354-447)
</details>
</blockquote></details>
</details><details>
<summary>🪛 LanguageTool</summary>
<details>
<summary>README.md</summary>
[grammar] ~102-~102: Use a hyphen to join words.
Context: ...utput --flat --verbose ``` **Using long form arguments:** ```bash python src/mai...
(QB_NEW_EN_HYPHEN)
</details>
</details>
<details>
<summary>🪛 markdownlint-cli2 (0.18.1)</summary>
<details>
<summary>README.md</summary>
61-61: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
---
135-135: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
---
156-156: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
</details>
</details>
<details>
<summary>🪛 Ruff (0.14.2)</summary>
<details>
<summary>tests/__init__.py</summary>
1-1: No such file or directory (os error 2)
(E902)
</details>
<details>
<summary>tests/test_gedcom_parser.py</summary>
1-1: No such file or directory (os error 2)
(E902)
</details>
<details>
<summary>src/gedcom_parser.py</summary>
39-39: Avoid specifying long messages outside the exception class
(TRY003)
---
52-52: Avoid specifying long messages outside the exception class
(TRY003)
</details>
<details>
<summary>src/individual.py</summary>
94-94: Unpacked variable `sources` is never used
Prefix it with an underscore or any other dummy variable pattern
(RUF059)
---
112-112: Unpacked variable `sources` is never used
Prefix it with an underscore or any other dummy variable pattern
(RUF059)
</details>
<details>
<summary>tests/test_index_generator.py</summary>
1-1: No such file or directory (os error 2)
(E902)
</details>
<details>
<summary>tests/test_main.py</summary>
1-1: No such file or directory (os error 2)
(E902)
</details>
<details>
<summary>tests/conftest.py</summary>
1-1: No such file or directory (os error 2)
(E902)
</details>
<details>
<summary>tests/test_individual.py</summary>
1-1: No such file or directory (os error 2)
(E902)
</details>
<details>
<summary>src/index_generator.py</summary>
71-71: Unpacked variable `first` is never used
Prefix it with an underscore or any other dummy variable pattern
(RUF059)
</details>
<details>
<summary>src/main.py</summary>
1-1: Shebang is present but file is not executable
(EXE001)
---
70-70: Avoid specifying long messages outside the exception class
(TRY003)
---
185-185: Consider moving this statement to an `else` block
(TRY300)
---
188-188: Use `logging.exception` instead of `logging.error`
Replace with `exception`
(TRY400)
---
191-191: Use `logging.exception` instead of `logging.error`
Replace with `exception`
(TRY400)
</details>
<details>
<summary>tests/test_markdown_generator.py</summary>
1-1: No such file or directory (os error 2)
(E902)
</details>
<details>
<summary>src/markdown_generator.py</summary>
46-46: Avoid specifying long messages outside the exception class
(TRY003)
---
48-48: Avoid specifying long messages outside the exception class
(TRY003)
---
98-98: Docstring contains ambiguous `–` (EN DASH). Did you mean `-` (HYPHEN-MINUS)?
(RUF002)
</details>
</details>
</details>
<details>
<summary>🔇 Additional comments (7)</summary><blockquote>
<details>
<summary>.gitignore (1)</summary><blockquote>
`125-128`: **LGTM!**
The additions are appropriate for this project:
- `.DS_Store` is standard for macOS development environments
- `examples/` directory is a sensible ignore target for a converter tool that generates sample output
</blockquote></details>
<details>
<summary>tests/__init__.py (1)</summary><blockquote>
`1-1`: **LGTM!**
The minimal `__init__.py` with a docstring is standard Python package structure.
</blockquote></details>
<details>
<summary>pytest.ini (1)</summary><blockquote>
`1-12`: **LGTM!**
The pytest configuration follows best practices:
- Proper test discovery settings aligned with project structure
- Branch coverage enabled for comprehensive testing
- Multiple coverage report formats for developer convenience
- Strict markers to catch configuration errors early
</blockquote></details>
<details>
<summary>tests/conftest.py (1)</summary><blockquote>
`1-174`: **LGTM! Excellent test fixture organization.**
The fixtures are well-designed with:
- Clear separation of concerns (basic GEDCOM, line endings, stories, attributes)
- Comprehensive coverage of test scenarios
- Proper resource cleanup patterns
- Good documentation for each fixture
- Reusable components that support the entire test suite
</blockquote></details>
<details>
<summary>tests/test_gedcom_parser.py (1)</summary><blockquote>
`21-147`: **LGTM! Excellent test coverage and structure.**
The test suite demonstrates strong quality:
- Well-organized test classes by functionality
- Comprehensive scenario coverage (happy paths, errors, edge cases)
- Proper assertions and error handling verification
- Good use of fixtures and test patterns
- Tests for CR-only line endings are particularly valuable given the documented issue
</blockquote></details>
<details>
<summary>CLAUDE.md (1)</summary><blockquote>
`1-137`: **LGTM! Excellent AI-assistance documentation.**
This documentation provides valuable context for AI code assistants:
- Clear project overview and architecture description
- Practical setup and usage examples
- Detailed implementation insights
- Common issues and troubleshooting guidance
- Code style expectations
This will significantly improve the quality of AI-assisted development on this project.
</blockquote></details>
<details>
<summary>requirements.txt (1)</summary><blockquote>
`1-3`: **All dependencies are current and secure—no issues found.**
- `python-gedcom==1.0.0` is pinned to the latest stable version (no vulnerabilities)
- `pytest>=7.4.0` and `pytest-cov>=4.1.0` use flexible constraints allowing updates (no vulnerabilities)
- No known security advisories for any package
</blockquote></details>
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit for review status -->
Line 88 slices the GEDCOM death date (death_info["date"][:4]). For inputs like “15 JUN 2020” that returns “15 J”, so the index shows “1950-15 J”. That’s user-visible and contradicts the intent of the life-span display. Please extract the numeric year instead of blindly slicing the string.
Apply this diff to fix the bug:
--- a/src/index_generator.py
+++ b/src/index_generator.py
@@
-from pathlib import Path
-from typing import List
-import logging
+from pathlib import Path
+from typing import List
+import logging
+import re
@@
- if birth_info["year"] or death_info["date"]:
- death_year = death_info["date"][:4] if death_info["date"] else ""
- life_span = f" ({birth_info['year']}-{death_year})"
+ if birth_info["year"] or death_info["date"]:
+ death_year = ""
+ if death_info["date"]:
+ match = re.search(r"(\d{4})\b", death_info["date"])
+ if match:
+ death_year = match.group(1)
+ life_span = f" ({birth_info['year']}-{death_year})"
else:
life_span = ""
📝 Committable suggestion
‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
if birth_info["year"] or death_info["date"]:
death_year = ""
if death_info["date"]:
match = re.search(r"(\d{4})\b", death_info["date"])
if match:
death_year = match.group(1)
life_span = f" ({birth_info['year']}-{death_year})"
else:
life_span = ""
# Create WikiLink with path prefix if using subdirectories
if self.people_subdir:
wiki_link = f"[[{self.people_subdir}/{filename}|{individual.get_full_name()}]]"
else:
wiki_link = f"[[{filename}]]"
f.write(f"- {wiki_link}{life_span}\n")
_⚠️ Potential issue_ | _🟠 Major_
**Death year parsing outputs “15 J”.**
Line 88 slices the GEDCOM death date (`death_info["date"][:4]`). For inputs like “15 JUN 2020” that returns “15 J”, so the index shows “1950-15 J”. That’s user-visible and contradicts the intent of the life-span display. Please extract the numeric year instead of blindly slicing the string.
Apply this diff to fix the bug:
```diff
--- a/src/index_generator.py
+++ b/src/index_generator.py
@@
-from pathlib import Path
-from typing import List
-import logging
+from pathlib import Path
+from typing import List
+import logging
+import re
@@
- if birth_info["year"] or death_info["date"]:
- death_year = death_info["date"][:4] if death_info["date"] else ""
- life_span = f" ({birth_info['year']}-{death_year})"
+ if birth_info["year"] or death_info["date"]:
+ death_year = ""
+ if death_info["date"]:
+ match = re.search(r"(\d{4})\b", death_info["date"])
+ if match:
+ death_year = match.group(1)
+ life_span = f" ({birth_info['year']}-{death_year})"
else:
life_span = ""
```
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
```suggestion
if birth_info["year"] or death_info["date"]:
death_year = ""
if death_info["date"]:
match = re.search(r"(\d{4})\b", death_info["date"])
if match:
death_year = match.group(1)
life_span = f" ({birth_info['year']}-{death_year})"
else:
life_span = ""
# Create WikiLink with path prefix if using subdirectories
if self.people_subdir:
wiki_link = f"[[{self.people_subdir}/{filename}|{individual.get_full_name()}]]"
else:
wiki_link = f"[[{filename}]]"
f.write(f"- {wiki_link}{life_span}\n")
```
</details>
<!-- suggestion_end -->
<!-- fingerprinting:phantom:medusa:sabertoothed -->
<!-- This is an auto-generated comment by CodeRabbit -->
✅ Addressed in commits c072ebb to b335a13
Fix media directory discovery to cover all extracted assets.
Line 82 only records the parent directory of the first image found, then stops. If the GEDZIP contains media spread across different folders (a common layout with /media/photos, /media/documents, etc.), everything outside that first parent is silently ignored, so the converter never copies most assets. Please scan the entire extracted tree (e.g., with Path.rglob) and hand the downstream converter either the extraction root or a list of media roots so every image remains reachable. A minimal fix looks like:
- media_dir = None
- for ext in ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.bmp"]:
- media_files = list(temp_dir.glob(f"**/{ext}"))
- if media_files:
- media_dir = media_files[0].parent
- logger.info(f"Found {len(media_files)} media files in: {media_dir}")
- break
+ media_dir = None
+ media_patterns = ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.bmp"]
+ media_files = [
+ path
+ for pattern in media_patterns
+ for path in temp_dir.rglob(pattern)
+ ]
+ if media_files:
+ media_dir = temp_dir
+ logger.info(f"Found {len(media_files)} media files under: {media_dir}")
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In src/main.py around lines 82 to 88, the current loop stops at the first image
parent and ignores media in other folders; update the discovery to scan the
whole extracted tree (use temp_dir.rglob("*.{jpg,jpeg,png,gif,bmp}") or
equivalent) and then either set media_dir to the extraction root (temp_dir) or
collect the set of unique parent directories for all matches and pass that list
to the downstream converter so every asset is reachable; replace the current
per-extension loop/first-parent break with this full-tree rglob approach and log
the total files and chosen root(s).
_⚠️ Potential issue_ | _🟠 Major_
**Fix media directory discovery to cover all extracted assets.**
Line 82 only records the parent directory of the *first* image found, then stops. If the GEDZIP contains media spread across different folders (a common layout with `/media/photos`, `/media/documents`, etc.), everything outside that first parent is silently ignored, so the converter never copies most assets. Please scan the entire extracted tree (e.g., with `Path.rglob`) and hand the downstream converter either the extraction root or a list of media roots so every image remains reachable. A minimal fix looks like:
```diff
- media_dir = None
- for ext in ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.bmp"]:
- media_files = list(temp_dir.glob(f"**/{ext}"))
- if media_files:
- media_dir = media_files[0].parent
- logger.info(f"Found {len(media_files)} media files in: {media_dir}")
- break
+ media_dir = None
+ media_patterns = ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.bmp"]
+ media_files = [
+ path
+ for pattern in media_patterns
+ for path in temp_dir.rglob(pattern)
+ ]
+ if media_files:
+ media_dir = temp_dir
+ logger.info(f"Found {len(media_files)} media files under: {media_dir}")
```
> Committable suggestion skipped: line range outside the PR's diff.
<details>
<summary>🤖 Prompt for AI Agents</summary>
```
In src/main.py around lines 82 to 88, the current loop stops at the first image
parent and ignores media in other folders; update the discovery to scan the
whole extracted tree (use temp_dir.rglob("*.{jpg,jpeg,png,gif,bmp}") or
equivalent) and then either set media_dir to the extraction root (temp_dir) or
collect the set of unique parent directories for all matches and pass that list
to the downstream converter so every asset is reachable; replace the current
per-extension loop/first-parent break with this full-tree rglob approach and log
the total files and chosen root(s).
```
</details>
<!-- fingerprinting:phantom:medusa:sabertoothed -->
<!-- This is an auto-generated comment by CodeRabbit -->
✅ Addressed in commits c072ebb to b335a13
Preserve media structure and avoid silent overwrites.
Lines 165-182 flatten every media file into a single directory via media_file.name, so two different files named image.jpg will clobber one another. You also miss any assets nested beneath subdirectories because glob(ext) is non-recursive. To prevent data loss, traverse the media tree recursively, copy only allowed file types, and keep the relative directory structure intact while guarding against overwrites:
- media_files = []
- for ext in [
- "*.jpg",
- "*.jpeg",
- "*.png",
- "*.gif",
- "*.bmp",
- "*.JPG",
- "*.JPEG",
- "*.PNG",
- ]:
- media_files.extend(media_dir.glob(ext))
-
- copied_count = 0
- for media_file in media_files:
- dest = media_output_dir / media_file.name
- shutil.copy2(media_file, dest)
- copied_count += 1
+ allowed_suffixes = {".jpg", ".jpeg", ".png", ".gif", ".bmp"}
+ copied_count = 0
+ for media_file in media_dir.rglob("*"):
+ if not media_file.is_file():
+ continue
+ if media_file.suffix.lower() not in allowed_suffixes:
+ continue
+
+ relative_path = media_file.relative_to(media_dir)
+ dest = media_output_dir / relative_path
+ dest.parent.mkdir(parents=True, exist_ok=True)
+
+ if dest.exists():
+ logger.warning(f"Skipped duplicate media file: {dest}")
+ continue
+
+ shutil.copy2(media_file, dest)
+ copied_count += 1
🤖 Prompt for AI Agents
In src/main.py around lines 162 to 183, the current code flattens media into one
folder and non-recursively globbing which causes collisions and misses nested
assets; change to recursively traverse (use Path.rglob or walk), filter by
allowed extensions (case-insensitive, e.g., check media_file.suffix.lower() in a
set), compute the relative path via media_file.relative_to(media_dir) and create
dest = media_output_dir / relative_path, ensure dest.parent.exists()
(mkdir(parents=True, exist_ok=True)) before copying, and guard against
overwrites by checking if dest.exists() and then either skip and log or append a
numeric suffix to the filename (e.g., name_1.jpg) to avoid silent clobbering
while incrementing a counter.
_⚠️ Potential issue_ | _🟠 Major_
**Preserve media structure and avoid silent overwrites.**
Lines 165-182 flatten every media file into a single directory via `media_file.name`, so two different files named `image.jpg` will clobber one another. You also miss any assets nested beneath subdirectories because `glob(ext)` is non-recursive. To prevent data loss, traverse the media tree recursively, copy only allowed file types, and keep the relative directory structure intact while guarding against overwrites:
```diff
- media_files = []
- for ext in [
- "*.jpg",
- "*.jpeg",
- "*.png",
- "*.gif",
- "*.bmp",
- "*.JPG",
- "*.JPEG",
- "*.PNG",
- ]:
- media_files.extend(media_dir.glob(ext))
-
- copied_count = 0
- for media_file in media_files:
- dest = media_output_dir / media_file.name
- shutil.copy2(media_file, dest)
- copied_count += 1
+ allowed_suffixes = {".jpg", ".jpeg", ".png", ".gif", ".bmp"}
+ copied_count = 0
+ for media_file in media_dir.rglob("*"):
+ if not media_file.is_file():
+ continue
+ if media_file.suffix.lower() not in allowed_suffixes:
+ continue
+
+ relative_path = media_file.relative_to(media_dir)
+ dest = media_output_dir / relative_path
+ dest.parent.mkdir(parents=True, exist_ok=True)
+
+ if dest.exists():
+ logger.warning(f"Skipped duplicate media file: {dest}")
+ continue
+
+ shutil.copy2(media_file, dest)
+ copied_count += 1
```
<details>
<summary>🤖 Prompt for AI Agents</summary>
```
In src/main.py around lines 162 to 183, the current code flattens media into one
folder and non-recursively globbing which causes collisions and misses nested
assets; change to recursively traverse (use Path.rglob or walk), filter by
allowed extensions (case-insensitive, e.g., check media_file.suffix.lower() in a
set), compute the relative path via media_file.relative_to(media_dir) and create
dest = media_output_dir / relative_path, ensure dest.parent.exists()
(mkdir(parents=True, exist_ok=True)) before copying, and guard against
overwrites by checking if dest.exists() and then either skip and log or append a
numeric suffix to the filename (e.g., name_1.jpg) to avoid silent clobbering
while incrementing a counter.
```
</details>
<!-- fingerprinting:phantom:medusa:sabertoothed -->
<!-- This is an auto-generated comment by CodeRabbit -->
✅ Addressed in commits c072ebb to b335a13
Ensure families without a recorded partner still list their children.
The guard on Line 199 skips the entire block whenever family["partner"] is missing. For single-parent families (or GEDCOM records missing a spouse pointer), that means we never emit the family section, the children are dropped altogether, and _write_children will not backfill because get_families() is truthy. Users lose visibility into those relationships. Render families even when only children or marriage metadata is present:
- for i, family in enumerate(families, 1):
- if family["partner"]:
- partner_name = family["partner"].get_file_name()
- f.write(f"### Marriage {i if len(families) > 1 else ''}\n")
- self._write_metadata_hidden(f, "Partner", self._wiki_link(partner_name))
+ for i, family in enumerate(families, 1):
+ has_partner = family["partner"] is not None
+ has_children = bool(family["children"])
+ has_marriage_details = bool(family["marriage_date"] or family["marriage_place"])
+ if not (has_partner or has_children or has_marriage_details):
+ continue
+
+ suffix = f" {i}" if len(families) > 1 else ""
+ heading = "Marriage" if has_partner else "Family"
+ f.write(f"### {heading}{suffix}\n")
+ if has_partner:
+ partner_name = family["partner"].get_file_name()
+ self._write_metadata_hidden(
+ f, "Partner", self._wiki_link(partner_name)
+ )
@@
- if family["children"]:
- f.write("\n**Children:**\n")
- for child in family["children"]:
- self._write_metadata_hidden(
- f, "Child", self._wiki_link(child.get_file_name())
- )
+ if family["children"]:
+ f.write("\n**Children:**\n")
+ for child in family["children"]:
+ self._write_metadata_hidden(
+ f, "Child", self._wiki_link(child.get_file_name())
+ )
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In src/markdown_generator.py around lines 198 to 222, the current code skips
emitting a family section whenever family["partner"] is falsy which drops
children for single-parent or spouse-missing records; change the logic to always
render the family block (write the "Marriage" header and any marriage metadata),
only write the Partner metadata if family["partner"] is present, and still write
the children list when family["children"] exists; keep the existing marriage
numbering logic and blank-line spacing, and ensure partner-related calls like
get_file_name() are only invoked under the partner-present conditional to avoid
attribute errors.
_⚠️ Potential issue_ | _🟠 Major_
**Ensure families without a recorded partner still list their children.**
The guard on Line 199 skips the entire block whenever `family["partner"]` is missing. For single-parent families (or GEDCOM records missing a spouse pointer), that means we never emit the family section, the children are dropped altogether, and `_write_children` will not backfill because `get_families()` is truthy. Users lose visibility into those relationships. Render families even when only children or marriage metadata is present:
```diff
- for i, family in enumerate(families, 1):
- if family["partner"]:
- partner_name = family["partner"].get_file_name()
- f.write(f"### Marriage {i if len(families) > 1 else ''}\n")
- self._write_metadata_hidden(f, "Partner", self._wiki_link(partner_name))
+ for i, family in enumerate(families, 1):
+ has_partner = family["partner"] is not None
+ has_children = bool(family["children"])
+ has_marriage_details = bool(family["marriage_date"] or family["marriage_place"])
+ if not (has_partner or has_children or has_marriage_details):
+ continue
+
+ suffix = f" {i}" if len(families) > 1 else ""
+ heading = "Marriage" if has_partner else "Family"
+ f.write(f"### {heading}{suffix}\n")
+ if has_partner:
+ partner_name = family["partner"].get_file_name()
+ self._write_metadata_hidden(
+ f, "Partner", self._wiki_link(partner_name)
+ )
@@
- if family["children"]:
- f.write("\n**Children:**\n")
- for child in family["children"]:
- self._write_metadata_hidden(
- f, "Child", self._wiki_link(child.get_file_name())
- )
+ if family["children"]:
+ f.write("\n**Children:**\n")
+ for child in family["children"]:
+ self._write_metadata_hidden(
+ f, "Child", self._wiki_link(child.get_file_name())
+ )
```
> Committable suggestion skipped: line range outside the PR's diff.
<details>
<summary>🤖 Prompt for AI Agents</summary>
```
In src/markdown_generator.py around lines 198 to 222, the current code skips
emitting a family section whenever family["partner"] is falsy which drops
children for single-parent or spouse-missing records; change the logic to always
render the family block (write the "Marriage" header and any marriage metadata),
only write the Partner metadata if family["partner"] is present, and still write
the children list when family["children"] exists; keep the existing marriage
numbering logic and blank-line spacing, and ensure partner-related calls like
get_file_name() are only invoked under the partner-present conditional to avoid
attribute errors.
```
</details>
<!-- fingerprinting:phantom:medusa:sabertoothed -->
<!-- This is an auto-generated comment by CodeRabbit -->
✅ Addressed in commits c072ebb to b335a13
coderabbitai[bot]
(Migrated from github.com)
left a comment
Copy link
Copy source
Actionable comments posted: 0
♻️ Duplicate comments (4)
src/index_generator.py (1)
87-100: Fix death-year extraction; slicing still yields “15 J”.
Death years are derived via death_info["date"][:4], so inputs like “15 JUN 2020” surface as “15 J”. This reproduces the bug flagged earlier and leaves the index showing malformed spans such as “1950-15 J”. Please extract the numeric year with a regex (or similar) before formatting the life span.
Apply this diff:
@@
-from pathlib import Path
-from typing import List
-import logging
+from pathlib import Path
+from typing import List
+import logging
+import re
@@
- if birth_info["year"] or death_info["date"]:
- death_year = death_info["date"][:4] if death_info["date"] else ""
- life_span = f" ({birth_info['year']}-{death_year})"
+ if birth_info["year"] or death_info["date"]:
+ birth_year = birth_info["year"]
+ if not birth_year and birth_info["date"]:
+ match = re.search(r"(\d{4})\b", birth_info["date"])
+ if match:
+ birth_year = match.group(1)
+ death_year = ""
+ if death_info["date"]:
+ match = re.search(r"(\d{4})\b", death_info["date"])
+ if match:
+ death_year = match.group(1)
+ if birth_year or death_year:
+ life_span = f" ({birth_year}-{death_year})"
+ else:
+ life_span = ""
else:
life_span = ""
src/main.py (2)
80-90: Fix media directory discovery to cover all extracted assets.
Lines 82-88 record only the parent directory of the first image found, then stop with break. If the GEDZIP contains media spread across different folders (e.g., /media/photos, /media/documents), everything outside that first parent is ignored. The converter will then miss most assets during the copy phase.
Scan the entire extracted tree and set media_dir to the extraction root (temp_dir) so all images remain reachable:
# Find media directory (look for common image extensions)
media_dir = None
- for ext in ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.bmp"]:
- media_files = list(temp_dir.glob(f"**/{ext}"))
- if media_files:
- # Get the common parent directory of media files
- media_dir = media_files[0].parent
- logger.info(f"Found {len(media_files)} media files in: {media_dir}")
- break
+ media_patterns = ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.bmp"]
+ media_files = [
+ path
+ for pattern in media_patterns
+ for path in temp_dir.rglob(pattern)
+ ]
+ if media_files:
+ media_dir = temp_dir
+ logger.info(f"Found {len(media_files)} media files under: {media_dir}")
162-183: Preserve media structure and avoid silent overwrites.
Lines 165-182 flatten every media file into a single directory via media_file.name, so two different files named image.jpg will silently overwrite one another. Additionally, glob(ext) is non-recursive, missing any assets nested in subdirectories.
Traverse the media tree recursively, copy only allowed file types, and preserve the relative directory structure while guarding against overwrites:
- media_files = []
- for ext in [
- "*.jpg",
- "*.jpeg",
- "*.png",
- "*.gif",
- "*.bmp",
- "*.JPG",
- "*.JPEG",
- "*.PNG",
- ]:
- media_files.extend(media_dir.glob(ext))
-
- copied_count = 0
- for media_file in media_files:
- dest = media_output_dir / media_file.name
- shutil.copy2(media_file, dest)
- copied_count += 1
+ allowed_suffixes = {".jpg", ".jpeg", ".png", ".gif", ".bmp"}
+ copied_count = 0
+ for media_file in media_dir.rglob("*"):
+ if not media_file.is_file():
+ continue
+ if media_file.suffix.lower() not in allowed_suffixes:
+ continue
+
+ relative_path = media_file.relative_to(media_dir)
+ dest = media_output_dir / relative_path
+ dest.parent.mkdir(parents=True, exist_ok=True)
+
+ if dest.exists():
+ logger.warning(f"Skipped duplicate media file: {dest}")
+ continue
+
+ shutil.copy2(media_file, dest)
+ copied_count += 1
src/markdown_generator.py (1)
198-222: Ensure families without a recorded partner still list their children.
The guard on Line 199 skips the entire family block whenever family["partner"] is missing. For single-parent families (or GEDCOM records missing a spouse pointer), the family section is never emitted and children are dropped altogether. Since _write_children (line 255) also skips when get_families() is truthy, those children lose visibility entirely.
Render families even when only children or marriage metadata is present:
for i, family in enumerate(families, 1):
- if family["partner"]:
- partner_name = family["partner"].get_file_name()
- f.write(f"### Marriage {i if len(families) > 1 else ''}\n")
- self._write_metadata_hidden(f, "Partner", self._wiki_link(partner_name))
+ has_partner = family["partner"] is not None
+ has_children = bool(family["children"])
+ has_marriage_details = bool(family["marriage_date"] or family["marriage_place"])
+ if not (has_partner or has_children or has_marriage_details):
+ continue
+
+ suffix = f" {i}" if len(families) > 1 else ""
+ heading = "Marriage" if has_partner else "Family"
+ f.write(f"### {heading}{suffix}\n")
+ if has_partner:
+ partner_name = family["partner"].get_file_name()
+ self._write_metadata_hidden(
+ f, "Partner", self._wiki_link(partner_name)
+ )
- if family["marriage_date"]:
- self._write_metadata_hidden(
- f, "Marriage date", family["marriage_date"]
- )
- if family["marriage_place"]:
- self._write_metadata_hidden(
- f, "Marriage place", family["marriage_place"]
- )
+ if family["marriage_date"]:
+ self._write_metadata_hidden(
+ f, "Marriage date", family["marriage_date"]
+ )
+ if family["marriage_place"]:
+ self._write_metadata_hidden(
+ f, "Marriage place", family["marriage_place"]
+ )
- if family["children"]:
- f.write("\n**Children:**\n")
- for child in family["children"]:
- self._write_metadata_hidden(
- f, "Child", self._wiki_link(child.get_file_name())
- )
+ if family["children"]:
+ f.write("\n**Children:**\n")
+ for child in family["children"]:
+ self._write_metadata_hidden(
+ f, "Child", self._wiki_link(child.get_file_name())
+ )
- f.write("\n")
+ f.write("\n")
🧹 Nitpick comments (8)
README.md (1)
61-74: Consider adding language specifiers to code blocks for better rendering.
Some fenced code blocks lack language identifiers, which can impact syntax highlighting and accessibility in rendered Markdown.
As per static analysis hints.
Apply these changes to improve documentation quality:
For directory structure (line 61):
-```
+```text
output/
├── Index.md # Alphabetical index of all people
-```
+```text
WARNING - Detected old Mac-style (CR-only) line endings in GEDCOM file.
Also applies to: 135-142, 156-161
tests/test_main.py (1)
54-134: Consider using underscore prefix for unused variable.
Line 130: The media_dir variable is unpacked but never used in test_extract_gedzip_multiple_gedcom. When a return value is intentionally unused, prefix it with an underscore to signal intent.
27-38: Consider refactoring the parser dependency injection.
Line 38 directly accesses gedcom_parser.parser, creating tight coupling to GedcomParser's internal structure. Throughout the file, wrapped individuals are created with type("", (), {"parser": self.gedcom})(), an unusual pattern that constructs anonymous objects on-the-fly.
Consider storing the parser directly or passing it as a parameter to avoid the coupling and eliminate the repeated anonymous class construction.
Example refactor:
- def __init__(self, element: IndividualElement, gedcom_parser):
+ def __init__(self, element: IndividualElement, parser):
"""
- Create an Individual wrapper around a GEDCOM individual element and its parser.
+ Create an Individual wrapper around a GEDCOM individual element and parser.
- Stores the provided IndividualElement and the parser reference (gedcom_parser.parser) used to resolve cross-references.
+ Stores the provided IndividualElement and parser used to resolve cross-references.
Parameters:
element (IndividualElement): The GEDCOM individual element to wrap.
- gedcom_parser: The GedcomParser instance whose `parser` attribute will be used for resolving references.
+ parser: The parser instance (e.g., gedcom.parser.Parser) used for resolving references.
"""
self.element = element
- self.gedcom = gedcom_parser.parser
+ self.gedcom = parser
Lines 67 and 77 use .title() which capitalizes every word. This may incorrectly capitalize names with particles like "von Neumann" → "Von Neumann" or "de la Cruz" → "De La Cruz". If the GEDCOM already has proper capitalization, consider preserving it or using a more sophisticated name-casing library.
84-114: Remove unused sources variable.
Lines 94 and 112 unpack a sources value that is never used. Prefix with underscore to indicate it's intentionally ignored.
Apply this diff:
- date, place, sources = self.element.get_birth_data()
+ date, place, _sources = self.element.get_birth_data()
year = self.element.get_birth_year()
return {
"date": date or "",
"place": place or "",
"year": str(year) if year != -1 else "",
}
def get_death_info(self) -> Dict[str, str]:
"""
Provide the individual's death date and place.
Returns:
dict: Dictionary with keys:
- date (str): Death date as a string, or '' if unknown.
- place (str): Death place as a string, or '' if unknown.
"""
- date, place, sources = self.element.get_death_data()
+ date, place, _sources = self.element.get_death_data()
src/markdown_generator.py (3)
94-136: Consider robust death year extraction.
Line 113 extracts the death year via death['date'][:4], assuming the date string starts with a four-digit year. GEDCOM dates can use various formats (e.g., "ABT 1850", "1 JAN 1850", "JAN 1850"), and slicing the first four characters may capture incorrect data or include non-numeric prefixes.
Consider using Individual.get_death_info() to provide a separate year field (similar to birth info), or add year-extraction logic that handles common GEDCOM date formats:
# Extract death year more robustlydeath_year=""ifdeath['date']:# Try to extract 4-digit year from various formatsimportreyear_match=re.search(r'\b(\d{4})\b',death['date'])ifyear_match:death_year=year_match.group(1)lived=f"{birth['year']}-{death_year}"
Lines 342 and 364 use media_subdir as a proxy to determine whether subdirectories (people/, stories/) are in use. While this works given the current usage pattern in main.py, it creates implicit coupling. Consider adding an explicit use_subdirectories parameter to make the structure configuration clearer.
463-486: Consider using logging.exception for better error reporting.
Line 481 uses logging.error which doesn't include exception tracebacks by default. For batch processing where individual failures shouldn't halt the entire operation, using logging.exception would provide more debugging context without changing the control flow.
try:
path = self.generate_note(individual)
paths.append(path)
except Exception as e:
- logger.error(
+ logger.exception(
f"Failed to generate note for {individual.get_full_name()}: {e}"
)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 69ee4555f5 and ecd9889e21.
📒 Files selected for processing (17)
.gitignore (1 hunks)
CLAUDE.md (1 hunks)
README.md (1 hunks)
pytest.ini (1 hunks)
requirements.txt (1 hunks)
src/gedcom_parser.py (1 hunks)
src/index_generator.py (1 hunks)
src/individual.py (1 hunks)
src/main.py (1 hunks)
src/markdown_generator.py (1 hunks)
tests/__init__.py (1 hunks)
tests/conftest.py (1 hunks)
tests/test_gedcom_parser.py (1 hunks)
tests/test_index_generator.py (1 hunks)
tests/test_individual.py (1 hunks)
tests/test_main.py (1 hunks)
tests/test_markdown_generator.py (1 hunks)
🧰 Additional context used🪛 LanguageToolREADME.md
[grammar] ~102-~102: Use a hyphen to join words.
Context: ...utput --flat --verbose **Using long form arguments:**bash python src/mai...
(QB_NEW_EN_HYPHEN)
🪛 markdownlint-cli2 (0.18.1)README.md
61-61: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
135-135: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
156-156: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🪛 Ruff (0.14.2)tests/test_gedcom_parser.py
64-64: Local variable parser is assigned to but never used
Remove assignment to unused variable parser
(F841)
78-78: Local variable parser is assigned to but never used
Remove assignment to unused variable parser
(F841)
src/index_generator.py
69-69: Unpacked variable first is never used
Prefix it with an underscore or any other dummy variable pattern
(RUF059)
src/main.py
1-1: Shebang is present but file is not executable
(EXE001)
70-70: Avoid specifying long messages outside the exception class
(TRY003)
194-194: Consider moving this statement to an else block
(TRY300)
197-197: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
200-200: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
src/gedcom_parser.py
39-39: Avoid specifying long messages outside the exception class
(TRY003)
52-52: Avoid specifying long messages outside the exception class
(TRY003)
src/individual.py
94-94: Unpacked variable sources is never used
Prefix it with an underscore or any other dummy variable pattern
(RUF059)
112-112: Unpacked variable sources is never used
Prefix it with an underscore or any other dummy variable pattern
(RUF059)
src/markdown_generator.py
46-46: Avoid specifying long messages outside the exception class
(TRY003)
48-48: Avoid specifying long messages outside the exception class
(TRY003)
98-98: Docstring contains ambiguous – (EN DASH). Did you mean - (HYPHEN-MINUS)?
(RUF002)
480-480: Do not catch blind exception: Exception
(BLE001)
481-483: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
tests/test_main.py
130-130: Unpacked variable media_dir is never used
Prefix it with an underscore or any other dummy variable pattern
(RUF059)
389-391: try-except-pass detected, consider logging the exception
(S110)
389-389: Do not catch blind exception: Exception
(BLE001)
410-412: try-except-pass detected, consider logging the exception
(S110)
410-410: Do not catch blind exception: Exception
(BLE001)
🔇 Additional comments (26)
.gitignore (1)
125-128: LGTM!
The additions are appropriate: .DS_Store prevents macOS system files from being committed, and examples/ excludes sample data from version control.
README.md (1)
1-2: LGTM!
The CodeRabbit badge provides visibility into PR review activity for the project.
pytest.ini (1)
1-12: LGTM!
The pytest configuration is well-structured with appropriate test discovery patterns and comprehensive coverage reporting options (term-missing, HTML, and branch coverage).
tests/__init__.py (1)
1-1: LGTM!
Standard test package initialization with an appropriate docstring.
CLAUDE.md (1)
1-137: LGTM!
Comprehensive documentation providing clear guidance for AI-assisted development. The architecture overview, implementation details, and common issues sections will be valuable for maintaining and extending the project.
tests/test_gedcom_parser.py (4)
1-51: LGTM!
Comprehensive initialization tests covering valid files, missing files, and invalid GEDCOM content. The error handling paths are well-tested.
53-83: LGTM! The unused parser variables are intentional.
The line ending tests correctly verify side effects (file modification) triggered by parser initialization. The parser variable at lines 64 and 78 is intentionally unused because the test is checking file content changes, not parser behavior.
85-111: LGTM!
Individual extraction tests properly validate both populated and empty GEDCOM files, with appropriate type checking for returned elements.
113-147: LGTM!
Element lookup tests comprehensively cover individual, note, and family element retrieval, including the non-existent pointer edge case.
tests/test_main.py (6)
30-52: LGTM!
Logging setup tests properly validate both default INFO and verbose DEBUG level configurations.
136-250: LGTM!
Comprehensive conversion workflow tests covering structured/flat output, index creation, media handling, and error cases (empty GEDCOM, missing files).
371-413: LGTM! Broad exception handling is appropriate for error handling tests.
The try-except blocks at lines 389-391 and 410-412 intentionally catch broad exceptions to verify graceful error handling in the conversion workflow. The bare except Exception and try-except-pass patterns are acceptable in this testing context where the goal is to verify the code doesn't crash on various invalid inputs.
415-455: LGTM!
Media file copying tests validate handling of multiple image formats and the absence of a media directory.
457-481: LGTM!
Temporary directory cleanup test verifies successful completion of the ZIP extraction workflow.
requirements.txt (1)
1-1: No issues found—python-gedcom 1.0.0 is valid and has no known security vulnerabilities.
python-gedcom version 1.0.0 is the latest stable release on PyPI with no recorded CVE or known vulnerabilities. The current pinned version is appropriate and secure.
src/gedcom_parser.py (4)
27-52: LGTM: Clean constructor with robust validation and error handling.
The constructor appropriately validates the file path, remediates line endings, and parses the GEDCOM with clear error messages and proper exception chaining.
54-87: LGTM: Efficient line-ending detection and remediation.
The sampling approach and detection logic correctly identify CR-only files, and the in-place modification is appropriately logged.
The filtering logic and logging are clear and correct.
104-114: LGTM: Clean pointer-based element lookup.
The delegation to the parser's dictionary is straightforward and appropriately documented.
src/main.py (2)
24-39: LGTM: Clean logging configuration.
The logging setup is straightforward with appropriate levels and formatting.
207-298: LGTM: Well-structured CLI with proper resource cleanup.
The argument parsing, validation, and resource cleanup in the finally block follow best practices. The flow is clear and handles both GEDCOM and ZIP inputs appropriately.
src/markdown_generator.py (4)
26-54: LGTM: Solid initialization with validation.
The constructor appropriately validates the output directory and sets up tracking for generated stories to prevent duplicates.
56-83: LGTM: Clean note generation orchestration.
The method properly manages file writing with UTF-8 encoding and calls section writers in a logical order.
272-299: LGTM: Clean image rendering with subdirectory support.
The image section properly handles titles, filenames, and media subdirectory prefixing.
375-425: LGTM: Comprehensive notes and stories integration.
The method properly separates regular notes from stories, generates story files, and creates appropriate wiki links with subdirectory prefixes when configured.
**Actionable comments posted: 0**
<details>
<summary>♻️ Duplicate comments (4)</summary><blockquote>
<details>
<summary>src/index_generator.py (1)</summary><blockquote>
`87-100`: **Fix death-year extraction; slicing still yields “15 J”.**
Death years are derived via `death_info["date"][:4]`, so inputs like “15 JUN 2020” surface as “15 J”. This reproduces the bug flagged earlier and leaves the index showing malformed spans such as “1950-15 J”. Please extract the numeric year with a regex (or similar) before formatting the life span.
Apply this diff:
```diff
@@
-from pathlib import Path
-from typing import List
-import logging
+from pathlib import Path
+from typing import List
+import logging
+import re
@@
- if birth_info["year"] or death_info["date"]:
- death_year = death_info["date"][:4] if death_info["date"] else ""
- life_span = f" ({birth_info['year']}-{death_year})"
+ if birth_info["year"] or death_info["date"]:
+ birth_year = birth_info["year"]
+ if not birth_year and birth_info["date"]:
+ match = re.search(r"(\d{4})\b", birth_info["date"])
+ if match:
+ birth_year = match.group(1)
+ death_year = ""
+ if death_info["date"]:
+ match = re.search(r"(\d{4})\b", death_info["date"])
+ if match:
+ death_year = match.group(1)
+ if birth_year or death_year:
+ life_span = f" ({birth_year}-{death_year})"
+ else:
+ life_span = ""
else:
life_span = ""
```
</blockquote></details>
<details>
<summary>src/main.py (2)</summary><blockquote>
`80-90`: **Fix media directory discovery to cover all extracted assets.**
Lines 82-88 record only the parent directory of the first image found, then stop with `break`. If the GEDZIP contains media spread across different folders (e.g., `/media/photos`, `/media/documents`), everything outside that first parent is ignored. The converter will then miss most assets during the copy phase.
Scan the entire extracted tree and set `media_dir` to the extraction root (`temp_dir`) so all images remain reachable:
```diff
# Find media directory (look for common image extensions)
media_dir = None
- for ext in ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.bmp"]:
- media_files = list(temp_dir.glob(f"**/{ext}"))
- if media_files:
- # Get the common parent directory of media files
- media_dir = media_files[0].parent
- logger.info(f"Found {len(media_files)} media files in: {media_dir}")
- break
+ media_patterns = ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.bmp"]
+ media_files = [
+ path
+ for pattern in media_patterns
+ for path in temp_dir.rglob(pattern)
+ ]
+ if media_files:
+ media_dir = temp_dir
+ logger.info(f"Found {len(media_files)} media files under: {media_dir}")
```
---
`162-183`: **Preserve media structure and avoid silent overwrites.**
Lines 165-182 flatten every media file into a single directory via `media_file.name`, so two different files named `image.jpg` will silently overwrite one another. Additionally, `glob(ext)` is non-recursive, missing any assets nested in subdirectories.
Traverse the media tree recursively, copy only allowed file types, and preserve the relative directory structure while guarding against overwrites:
```diff
- media_files = []
- for ext in [
- "*.jpg",
- "*.jpeg",
- "*.png",
- "*.gif",
- "*.bmp",
- "*.JPG",
- "*.JPEG",
- "*.PNG",
- ]:
- media_files.extend(media_dir.glob(ext))
-
- copied_count = 0
- for media_file in media_files:
- dest = media_output_dir / media_file.name
- shutil.copy2(media_file, dest)
- copied_count += 1
+ allowed_suffixes = {".jpg", ".jpeg", ".png", ".gif", ".bmp"}
+ copied_count = 0
+ for media_file in media_dir.rglob("*"):
+ if not media_file.is_file():
+ continue
+ if media_file.suffix.lower() not in allowed_suffixes:
+ continue
+
+ relative_path = media_file.relative_to(media_dir)
+ dest = media_output_dir / relative_path
+ dest.parent.mkdir(parents=True, exist_ok=True)
+
+ if dest.exists():
+ logger.warning(f"Skipped duplicate media file: {dest}")
+ continue
+
+ shutil.copy2(media_file, dest)
+ copied_count += 1
```
</blockquote></details>
<details>
<summary>src/markdown_generator.py (1)</summary><blockquote>
`198-222`: **Ensure families without a recorded partner still list their children.**
The guard on Line 199 skips the entire family block whenever `family["partner"]` is missing. For single-parent families (or GEDCOM records missing a spouse pointer), the family section is never emitted and children are dropped altogether. Since `_write_children` (line 255) also skips when `get_families()` is truthy, those children lose visibility entirely.
Render families even when only children or marriage metadata is present:
```diff
for i, family in enumerate(families, 1):
- if family["partner"]:
- partner_name = family["partner"].get_file_name()
- f.write(f"### Marriage {i if len(families) > 1 else ''}\n")
- self._write_metadata_hidden(f, "Partner", self._wiki_link(partner_name))
+ has_partner = family["partner"] is not None
+ has_children = bool(family["children"])
+ has_marriage_details = bool(family["marriage_date"] or family["marriage_place"])
+ if not (has_partner or has_children or has_marriage_details):
+ continue
+
+ suffix = f" {i}" if len(families) > 1 else ""
+ heading = "Marriage" if has_partner else "Family"
+ f.write(f"### {heading}{suffix}\n")
+ if has_partner:
+ partner_name = family["partner"].get_file_name()
+ self._write_metadata_hidden(
+ f, "Partner", self._wiki_link(partner_name)
+ )
- if family["marriage_date"]:
- self._write_metadata_hidden(
- f, "Marriage date", family["marriage_date"]
- )
- if family["marriage_place"]:
- self._write_metadata_hidden(
- f, "Marriage place", family["marriage_place"]
- )
+ if family["marriage_date"]:
+ self._write_metadata_hidden(
+ f, "Marriage date", family["marriage_date"]
+ )
+ if family["marriage_place"]:
+ self._write_metadata_hidden(
+ f, "Marriage place", family["marriage_place"]
+ )
- if family["children"]:
- f.write("\n**Children:**\n")
- for child in family["children"]:
- self._write_metadata_hidden(
- f, "Child", self._wiki_link(child.get_file_name())
- )
+ if family["children"]:
+ f.write("\n**Children:**\n")
+ for child in family["children"]:
+ self._write_metadata_hidden(
+ f, "Child", self._wiki_link(child.get_file_name())
+ )
- f.write("\n")
+ f.write("\n")
```
</blockquote></details>
</blockquote></details>
<details>
<summary>🧹 Nitpick comments (8)</summary><blockquote>
<details>
<summary>README.md (1)</summary><blockquote>
`61-74`: **Consider adding language specifiers to code blocks for better rendering.**
Some fenced code blocks lack language identifiers, which can impact syntax highlighting and accessibility in rendered Markdown.
As per static analysis hints.
Apply these changes to improve documentation quality:
**For directory structure (line 61):**
```diff
-```
+```text
output/
├── Index.md # Alphabetical index of all people
```
**For project structure (line 135):**
```diff
-```
+```text
src/
├── gedcom_parser.py # GEDCOM file parsing
```
**For warning message (line 156):**
```diff
-```
+```text
WARNING - Detected old Mac-style (CR-only) line endings in GEDCOM file.
```
Also applies to: 135-142, 156-161
</blockquote></details>
<details>
<summary>tests/test_main.py (1)</summary><blockquote>
`54-134`: **Consider using underscore prefix for unused variable.**
Line 130: The `media_dir` variable is unpacked but never used in `test_extract_gedzip_multiple_gedcom`. When a return value is intentionally unused, prefix it with an underscore to signal intent.
As per static analysis hints.
```diff
- gedcom_file, media_dir = extract_gedzip(zip_path, extract_dir)
+ gedcom_file, _media_dir = extract_gedzip(zip_path, extract_dir)
```
</blockquote></details>
<details>
<summary>src/individual.py (3)</summary><blockquote>
`27-38`: **Consider refactoring the parser dependency injection.**
Line 38 directly accesses `gedcom_parser.parser`, creating tight coupling to GedcomParser's internal structure. Throughout the file, wrapped individuals are created with `type("", (), {"parser": self.gedcom})()`, an unusual pattern that constructs anonymous objects on-the-fly.
Consider storing the parser directly or passing it as a parameter to avoid the coupling and eliminate the repeated anonymous class construction.
Example refactor:
```diff
- def __init__(self, element: IndividualElement, gedcom_parser):
+ def __init__(self, element: IndividualElement, parser):
"""
- Create an Individual wrapper around a GEDCOM individual element and its parser.
+ Create an Individual wrapper around a GEDCOM individual element and parser.
- Stores the provided IndividualElement and the parser reference (gedcom_parser.parser) used to resolve cross-references.
+ Stores the provided IndividualElement and parser used to resolve cross-references.
Parameters:
element (IndividualElement): The GEDCOM individual element to wrap.
- gedcom_parser: The GedcomParser instance whose `parser` attribute will be used for resolving references.
+ parser: The parser instance (e.g., gedcom.parser.Parser) used for resolving references.
"""
self.element = element
- self.gedcom = gedcom_parser.parser
+ self.gedcom = parser
```
Then throughout the file, replace:
```diff
-Individual(p, type("", (), {"parser": self.gedcom})())
+Individual(p, self.gedcom)
```
---
`59-67`: **Consider case-preservation for names.**
Lines 67 and 77 use `.title()` which capitalizes every word. This may incorrectly capitalize names with particles like "von Neumann" → "Von Neumann" or "de la Cruz" → "De La Cruz". If the GEDCOM already has proper capitalization, consider preserving it or using a more sophisticated name-casing library.
---
`84-114`: **Remove unused `sources` variable.**
Lines 94 and 112 unpack a `sources` value that is never used. Prefix with underscore to indicate it's intentionally ignored.
Apply this diff:
```diff
- date, place, sources = self.element.get_birth_data()
+ date, place, _sources = self.element.get_birth_data()
year = self.element.get_birth_year()
return {
"date": date or "",
"place": place or "",
"year": str(year) if year != -1 else "",
}
def get_death_info(self) -> Dict[str, str]:
"""
Provide the individual's death date and place.
Returns:
dict: Dictionary with keys:
- date (str): Death date as a string, or '' if unknown.
- place (str): Death place as a string, or '' if unknown.
"""
- date, place, sources = self.element.get_death_data()
+ date, place, _sources = self.element.get_death_data()
```
</blockquote></details>
<details>
<summary>src/markdown_generator.py (3)</summary><blockquote>
`94-136`: **Consider robust death year extraction.**
Line 113 extracts the death year via `death['date'][:4]`, assuming the date string starts with a four-digit year. GEDCOM dates can use various formats (e.g., "ABT 1850", "1 JAN 1850", "JAN 1850"), and slicing the first four characters may capture incorrect data or include non-numeric prefixes.
Consider using `Individual.get_death_info()` to provide a separate `year` field (similar to birth info), or add year-extraction logic that handles common GEDCOM date formats:
```python
# Extract death year more robustly
death_year = ""
if death['date']:
# Try to extract 4-digit year from various formats
import re
year_match = re.search(r'\b(\d{4})\b', death['date'])
if year_match:
death_year = year_match.group(1)
lived = f"{birth['year']}-{death_year}"
```
---
`339-367`: **Consider explicit subdirectory configuration.**
Lines 342 and 364 use `media_subdir` as a proxy to determine whether subdirectories (`people/`, `stories/`) are in use. While this works given the current usage pattern in `main.py`, it creates implicit coupling. Consider adding an explicit `use_subdirectories` parameter to make the structure configuration clearer.
---
`463-486`: **Consider using logging.exception for better error reporting.**
Line 481 uses `logging.error` which doesn't include exception tracebacks by default. For batch processing where individual failures shouldn't halt the entire operation, using `logging.exception` would provide more debugging context without changing the control flow.
```diff
try:
path = self.generate_note(individual)
paths.append(path)
except Exception as e:
- logger.error(
+ logger.exception(
f"Failed to generate note for {individual.get_full_name()}: {e}"
)
```
</blockquote></details>
</blockquote></details>
<details>
<summary>📜 Review details</summary>
**Configuration used**: CodeRabbit UI
**Review profile**: CHILL
**Plan**: Pro
<details>
<summary>📥 Commits</summary>
Reviewing files that changed from the base of the PR and between 69ee4555f5b8c2b0fb0279b311b57ac7dd701bd1 and ecd9889e21aae46522f4c707abaeb8e4f1c01869.
</details>
<details>
<summary>📒 Files selected for processing (17)</summary>
* `.gitignore` (1 hunks)
* `CLAUDE.md` (1 hunks)
* `README.md` (1 hunks)
* `pytest.ini` (1 hunks)
* `requirements.txt` (1 hunks)
* `src/gedcom_parser.py` (1 hunks)
* `src/index_generator.py` (1 hunks)
* `src/individual.py` (1 hunks)
* `src/main.py` (1 hunks)
* `src/markdown_generator.py` (1 hunks)
* `tests/__init__.py` (1 hunks)
* `tests/conftest.py` (1 hunks)
* `tests/test_gedcom_parser.py` (1 hunks)
* `tests/test_index_generator.py` (1 hunks)
* `tests/test_individual.py` (1 hunks)
* `tests/test_main.py` (1 hunks)
* `tests/test_markdown_generator.py` (1 hunks)
</details>
<details>
<summary>🧰 Additional context used</summary>
<details>
<summary>🪛 LanguageTool</summary>
<details>
<summary>README.md</summary>
[grammar] ~102-~102: Use a hyphen to join words.
Context: ...utput --flat --verbose ``` **Using long form arguments:** ```bash python src/mai...
(QB_NEW_EN_HYPHEN)
</details>
</details>
<details>
<summary>🪛 markdownlint-cli2 (0.18.1)</summary>
<details>
<summary>README.md</summary>
61-61: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
---
135-135: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
---
156-156: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
</details>
</details>
<details>
<summary>🪛 Ruff (0.14.2)</summary>
<details>
<summary>tests/test_gedcom_parser.py</summary>
64-64: Local variable `parser` is assigned to but never used
Remove assignment to unused variable `parser`
(F841)
---
78-78: Local variable `parser` is assigned to but never used
Remove assignment to unused variable `parser`
(F841)
</details>
<details>
<summary>src/index_generator.py</summary>
69-69: Unpacked variable `first` is never used
Prefix it with an underscore or any other dummy variable pattern
(RUF059)
</details>
<details>
<summary>src/main.py</summary>
1-1: Shebang is present but file is not executable
(EXE001)
---
70-70: Avoid specifying long messages outside the exception class
(TRY003)
---
194-194: Consider moving this statement to an `else` block
(TRY300)
---
197-197: Use `logging.exception` instead of `logging.error`
Replace with `exception`
(TRY400)
---
200-200: Use `logging.exception` instead of `logging.error`
Replace with `exception`
(TRY400)
</details>
<details>
<summary>src/gedcom_parser.py</summary>
39-39: Avoid specifying long messages outside the exception class
(TRY003)
---
52-52: Avoid specifying long messages outside the exception class
(TRY003)
</details>
<details>
<summary>src/individual.py</summary>
94-94: Unpacked variable `sources` is never used
Prefix it with an underscore or any other dummy variable pattern
(RUF059)
---
112-112: Unpacked variable `sources` is never used
Prefix it with an underscore or any other dummy variable pattern
(RUF059)
</details>
<details>
<summary>src/markdown_generator.py</summary>
46-46: Avoid specifying long messages outside the exception class
(TRY003)
---
48-48: Avoid specifying long messages outside the exception class
(TRY003)
---
98-98: Docstring contains ambiguous `–` (EN DASH). Did you mean `-` (HYPHEN-MINUS)?
(RUF002)
---
480-480: Do not catch blind exception: `Exception`
(BLE001)
---
481-483: Use `logging.exception` instead of `logging.error`
Replace with `exception`
(TRY400)
</details>
<details>
<summary>tests/test_main.py</summary>
130-130: Unpacked variable `media_dir` is never used
Prefix it with an underscore or any other dummy variable pattern
(RUF059)
---
389-391: `try`-`except`-`pass` detected, consider logging the exception
(S110)
---
389-389: Do not catch blind exception: `Exception`
(BLE001)
---
410-412: `try`-`except`-`pass` detected, consider logging the exception
(S110)
---
410-410: Do not catch blind exception: `Exception`
(BLE001)
</details>
</details>
</details>
<details>
<summary>🔇 Additional comments (26)</summary><blockquote>
<details>
<summary>.gitignore (1)</summary><blockquote>
`125-128`: **LGTM!**
The additions are appropriate: `.DS_Store` prevents macOS system files from being committed, and `examples/` excludes sample data from version control.
</blockquote></details>
<details>
<summary>README.md (1)</summary><blockquote>
`1-2`: **LGTM!**
The CodeRabbit badge provides visibility into PR review activity for the project.
</blockquote></details>
<details>
<summary>pytest.ini (1)</summary><blockquote>
`1-12`: **LGTM!**
The pytest configuration is well-structured with appropriate test discovery patterns and comprehensive coverage reporting options (term-missing, HTML, and branch coverage).
</blockquote></details>
<details>
<summary>tests/__init__.py (1)</summary><blockquote>
`1-1`: **LGTM!**
Standard test package initialization with an appropriate docstring.
</blockquote></details>
<details>
<summary>CLAUDE.md (1)</summary><blockquote>
`1-137`: **LGTM!**
Comprehensive documentation providing clear guidance for AI-assisted development. The architecture overview, implementation details, and common issues sections will be valuable for maintaining and extending the project.
</blockquote></details>
<details>
<summary>tests/test_gedcom_parser.py (4)</summary><blockquote>
`1-51`: **LGTM!**
Comprehensive initialization tests covering valid files, missing files, and invalid GEDCOM content. The error handling paths are well-tested.
---
`53-83`: **LGTM! The unused parser variables are intentional.**
The line ending tests correctly verify side effects (file modification) triggered by parser initialization. The `parser` variable at lines 64 and 78 is intentionally unused because the test is checking file content changes, not parser behavior.
---
`85-111`: **LGTM!**
Individual extraction tests properly validate both populated and empty GEDCOM files, with appropriate type checking for returned elements.
---
`113-147`: **LGTM!**
Element lookup tests comprehensively cover individual, note, and family element retrieval, including the non-existent pointer edge case.
</blockquote></details>
<details>
<summary>tests/test_main.py (6)</summary><blockquote>
`30-52`: **LGTM!**
Logging setup tests properly validate both default INFO and verbose DEBUG level configurations.
---
`136-250`: **LGTM!**
Comprehensive conversion workflow tests covering structured/flat output, index creation, media handling, and error cases (empty GEDCOM, missing files).
---
`252-369`: **LGTM!**
CLI argument parsing tests thoroughly validate all command-line options (input types, flat structure, no-index, verbose) and edge cases (missing files, output directory creation).
---
`371-413`: **LGTM! Broad exception handling is appropriate for error handling tests.**
The try-except blocks at lines 389-391 and 410-412 intentionally catch broad exceptions to verify graceful error handling in the conversion workflow. The bare `except Exception` and `try-except-pass` patterns are acceptable in this testing context where the goal is to verify the code doesn't crash on various invalid inputs.
---
`415-455`: **LGTM!**
Media file copying tests validate handling of multiple image formats and the absence of a media directory.
---
`457-481`: **LGTM!**
Temporary directory cleanup test verifies successful completion of the ZIP extraction workflow.
</blockquote></details>
<details>
<summary>requirements.txt (1)</summary><blockquote>
`1-1`: **No issues found—python-gedcom 1.0.0 is valid and has no known security vulnerabilities.**
python-gedcom version 1.0.0 is the latest stable release on PyPI with no recorded CVE or known vulnerabilities. The current pinned version is appropriate and secure.
</blockquote></details>
<details>
<summary>src/gedcom_parser.py (4)</summary><blockquote>
`27-52`: **LGTM: Clean constructor with robust validation and error handling.**
The constructor appropriately validates the file path, remediates line endings, and parses the GEDCOM with clear error messages and proper exception chaining.
---
`54-87`: **LGTM: Efficient line-ending detection and remediation.**
The sampling approach and detection logic correctly identify CR-only files, and the in-place modification is appropriately logged.
---
`89-102`: **LGTM: Straightforward individual extraction.**
The filtering logic and logging are clear and correct.
---
`104-114`: **LGTM: Clean pointer-based element lookup.**
The delegation to the parser's dictionary is straightforward and appropriately documented.
</blockquote></details>
<details>
<summary>src/main.py (2)</summary><blockquote>
`24-39`: **LGTM: Clean logging configuration.**
The logging setup is straightforward with appropriate levels and formatting.
---
`207-298`: **LGTM: Well-structured CLI with proper resource cleanup.**
The argument parsing, validation, and resource cleanup in the `finally` block follow best practices. The flow is clear and handles both GEDCOM and ZIP inputs appropriately.
</blockquote></details>
<details>
<summary>src/markdown_generator.py (4)</summary><blockquote>
`26-54`: **LGTM: Solid initialization with validation.**
The constructor appropriately validates the output directory and sets up tracking for generated stories to prevent duplicates.
---
`56-83`: **LGTM: Clean note generation orchestration.**
The method properly manages file writing with UTF-8 encoding and calls section writers in a logical order.
---
`272-299`: **LGTM: Clean image rendering with subdirectory support.**
The image section properly handles titles, filenames, and media subdirectory prefixing.
---
`375-425`: **LGTM: Comprehensive notes and stories integration.**
The method properly separates regular notes from stories, generates story files, and creates appropriate wiki links with subdirectory prefixes when configured.
</blockquote></details>
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit for review status -->
coderabbitai[bot]
(Migrated from github.com)
left a comment
Copy link
Copy source
Actionable comments posted: 1
🧹 Nitpick comments (7)
src/markdown_generator.py (1)
486-489: Remove redundant exception object from logging.exception call.
Line 488 passes the exception object {e} in the message string when calling logger.exception(). The exception() method automatically includes exception details, making this redundant.
Apply this diff:
logger.exception(
- f"Failed to generate note for {individual.get_full_name()}: {e}"
+ f"Failed to generate note for {individual.get_full_name()}"
)
Based on static analysis hints.
tests/test_gedcom_parser.py (2)
59-60: Prefix unused parser variable with underscore.
The parser variable is assigned but never used. The test only verifies the side effect of line ending fixes.
Apply this diff:
- # Parse the file (should trigger line ending fix)
- parser = GedcomParser(sample_gedcom_cr_only)
+ # Parse the file (should trigger line ending fix)
+ _parser = GedcomParser(sample_gedcom_cr_only)
Based on static analysis hints.
73-74: Prefix unused parser variable with underscore.
The parser variable is assigned but never used. The test only verifies that parsing doesn't modify the file.
Apply this diff:
- # Parse the file
- parser = GedcomParser(sample_gedcom_file)
+ # Parse the file
+ _parser = GedcomParser(sample_gedcom_file)
Based on static analysis hints.
src/index_generator.py (1)
70-70: Use underscore for unused first name variable.
The unpacked first variable is never used; only last is needed for the letter grouping logic.
Apply this diff:
- first, last = individual.get_names()
+ _, last = individual.get_names()
Based on static analysis hints.
src/main.py (3)
1-1: Make script executable or remove shebang.
The file has a shebang line but isn't marked as executable.
Run this command to make the file executable:
chmod +x src/main.py
Or remove the shebang if the script is not intended to be executed directly.
Based on static analysis hints.
215-217: Use logging.exception for error with exception info.
Line 216 uses logging.error when catching an exception during media file copying. Since this is in an exception handler, logging.exception would be more appropriate and automatically includes the traceback.
Apply this diff:
except (IOError, OSError) as e:
- logger.error(f"Failed to copy {media_file}: {e}")
+ logger.exception(f"Failed to copy {media_file}")
skipped_count += 1
Based on static analysis hints.
235-243: Consider using logging.exception for caught exceptions.
Lines 236 and 239 use logger.error with exc_info=True (line 242). For consistency, consider using logger.exception instead, which is specifically designed for logging exceptions and automatically includes traceback information.
Apply this diff to lines 236 and 239:
except FileNotFoundError as e:
- logger.error(f"File not found: {e}")
+ logger.exception(f"File not found")
return 1
except ValueError as e:
- logger.error(f"Invalid input: {e}")
+ logger.exception(f"Invalid input")
return 1
except Exception as e:
- logger.error(f"Unexpected error: {e}", exc_info=True)
+ logger.exception(f"Unexpected error")
return 1
Based on static analysis hints.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between ecd9889e21 and b335a137d3.
📒 Files selected for processing (12)
.gitignore (1 hunks)
README.md (1 hunks)
pytest.ini (1 hunks)
src/index_generator.py (1 hunks)
src/individual.py (1 hunks)
src/main.py (1 hunks)
src/markdown_generator.py (1 hunks)
tests/test_gedcom_parser.py (1 hunks)
tests/test_index_generator.py (1 hunks)
tests/test_individual.py (1 hunks)
tests/test_main.py (1 hunks)
tests/test_markdown_generator.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
48-48: Avoid specifying long messages outside the exception class
(TRY003)
50-50: Avoid specifying long messages outside the exception class
(TRY003)
101-101: Docstring contains ambiguous – (EN DASH). Did you mean - (HYPHEN-MINUS)?
(RUF002)
488-488: Redundant exception object included in logging.exception call
(TRY401)
src/main.py
1-1: Shebang is present but file is not executable
(EXE001)
70-70: Avoid specifying long messages outside the exception class
(TRY003)
216-216: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
233-233: Consider moving this statement to an else block
(TRY300)
236-236: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
239-239: Use logging.exception instead of logging.error
Replace with exception
(TRY400)
src/index_generator.py
70-70: Unpacked variable first is never used
Prefix it with an underscore or any other dummy variable pattern
(RUF059)
tests/test_main.py
145-145: Unpacked variable gedcom_file is never used
Prefix it with an underscore or any other dummy variable pattern
(RUF059)
408-410: try-except-pass detected, consider logging the exception
(S110)
408-408: Do not catch blind exception: Exception
(BLE001)
429-431: try-except-pass detected, consider logging the exception
(S110)
429-429: Do not catch blind exception: Exception
(BLE001)
tests/test_gedcom_parser.py
60-60: Local variable parser is assigned to but never used
Remove assignment to unused variable parser
(F841)
74-74: Local variable parser is assigned to but never used
Remove assignment to unused variable parser
(F841)
**Actionable comments posted: 1**
<details>
<summary>🧹 Nitpick comments (7)</summary><blockquote>
<details>
<summary>src/markdown_generator.py (1)</summary><blockquote>
`486-489`: **Remove redundant exception object from logging.exception call.**
Line 488 passes the exception object `{e}` in the message string when calling `logger.exception()`. The `exception()` method automatically includes exception details, making this redundant.
Apply this diff:
```diff
logger.exception(
- f"Failed to generate note for {individual.get_full_name()}: {e}"
+ f"Failed to generate note for {individual.get_full_name()}"
)
```
Based on static analysis hints.
</blockquote></details>
<details>
<summary>tests/test_gedcom_parser.py (2)</summary><blockquote>
`59-60`: **Prefix unused parser variable with underscore.**
The `parser` variable is assigned but never used. The test only verifies the side effect of line ending fixes.
Apply this diff:
```diff
- # Parse the file (should trigger line ending fix)
- parser = GedcomParser(sample_gedcom_cr_only)
+ # Parse the file (should trigger line ending fix)
+ _parser = GedcomParser(sample_gedcom_cr_only)
```
Based on static analysis hints.
---
`73-74`: **Prefix unused parser variable with underscore.**
The `parser` variable is assigned but never used. The test only verifies that parsing doesn't modify the file.
Apply this diff:
```diff
- # Parse the file
- parser = GedcomParser(sample_gedcom_file)
+ # Parse the file
+ _parser = GedcomParser(sample_gedcom_file)
```
Based on static analysis hints.
</blockquote></details>
<details>
<summary>src/index_generator.py (1)</summary><blockquote>
`70-70`: **Use underscore for unused first name variable.**
The unpacked `first` variable is never used; only `last` is needed for the letter grouping logic.
Apply this diff:
```diff
- first, last = individual.get_names()
+ _, last = individual.get_names()
```
Based on static analysis hints.
</blockquote></details>
<details>
<summary>src/main.py (3)</summary><blockquote>
`1-1`: **Make script executable or remove shebang.**
The file has a shebang line but isn't marked as executable.
Run this command to make the file executable:
```shell
chmod +x src/main.py
```
Or remove the shebang if the script is not intended to be executed directly.
Based on static analysis hints.
---
`215-217`: **Use logging.exception for error with exception info.**
Line 216 uses `logging.error` when catching an exception during media file copying. Since this is in an exception handler, `logging.exception` would be more appropriate and automatically includes the traceback.
Apply this diff:
```diff
except (IOError, OSError) as e:
- logger.error(f"Failed to copy {media_file}: {e}")
+ logger.exception(f"Failed to copy {media_file}")
skipped_count += 1
```
Based on static analysis hints.
---
`235-243`: **Consider using logging.exception for caught exceptions.**
Lines 236 and 239 use `logger.error` with `exc_info=True` (line 242). For consistency, consider using `logger.exception` instead, which is specifically designed for logging exceptions and automatically includes traceback information.
Apply this diff to lines 236 and 239:
```diff
except FileNotFoundError as e:
- logger.error(f"File not found: {e}")
+ logger.exception(f"File not found")
return 1
except ValueError as e:
- logger.error(f"Invalid input: {e}")
+ logger.exception(f"Invalid input")
return 1
except Exception as e:
- logger.error(f"Unexpected error: {e}", exc_info=True)
+ logger.exception(f"Unexpected error")
return 1
```
Based on static analysis hints.
</blockquote></details>
</blockquote></details>
<details>
<summary>📜 Review details</summary>
**Configuration used**: CodeRabbit UI
**Review profile**: CHILL
**Plan**: Pro
<details>
<summary>📥 Commits</summary>
Reviewing files that changed from the base of the PR and between ecd9889e21aae46522f4c707abaeb8e4f1c01869 and b335a137d364957290a95a276fefd479665e95f4.
</details>
<details>
<summary>📒 Files selected for processing (12)</summary>
* `.gitignore` (1 hunks)
* `README.md` (1 hunks)
* `pytest.ini` (1 hunks)
* `src/index_generator.py` (1 hunks)
* `src/individual.py` (1 hunks)
* `src/main.py` (1 hunks)
* `src/markdown_generator.py` (1 hunks)
* `tests/test_gedcom_parser.py` (1 hunks)
* `tests/test_index_generator.py` (1 hunks)
* `tests/test_individual.py` (1 hunks)
* `tests/test_main.py` (1 hunks)
* `tests/test_markdown_generator.py` (1 hunks)
</details>
<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (4)</summary>
* pytest.ini
* README.md
* src/individual.py
* tests/test_individual.py
</details>
<details>
<summary>🧰 Additional context used</summary>
<details>
<summary>🧬 Code graph analysis (7)</summary>
<details>
<summary>src/markdown_generator.py (1)</summary><blockquote>
<details>
<summary>src/individual.py (13)</summary>
* `Individual` (19-455)
* `get_file_name` (70-83)
* `get_full_name` (60-68)
* `get_birth_info` (85-102)
* `get_death_info` (104-124)
* `get_gender` (126-133)
* `get_events` (227-261)
* `get_families` (179-225)
* `get_parents` (135-143)
* `get_children` (145-159)
* `get_images` (263-295)
* `get_notes` (297-333)
* `get_stories` (335-436)
</details>
</blockquote></details>
<details>
<summary>tests/test_markdown_generator.py (4)</summary><blockquote>
<details>
<summary>src/gedcom_parser.py (2)</summary>
* `GedcomParser` (19-114)
* `get_individuals` (89-102)
</details>
<details>
<summary>src/individual.py (3)</summary>
* `Individual` (19-455)
* `get_full_name` (60-68)
* `get_file_name` (70-83)
</details>
<details>
<summary>src/markdown_generator.py (3)</summary>
* `MarkdownGenerator` (18-492)
* `generate_note` (59-85)
* `generate_all` (469-492)
</details>
<details>
<summary>tests/conftest.py (3)</summary>
* `output_dir` (170-174)
* `temp_dir` (15-19)
* `sample_gedcom_file` (90-94)
</details>
</blockquote></details>
<details>
<summary>tests/test_index_generator.py (4)</summary><blockquote>
<details>
<summary>src/gedcom_parser.py (2)</summary>
* `GedcomParser` (19-114)
* `get_individuals` (89-102)
</details>
<details>
<summary>src/individual.py (1)</summary>
* `Individual` (19-455)
</details>
<details>
<summary>src/index_generator.py (2)</summary>
* `IndexGenerator` (19-107)
* `generate_index` (37-107)
</details>
<details>
<summary>tests/conftest.py (3)</summary>
* `output_dir` (170-174)
* `sample_gedcom_file` (90-94)
* `temp_dir` (15-19)
</details>
</blockquote></details>
<details>
<summary>src/main.py (4)</summary><blockquote>
<details>
<summary>src/gedcom_parser.py (2)</summary>
* `GedcomParser` (19-114)
* `get_individuals` (89-102)
</details>
<details>
<summary>src/individual.py (1)</summary>
* `Individual` (19-455)
</details>
<details>
<summary>src/markdown_generator.py (2)</summary>
* `MarkdownGenerator` (18-492)
* `generate_all` (469-492)
</details>
<details>
<summary>src/index_generator.py (2)</summary>
* `IndexGenerator` (19-107)
* `generate_index` (37-107)
</details>
</blockquote></details>
<details>
<summary>src/index_generator.py (3)</summary><blockquote>
<details>
<summary>src/individual.py (6)</summary>
* `Individual` (19-455)
* `get_names` (50-58)
* `get_file_name` (70-83)
* `get_birth_info` (85-102)
* `get_death_info` (104-124)
* `get_full_name` (60-68)
</details>
<details>
<summary>tests/conftest.py (1)</summary>
* `output_dir` (170-174)
</details>
<details>
<summary>tests/test_index_generator.py (1)</summary>
* `individuals` (39-43)
</details>
</blockquote></details>
<details>
<summary>tests/test_main.py (2)</summary><blockquote>
<details>
<summary>src/main.py (4)</summary>
* `main` (246-333)
* `setup_logging` (24-39)
* `extract_gedzip` (42-94)
* `convert_gedcom_to_markdown` (97-243)
</details>
<details>
<summary>tests/conftest.py (4)</summary>
* `temp_dir` (15-19)
* `sample_gedcom_content` (23-86)
* `sample_gedcom_file` (90-94)
* `output_dir` (170-174)
</details>
</blockquote></details>
<details>
<summary>tests/test_gedcom_parser.py (2)</summary><blockquote>
<details>
<summary>src/gedcom_parser.py (3)</summary>
* `GedcomParser` (19-114)
* `get_individuals` (89-102)
* `get_element_by_pointer` (104-114)
</details>
<details>
<summary>tests/conftest.py (3)</summary>
* `sample_gedcom_file` (90-94)
* `temp_dir` (15-19)
* `sample_gedcom_cr_only` (98-107)
</details>
</blockquote></details>
</details><details>
<summary>🪛 Ruff (0.14.2)</summary>
<details>
<summary>src/markdown_generator.py</summary>
48-48: Avoid specifying long messages outside the exception class
(TRY003)
---
50-50: Avoid specifying long messages outside the exception class
(TRY003)
---
101-101: Docstring contains ambiguous `–` (EN DASH). Did you mean `-` (HYPHEN-MINUS)?
(RUF002)
---
488-488: Redundant exception object included in `logging.exception` call
(TRY401)
</details>
<details>
<summary>src/main.py</summary>
1-1: Shebang is present but file is not executable
(EXE001)
---
70-70: Avoid specifying long messages outside the exception class
(TRY003)
---
216-216: Use `logging.exception` instead of `logging.error`
Replace with `exception`
(TRY400)
---
233-233: Consider moving this statement to an `else` block
(TRY300)
---
236-236: Use `logging.exception` instead of `logging.error`
Replace with `exception`
(TRY400)
---
239-239: Use `logging.exception` instead of `logging.error`
Replace with `exception`
(TRY400)
</details>
<details>
<summary>src/index_generator.py</summary>
70-70: Unpacked variable `first` is never used
Prefix it with an underscore or any other dummy variable pattern
(RUF059)
</details>
<details>
<summary>tests/test_main.py</summary>
145-145: Unpacked variable `gedcom_file` is never used
Prefix it with an underscore or any other dummy variable pattern
(RUF059)
---
408-410: `try`-`except`-`pass` detected, consider logging the exception
(S110)
---
408-408: Do not catch blind exception: `Exception`
(BLE001)
---
429-431: `try`-`except`-`pass` detected, consider logging the exception
(S110)
---
429-429: Do not catch blind exception: `Exception`
(BLE001)
</details>
<details>
<summary>tests/test_gedcom_parser.py</summary>
60-60: Local variable `parser` is assigned to but never used
Remove assignment to unused variable `parser`
(F841)
---
74-74: Local variable `parser` is assigned to but never used
Remove assignment to unused variable `parser`
(F841)
</details>
</details>
</details>
</details>
<!-- This is an auto-generated comment by CodeRabbit for review status -->
Line 203 has an extra space after "Marriage" in the f-string: f"### Marriage {i if len(families) > 1 else ''}\n". This results in either "### Marriage 1" (with two spaces) or "### Marriage " (with trailing space).
Apply this diff to fix the spacing:
- f.write(f"### Marriage {i if len(families) > 1 else ''}\n")
+ f.write(f"### Marriage {i if len(families) > 1 else ''}\n")
📝 Committable suggestion
‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
f.write(f"### Marriage {i if len(families) > 1 else ''}\n")
🤖 Prompt for AI Agents
In src/markdown_generator.py around line 203, the f-string for the marriage
header inserts an extra space before the conditional index which results in
double spaces or a trailing space; remove the redundant space so the header is
formatted as "### Marriage" or "### Marriage 1" only when there are multiple
families by placing the conditional directly after "Marriage" (i.e., eliminate
the extra space in the f-string).
_⚠️ Potential issue_ | _🟡 Minor_
**Remove extra space in Marriage header formatting.**
Line 203 has an extra space after "Marriage" in the f-string: `f"### Marriage {i if len(families) > 1 else ''}\n"`. This results in either "### Marriage 1" (with two spaces) or "### Marriage " (with trailing space).
Apply this diff to fix the spacing:
```diff
- f.write(f"### Marriage {i if len(families) > 1 else ''}\n")
+ f.write(f"### Marriage {i if len(families) > 1 else ''}\n")
```
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
```suggestion
f.write(f"### Marriage {i if len(families) > 1 else ''}\n")
```
</details>
<!-- suggestion_end -->
<details>
<summary>🤖 Prompt for AI Agents</summary>
```
In src/markdown_generator.py around line 203, the f-string for the marriage
header inserts an extra space before the conditional index which results in
double spaces or a trailing space; remove the redundant space so the header is
formatted as "### Marriage" or "### Marriage 1" only when there are multiple
families by placing the conditional directly after "Marriage" (i.e., eliminate
the extra space in the f-string).
```
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
✅ Addressed in commits 6d7a41f to 17c97b5
coderabbitai[bot]
(Migrated from github.com)
left a comment
Copy link
Copy source
Actionable comments posted: 0
🧹 Nitpick comments (4)
tests/test_gedcom_parser.py (1)
68-78: Unused variable can be prefixed with underscore.
The parser variable at line 74 is assigned but never used. Since you only need the side-effect of initialization (triggering line-ending checks), prefix it with an underscore to signal intentional non-use.
The exception variables are assigned but never used (lines 235, 238, 241) since logger.exception() automatically includes the exception. Additionally, the f-strings at lines 236, 239, and 242 have no placeholders and should be regular strings.
Apply this diff:
- except FileNotFoundError as e:
- logger.exception(f"File not found")
+ except FileNotFoundError:
+ logger.exception("File not found")
return 1
- except ValueError as e:
- logger.exception(f"Invalid input")
+ except ValueError:
+ logger.exception("Invalid input")
return 1
- except Exception as e:
- logger.exception(f"Unexpected error")
+ except Exception:
+ logger.exception("Unexpected error")
return 1
src/markdown_generator.py (2)
97-139: Consider handling edge cases in Lived span display.
Line 116 formats the Lived span as f"{birth['year']}-{death['year']}" which always writes a dash even when both years are empty. This results in just "-" being displayed when no dates are known, or "-2000" when only death is known. Consider omitting the Lived metadata entirely when both years are empty, or using a format like "b. 1950" / "d. 2000" / "1950-2000" to clarify partial information.
Optional improvement:
- # Lived years
- lived = f"{birth['year']}-{death['year']}"
- self._write_metadata(f, "Lived", lived)
+ # Lived years
+ if birth['year'] or death['year']:
+ lived = f"{birth['year']}-{death['year']}"
+ self._write_metadata(f, "Lived", lived)
469-492: Clean up unused exception variable.
Line 486 assigns the exception variable e but never uses it since logger.exception() automatically includes the exception details.
Apply this diff:
try:
path = self.generate_note(individual)
paths.append(path)
- except Exception as e:
+ except Exception:
logger.exception(
f"Failed to generate note for {individual.get_full_name()}"
)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between b335a137d3 and 17c97b5188.
74-74: Local variable parser is assigned to but never used
Remove assignment to unused variable parser
(F841)
src/main.py
70-70: Avoid specifying long messages outside the exception class
(TRY003)
215-215: Local variable e is assigned to but never used
Remove assignment to unused variable e
(F841)
233-233: Consider moving this statement to an else block
(TRY300)
235-235: Local variable e is assigned to but never used
Remove assignment to unused variable e
(F841)
236-236: f-string without any placeholders
Remove extraneous f prefix
(F541)
238-238: Local variable e is assigned to but never used
Remove assignment to unused variable e
(F841)
239-239: f-string without any placeholders
Remove extraneous f prefix
(F541)
241-241: Local variable e is assigned to but never used
Remove assignment to unused variable e
(F841)
242-242: f-string without any placeholders
Remove extraneous f prefix
(F541)
src/markdown_generator.py
48-48: Avoid specifying long messages outside the exception class
(TRY003)
50-50: Avoid specifying long messages outside the exception class
(TRY003)
101-101: Docstring contains ambiguous – (EN DASH). Did you mean - (HYPHEN-MINUS)?
(RUF002)
486-486: Local variable e is assigned to but never used
Remove assignment to unused variable e
(F841)
🔇 Additional comments (14)
tests/test_gedcom_parser.py (1)
11-143: LGTM!
The test suite provides comprehensive coverage of GedcomParser functionality including initialization, line-ending corrections, individual extraction, and element lookup. The tests are well-structured with clear assertions and appropriate use of fixtures.
src/index_generator.py (1)
1-107: LGTM!
The IndexGenerator implementation is clean and well-structured. The alphabetical grouping by last-name initial, life-span formatting with regex-based year extraction, and conditional WikiLink formatting all work correctly. The previous death year parsing issue has been properly addressed.
src/main.py (4)
24-39: LGTM!
The logging setup is clean and provides appropriate verbosity control with clear formatting.
42-94: LGTM!
The ZIP extraction and media discovery logic is well-implemented. The recursive search with rglob ensures all media files are found regardless of directory depth, and setting media_dir to the extraction root correctly makes all subdirectories accessible. The previous issues with incomplete media discovery have been properly resolved.
119-222: LGTM!
The conversion workflow is well-structured and handles both flat and subdirectory output modes correctly. The media copying logic now properly preserves directory structure using relative_to, handles filename collisions with numeric suffixes, and includes comprehensive error handling. The previous issues with flattening media files and silent overwrites have been properly resolved.
246-337: LGTM!
The CLI implementation is well-designed with comprehensive argument parsing, proper input validation, and safe resource cleanup. The try-finally block ensures temporary directories are always cleaned up, even when conversion fails.
src/markdown_generator.py (8)
26-57: LGTM!
The initialization properly validates the output directory and cleanly initializes all instance variables including the story tracking dictionary.
59-95: LGTM!
The note generation orchestration is clean and follows a logical section order. Each section writer is called in sequence to build the complete markdown note.
141-182: LGTM!
The events section correctly filters out birth and death events (already in attributes) and provides readable names for common GEDCOM event types with clean conditional rendering.
184-230: LGTM!
The families section correctly handles both complete families with partners and single-parent families. The conditional rendering ensures partner metadata is only written when a partner exists, while children are always listed regardless. The previous issues with skipping partner-less families have been properly resolved.
232-278: LGTM!
The parents and children sections are well-implemented. The children section correctly avoids duplication by skipping when families are present (since families already list children).
280-307: LGTM!
The images section correctly handles media subdirectory prefixing and provides sensible title fallbacks with proper Markdown image syntax.
309-379: LGTM!
The story file generation is well-implemented with proper deduplication tracking, safe filename creation, correct back-links to individuals, and appropriate relative path handling for images across subdirectories.
381-467: LGTM!
The notes section properly handles both regular notes and stories with correct wiki link formatting and subdirectory prefixing. The helper methods are clean and straightforward.
**Actionable comments posted: 0**
<details>
<summary>🧹 Nitpick comments (4)</summary><blockquote>
<details>
<summary>tests/test_gedcom_parser.py (1)</summary><blockquote>
`68-78`: **Unused variable can be prefixed with underscore.**
The `parser` variable at line 74 is assigned but never used. Since you only need the side-effect of initialization (triggering line-ending checks), prefix it with an underscore to signal intentional non-use.
Apply this diff:
```diff
- parser = GedcomParser(sample_gedcom_file)
+ _parser = GedcomParser(sample_gedcom_file)
```
</blockquote></details>
<details>
<summary>src/main.py (1)</summary><blockquote>
`235-243`: **Clean up exception handling style.**
The exception variables are assigned but never used (lines 235, 238, 241) since `logger.exception()` automatically includes the exception. Additionally, the f-strings at lines 236, 239, and 242 have no placeholders and should be regular strings.
Apply this diff:
```diff
- except FileNotFoundError as e:
- logger.exception(f"File not found")
+ except FileNotFoundError:
+ logger.exception("File not found")
return 1
- except ValueError as e:
- logger.exception(f"Invalid input")
+ except ValueError:
+ logger.exception("Invalid input")
return 1
- except Exception as e:
- logger.exception(f"Unexpected error")
+ except Exception:
+ logger.exception("Unexpected error")
return 1
```
</blockquote></details>
<details>
<summary>src/markdown_generator.py (2)</summary><blockquote>
`97-139`: **Consider handling edge cases in Lived span display.**
Line 116 formats the Lived span as `f"{birth['year']}-{death['year']}"` which always writes a dash even when both years are empty. This results in just "-" being displayed when no dates are known, or "-2000" when only death is known. Consider omitting the Lived metadata entirely when both years are empty, or using a format like "b. 1950" / "d. 2000" / "1950-2000" to clarify partial information.
Optional improvement:
```diff
- # Lived years
- lived = f"{birth['year']}-{death['year']}"
- self._write_metadata(f, "Lived", lived)
+ # Lived years
+ if birth['year'] or death['year']:
+ lived = f"{birth['year']}-{death['year']}"
+ self._write_metadata(f, "Lived", lived)
```
---
`469-492`: **Clean up unused exception variable.**
Line 486 assigns the exception variable `e` but never uses it since `logger.exception()` automatically includes the exception details.
Apply this diff:
```diff
try:
path = self.generate_note(individual)
paths.append(path)
- except Exception as e:
+ except Exception:
logger.exception(
f"Failed to generate note for {individual.get_full_name()}"
)
```
</blockquote></details>
</blockquote></details>
<details>
<summary>📜 Review details</summary>
**Configuration used**: CodeRabbit UI
**Review profile**: CHILL
**Plan**: Pro
<details>
<summary>📥 Commits</summary>
Reviewing files that changed from the base of the PR and between b335a137d364957290a95a276fefd479665e95f4 and 17c97b51884f9a1a0105bd8fc2906a32c9e76c1a.
</details>
<details>
<summary>📒 Files selected for processing (4)</summary>
* `src/index_generator.py` (1 hunks)
* `src/main.py` (1 hunks)
* `src/markdown_generator.py` (1 hunks)
* `tests/test_gedcom_parser.py` (1 hunks)
</details>
<details>
<summary>🧰 Additional context used</summary>
<details>
<summary>🧬 Code graph analysis (4)</summary>
<details>
<summary>tests/test_gedcom_parser.py (3)</summary><blockquote>
<details>
<summary>src/gedcom_parser.py (3)</summary>
* `GedcomParser` (19-114)
* `get_individuals` (89-102)
* `get_element_by_pointer` (104-114)
</details>
<details>
<summary>tests/conftest.py (3)</summary>
* `sample_gedcom_file` (90-94)
* `temp_dir` (15-19)
* `sample_gedcom_cr_only` (98-107)
</details>
<details>
<summary>tests/test_index_generator.py (1)</summary>
* `individuals` (39-43)
</details>
</blockquote></details>
<details>
<summary>src/index_generator.py (3)</summary><blockquote>
<details>
<summary>src/individual.py (6)</summary>
* `Individual` (19-455)
* `get_names` (50-58)
* `get_file_name` (70-83)
* `get_birth_info` (85-102)
* `get_death_info` (104-124)
* `get_full_name` (60-68)
</details>
<details>
<summary>tests/conftest.py (1)</summary>
* `output_dir` (170-174)
</details>
<details>
<summary>tests/test_index_generator.py (1)</summary>
* `individuals` (39-43)
</details>
</blockquote></details>
<details>
<summary>src/main.py (4)</summary><blockquote>
<details>
<summary>src/gedcom_parser.py (2)</summary>
* `GedcomParser` (19-114)
* `get_individuals` (89-102)
</details>
<details>
<summary>src/individual.py (1)</summary>
* `Individual` (19-455)
</details>
<details>
<summary>src/markdown_generator.py (1)</summary>
* `generate_all` (469-492)
</details>
<details>
<summary>src/index_generator.py (2)</summary>
* `IndexGenerator` (19-107)
* `generate_index` (37-107)
</details>
</blockquote></details>
<details>
<summary>src/markdown_generator.py (1)</summary><blockquote>
<details>
<summary>src/individual.py (14)</summary>
* `Individual` (19-455)
* `get_file_name` (70-83)
* `get_full_name` (60-68)
* `get_birth_info` (85-102)
* `get_death_info` (104-124)
* `get_id` (41-48)
* `get_gender` (126-133)
* `get_events` (227-261)
* `get_families` (179-225)
* `get_parents` (135-143)
* `get_children` (145-159)
* `get_images` (263-295)
* `get_notes` (297-333)
* `get_stories` (335-436)
</details>
</blockquote></details>
</details><details>
<summary>🪛 Ruff (0.14.2)</summary>
<details>
<summary>tests/test_gedcom_parser.py</summary>
74-74: Local variable `parser` is assigned to but never used
Remove assignment to unused variable `parser`
(F841)
</details>
<details>
<summary>src/main.py</summary>
70-70: Avoid specifying long messages outside the exception class
(TRY003)
---
215-215: Local variable `e` is assigned to but never used
Remove assignment to unused variable `e`
(F841)
---
233-233: Consider moving this statement to an `else` block
(TRY300)
---
235-235: Local variable `e` is assigned to but never used
Remove assignment to unused variable `e`
(F841)
---
236-236: f-string without any placeholders
Remove extraneous `f` prefix
(F541)
---
238-238: Local variable `e` is assigned to but never used
Remove assignment to unused variable `e`
(F841)
---
239-239: f-string without any placeholders
Remove extraneous `f` prefix
(F541)
---
241-241: Local variable `e` is assigned to but never used
Remove assignment to unused variable `e`
(F841)
---
242-242: f-string without any placeholders
Remove extraneous `f` prefix
(F541)
</details>
<details>
<summary>src/markdown_generator.py</summary>
48-48: Avoid specifying long messages outside the exception class
(TRY003)
---
50-50: Avoid specifying long messages outside the exception class
(TRY003)
---
101-101: Docstring contains ambiguous `–` (EN DASH). Did you mean `-` (HYPHEN-MINUS)?
(RUF002)
---
486-486: Local variable `e` is assigned to but never used
Remove assignment to unused variable `e`
(F841)
</details>
</details>
</details>
<details>
<summary>🔇 Additional comments (14)</summary><blockquote>
<details>
<summary>tests/test_gedcom_parser.py (1)</summary><blockquote>
`11-143`: **LGTM!**
The test suite provides comprehensive coverage of GedcomParser functionality including initialization, line-ending corrections, individual extraction, and element lookup. The tests are well-structured with clear assertions and appropriate use of fixtures.
</blockquote></details>
<details>
<summary>src/index_generator.py (1)</summary><blockquote>
`1-107`: **LGTM!**
The IndexGenerator implementation is clean and well-structured. The alphabetical grouping by last-name initial, life-span formatting with regex-based year extraction, and conditional WikiLink formatting all work correctly. The previous death year parsing issue has been properly addressed.
</blockquote></details>
<details>
<summary>src/main.py (4)</summary><blockquote>
`24-39`: **LGTM!**
The logging setup is clean and provides appropriate verbosity control with clear formatting.
---
`42-94`: **LGTM!**
The ZIP extraction and media discovery logic is well-implemented. The recursive search with `rglob` ensures all media files are found regardless of directory depth, and setting `media_dir` to the extraction root correctly makes all subdirectories accessible. The previous issues with incomplete media discovery have been properly resolved.
---
`119-222`: **LGTM!**
The conversion workflow is well-structured and handles both flat and subdirectory output modes correctly. The media copying logic now properly preserves directory structure using `relative_to`, handles filename collisions with numeric suffixes, and includes comprehensive error handling. The previous issues with flattening media files and silent overwrites have been properly resolved.
---
`246-337`: **LGTM!**
The CLI implementation is well-designed with comprehensive argument parsing, proper input validation, and safe resource cleanup. The try-finally block ensures temporary directories are always cleaned up, even when conversion fails.
</blockquote></details>
<details>
<summary>src/markdown_generator.py (8)</summary><blockquote>
`26-57`: **LGTM!**
The initialization properly validates the output directory and cleanly initializes all instance variables including the story tracking dictionary.
---
`59-95`: **LGTM!**
The note generation orchestration is clean and follows a logical section order. Each section writer is called in sequence to build the complete markdown note.
---
`141-182`: **LGTM!**
The events section correctly filters out birth and death events (already in attributes) and provides readable names for common GEDCOM event types with clean conditional rendering.
---
`184-230`: **LGTM!**
The families section correctly handles both complete families with partners and single-parent families. The conditional rendering ensures partner metadata is only written when a partner exists, while children are always listed regardless. The previous issues with skipping partner-less families have been properly resolved.
---
`232-278`: **LGTM!**
The parents and children sections are well-implemented. The children section correctly avoids duplication by skipping when families are present (since families already list children).
---
`280-307`: **LGTM!**
The images section correctly handles media subdirectory prefixing and provides sensible title fallbacks with proper Markdown image syntax.
---
`309-379`: **LGTM!**
The story file generation is well-implemented with proper deduplication tracking, safe filename creation, correct back-links to individuals, and appropriate relative path handling for images across subdirectories.
---
`381-467`: **LGTM!**
The notes section properly handles both regular notes and stories with correct wiki link formatting and subdirectory prefixing. The helper methods are clean and straightforward.
</blockquote></details>
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit for review status -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Introduces a comprehensive Python-based GEDCOM file converter for generating Obsidian-compatible markdown notes:
Features
Key Components
Improvements
Summary by CodeRabbit
New Features
Documentation
Tests
Chores
Walkthrough
Adds a GEDCOM-to-Markdown toolset: parser, Individual model, Markdown and index generators, CLI with ZIP/media support, pytest configuration and extensive tests, documentation, requirements, and .gitignore additions.
Changes
\.gitignore.DS_Store,examples/,output/, andtest_output/.requirements.txt,pytest.inirequirements.txtwithpython-gedcom==1.0.0,pytest>=7.4.0,pytest-cov>=4.1.0; addspytest.iniwith test discovery and coverage settings.CLAUDE.md,README.mdCLAUDE.mdguidance for repository usage; replaces README top header with a CodeRabbit PR badge image.src/gedcom_parser.pyGedcomParser: validates input path, fixes CR-only line endings in-place, parses GEDCOM, logs steps, exposesget_individuals()andget_element_by_pointer().src/individual.pyIndividualwrapper exposing IDs, names, birth/death, gender, relationships, events, media, notes, stories, and attribute accessors; resolves cross-references via parser.src/markdown_generator.pyMarkdownGenerator: renders Obsidian-compatible notes, generates separate story files, handles media paths and cross-links, supports batch generation and configurable subdirs.src/index_generator.pyIndexGenerator: produces alphabeticalIndex.mdgrouped by last-name initial with wiki-style links and life spans.src/main.pysetup_logging,extract_gedzip(ZIP extraction),convert_gedcom_to_markdown(conversion pipeline, media copying, optional index, flat/nested output), andmain().tests/__init__.py,tests/conftest.pytests/test_gedcom_parser.pytests/test_index_generator.pytests/test_individual.pytests/test_main.pytests/test_markdown_generator.pySequence Diagram(s)
Estimated code review effort
🎯 4 (Complex) | ⏱️ ~60 minutes
Poem
Pre-merge checks and finishing touches
✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands and usage tips.@coderrabbitai full review
@coderabbitai full review
✅ Actions performed
Full review triggered.
Actionable comments posted: 4
🧹 Nitpick comments (2)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between
69ee4555f5andecd9889e21.📒 Files selected for processing (17)
.gitignore(1 hunks)CLAUDE.md(1 hunks)README.md(1 hunks)pytest.ini(1 hunks)requirements.txt(1 hunks)src/gedcom_parser.py(1 hunks)src/index_generator.py(1 hunks)src/individual.py(1 hunks)src/main.py(1 hunks)src/markdown_generator.py(1 hunks)tests/__init__.py(1 hunks)tests/conftest.py(1 hunks)tests/test_gedcom_parser.py(1 hunks)tests/test_index_generator.py(1 hunks)tests/test_individual.py(1 hunks)tests/test_main.py(1 hunks)tests/test_markdown_generator.py(1 hunks)🧰 Additional context used
🧬 Code graph analysis (3)
src/index_generator.py (1)
src/main.py (4)
src/markdown_generator.py (1)
🪛 LanguageTool
README.md
[grammar] ~102-~102: Use a hyphen to join words.
Context: ...utput --flat --verbose
**Using long form arguments:**bash python src/mai...(QB_NEW_EN_HYPHEN)
🪛 markdownlint-cli2 (0.18.1)
README.md
61-61: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
135-135: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
156-156: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🪛 Ruff (0.14.2)
tests/__init__.py
1-1: No such file or directory (os error 2)
(E902)
tests/test_gedcom_parser.py
1-1: No such file or directory (os error 2)
(E902)
src/gedcom_parser.py
39-39: Avoid specifying long messages outside the exception class
(TRY003)
52-52: Avoid specifying long messages outside the exception class
(TRY003)
src/individual.py
94-94: Unpacked variable
sourcesis never usedPrefix it with an underscore or any other dummy variable pattern
(RUF059)
112-112: Unpacked variable
sourcesis never usedPrefix it with an underscore or any other dummy variable pattern
(RUF059)
tests/test_index_generator.py
1-1: No such file or directory (os error 2)
(E902)
tests/test_main.py
1-1: No such file or directory (os error 2)
(E902)
tests/conftest.py
1-1: No such file or directory (os error 2)
(E902)
tests/test_individual.py
1-1: No such file or directory (os error 2)
(E902)
src/index_generator.py
71-71: Unpacked variable
firstis never usedPrefix it with an underscore or any other dummy variable pattern
(RUF059)
src/main.py
1-1: Shebang is present but file is not executable
(EXE001)
70-70: Avoid specifying long messages outside the exception class
(TRY003)
185-185: Consider moving this statement to an
elseblock(TRY300)
188-188: Use
logging.exceptioninstead oflogging.errorReplace with
exception(TRY400)
191-191: Use
logging.exceptioninstead oflogging.errorReplace with
exception(TRY400)
tests/test_markdown_generator.py
1-1: No such file or directory (os error 2)
(E902)
src/markdown_generator.py
46-46: Avoid specifying long messages outside the exception class
(TRY003)
48-48: Avoid specifying long messages outside the exception class
(TRY003)
98-98: Docstring contains ambiguous
–(EN DASH). Did you mean-(HYPHEN-MINUS)?(RUF002)
🔇 Additional comments (7)
@@ -0,0 +1,107 @@"""⚠️ Potential issue | 🟠 Major
Death year parsing outputs “15 J”.
Line 88 slices the GEDCOM death date (
death_info["date"][:4]). For inputs like “15 JUN 2020” that returns “15 J”, so the index shows “1950-15 J”. That’s user-visible and contradicts the intent of the life-span display. Please extract the numeric year instead of blindly slicing the string.Apply this diff to fix the bug:
📝 Committable suggestion
✅ Addressed in commits
c072ebbtob335a13@@ -0,0 +1,337 @@#!/usr/bin/env python3⚠️ Potential issue | 🟠 Major
Fix media directory discovery to cover all extracted assets.
Line 82 only records the parent directory of the first image found, then stops. If the GEDZIP contains media spread across different folders (a common layout with
/media/photos,/media/documents, etc.), everything outside that first parent is silently ignored, so the converter never copies most assets. Please scan the entire extracted tree (e.g., withPath.rglob) and hand the downstream converter either the extraction root or a list of media roots so every image remains reachable. A minimal fix looks like:🤖 Prompt for AI Agents
✅ Addressed in commits
c072ebbtob335a13⚠️ Potential issue | 🟠 Major
Preserve media structure and avoid silent overwrites.
Lines 165-182 flatten every media file into a single directory via
media_file.name, so two different files namedimage.jpgwill clobber one another. You also miss any assets nested beneath subdirectories becauseglob(ext)is non-recursive. To prevent data loss, traverse the media tree recursively, copy only allowed file types, and keep the relative directory structure intact while guarding against overwrites:🤖 Prompt for AI Agents
✅ Addressed in commits
c072ebbtob335a13@@ -0,0 +1,493 @@"""⚠️ Potential issue | 🟠 Major
Ensure families without a recorded partner still list their children.
The guard on Line 199 skips the entire block whenever
family["partner"]is missing. For single-parent families (or GEDCOM records missing a spouse pointer), that means we never emit the family section, the children are dropped altogether, and_write_childrenwill not backfill becauseget_families()is truthy. Users lose visibility into those relationships. Render families even when only children or marriage metadata is present:🤖 Prompt for AI Agents
✅ Addressed in commits
c072ebbtob335a13Actionable comments posted: 0
♻️ Duplicate comments (4)
🧹 Nitpick comments (8)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between
69ee4555f5andecd9889e21.📒 Files selected for processing (17)
.gitignore(1 hunks)CLAUDE.md(1 hunks)README.md(1 hunks)pytest.ini(1 hunks)requirements.txt(1 hunks)src/gedcom_parser.py(1 hunks)src/index_generator.py(1 hunks)src/individual.py(1 hunks)src/main.py(1 hunks)src/markdown_generator.py(1 hunks)tests/__init__.py(1 hunks)tests/conftest.py(1 hunks)tests/test_gedcom_parser.py(1 hunks)tests/test_index_generator.py(1 hunks)tests/test_individual.py(1 hunks)tests/test_main.py(1 hunks)tests/test_markdown_generator.py(1 hunks)🧰 Additional context used
🪛 LanguageTool
README.md
[grammar] ~102-~102: Use a hyphen to join words.
Context: ...utput --flat --verbose
**Using long form arguments:**bash python src/mai...(QB_NEW_EN_HYPHEN)
🪛 markdownlint-cli2 (0.18.1)
README.md
61-61: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
135-135: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
156-156: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🪛 Ruff (0.14.2)
tests/test_gedcom_parser.py
64-64: Local variable
parseris assigned to but never usedRemove assignment to unused variable
parser(F841)
78-78: Local variable
parseris assigned to but never usedRemove assignment to unused variable
parser(F841)
src/index_generator.py
69-69: Unpacked variable
firstis never usedPrefix it with an underscore or any other dummy variable pattern
(RUF059)
src/main.py
1-1: Shebang is present but file is not executable
(EXE001)
70-70: Avoid specifying long messages outside the exception class
(TRY003)
194-194: Consider moving this statement to an
elseblock(TRY300)
197-197: Use
logging.exceptioninstead oflogging.errorReplace with
exception(TRY400)
200-200: Use
logging.exceptioninstead oflogging.errorReplace with
exception(TRY400)
src/gedcom_parser.py
39-39: Avoid specifying long messages outside the exception class
(TRY003)
52-52: Avoid specifying long messages outside the exception class
(TRY003)
src/individual.py
94-94: Unpacked variable
sourcesis never usedPrefix it with an underscore or any other dummy variable pattern
(RUF059)
112-112: Unpacked variable
sourcesis never usedPrefix it with an underscore or any other dummy variable pattern
(RUF059)
src/markdown_generator.py
46-46: Avoid specifying long messages outside the exception class
(TRY003)
48-48: Avoid specifying long messages outside the exception class
(TRY003)
98-98: Docstring contains ambiguous
–(EN DASH). Did you mean-(HYPHEN-MINUS)?(RUF002)
480-480: Do not catch blind exception:
Exception(BLE001)
481-483: Use
logging.exceptioninstead oflogging.errorReplace with
exception(TRY400)
tests/test_main.py
130-130: Unpacked variable
media_diris never usedPrefix it with an underscore or any other dummy variable pattern
(RUF059)
389-391:
try-except-passdetected, consider logging the exception(S110)
389-389: Do not catch blind exception:
Exception(BLE001)
410-412:
try-except-passdetected, consider logging the exception(S110)
410-410: Do not catch blind exception:
Exception(BLE001)
🔇 Additional comments (26)
Actionable comments posted: 1
🧹 Nitpick comments (7)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between
ecd9889e21andb335a137d3.📒 Files selected for processing (12)
.gitignore(1 hunks)README.md(1 hunks)pytest.ini(1 hunks)src/index_generator.py(1 hunks)src/individual.py(1 hunks)src/main.py(1 hunks)src/markdown_generator.py(1 hunks)tests/test_gedcom_parser.py(1 hunks)tests/test_index_generator.py(1 hunks)tests/test_individual.py(1 hunks)tests/test_main.py(1 hunks)tests/test_markdown_generator.py(1 hunks)🚧 Files skipped from review as they are similar to previous changes (4)
🧰 Additional context used
🧬 Code graph analysis (7)
src/markdown_generator.py (1)
tests/test_markdown_generator.py (4)
tests/test_index_generator.py (4)
src/main.py (4)
src/index_generator.py (3)
tests/test_main.py (2)
tests/test_gedcom_parser.py (2)
🪛 Ruff (0.14.2)
src/markdown_generator.py
48-48: Avoid specifying long messages outside the exception class
(TRY003)
50-50: Avoid specifying long messages outside the exception class
(TRY003)
101-101: Docstring contains ambiguous
–(EN DASH). Did you mean-(HYPHEN-MINUS)?(RUF002)
488-488: Redundant exception object included in
logging.exceptioncall(TRY401)
src/main.py
1-1: Shebang is present but file is not executable
(EXE001)
70-70: Avoid specifying long messages outside the exception class
(TRY003)
216-216: Use
logging.exceptioninstead oflogging.errorReplace with
exception(TRY400)
233-233: Consider moving this statement to an
elseblock(TRY300)
236-236: Use
logging.exceptioninstead oflogging.errorReplace with
exception(TRY400)
239-239: Use
logging.exceptioninstead oflogging.errorReplace with
exception(TRY400)
src/index_generator.py
70-70: Unpacked variable
firstis never usedPrefix it with an underscore or any other dummy variable pattern
(RUF059)
tests/test_main.py
145-145: Unpacked variable
gedcom_fileis never usedPrefix it with an underscore or any other dummy variable pattern
(RUF059)
408-410:
try-except-passdetected, consider logging the exception(S110)
408-408: Do not catch blind exception:
Exception(BLE001)
429-431:
try-except-passdetected, consider logging the exception(S110)
429-429: Do not catch blind exception:
Exception(BLE001)
tests/test_gedcom_parser.py
60-60: Local variable
parseris assigned to but never usedRemove assignment to unused variable
parser(F841)
74-74: Local variable
parseris assigned to but never usedRemove assignment to unused variable
parser(F841)
@@ -0,0 +1,493 @@"""⚠️ Potential issue | 🟡 Minor
Remove extra space in Marriage header formatting.
Line 203 has an extra space after "Marriage" in the f-string:
f"### Marriage {i if len(families) > 1 else ''}\n". This results in either "### Marriage 1" (with two spaces) or "### Marriage " (with trailing space).Apply this diff to fix the spacing:
📝 Committable suggestion
🤖 Prompt for AI Agents
✅ Addressed in commits
6d7a41fto17c97b5Actionable comments posted: 0
🧹 Nitpick comments (4)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between
b335a137d3and17c97b5188.📒 Files selected for processing (4)
src/index_generator.py(1 hunks)src/main.py(1 hunks)src/markdown_generator.py(1 hunks)tests/test_gedcom_parser.py(1 hunks)🧰 Additional context used
🧬 Code graph analysis (4)
tests/test_gedcom_parser.py (3)
src/index_generator.py (3)
src/main.py (4)
src/markdown_generator.py (1)
🪛 Ruff (0.14.2)
tests/test_gedcom_parser.py
74-74: Local variable
parseris assigned to but never usedRemove assignment to unused variable
parser(F841)
src/main.py
70-70: Avoid specifying long messages outside the exception class
(TRY003)
215-215: Local variable
eis assigned to but never usedRemove assignment to unused variable
e(F841)
233-233: Consider moving this statement to an
elseblock(TRY300)
235-235: Local variable
eis assigned to but never usedRemove assignment to unused variable
e(F841)
236-236: f-string without any placeholders
Remove extraneous
fprefix(F541)
238-238: Local variable
eis assigned to but never usedRemove assignment to unused variable
e(F841)
239-239: f-string without any placeholders
Remove extraneous
fprefix(F541)
241-241: Local variable
eis assigned to but never usedRemove assignment to unused variable
e(F841)
242-242: f-string without any placeholders
Remove extraneous
fprefix(F541)
src/markdown_generator.py
48-48: Avoid specifying long messages outside the exception class
(TRY003)
50-50: Avoid specifying long messages outside the exception class
(TRY003)
101-101: Docstring contains ambiguous
–(EN DASH). Did you mean-(HYPHEN-MINUS)?(RUF002)
486-486: Local variable
eis assigned to but never usedRemove assignment to unused variable
e(F841)
🔇 Additional comments (14)