Import Export - banisterious/obsidian-charted-roots GitHub Wiki

Import & Export

Charted Roots supports importing and exporting family data in GEDCOM, Gramps XML, and CSV formats through guided step-by-step wizards.

Table of Contents


Import/Export Hub

The Import/Export Hub provides a centralized entry point for all data import and export operations through guided wizards.

Opening the Hub

Method How
Control Center Click Import/Export in the Tools group
Dashboard Click the Import quick action tile
Command Palette Ctrl/Cmd+P → "Charted Roots: Open Import/Export Hub"

The hub displays two cards:

  • Import — Launch the 7-step import wizard
  • Export — Launch the 6-step export wizard

Import Wizard

The import wizard guides you through 7 steps:

Step Purpose
1. Format Select GEDCOM 5.5.1, GEDCOM X (JSON), Gramps XML/.gpkg, or CSV
2. File Drag-and-drop or click to select your import file
3. Options Configure entity types, target folder, conflict handling, dynamic blocks
4. Preview Review entity counts and duplicate warnings
5. Import Watch progress with real-time log
6. Numbering Optional reference numbering (Ahnentafel, d'Aboville, Henry, Generation)
7. Complete Summary with quick actions

Key Features:

  • Dynamic blocks toggle — Enable or disable dynamic content blocks in imported notes
  • Integrated numbering — Apply reference numbers immediately after import without leaving the wizard
  • Gramps media extraction.gpkg packages automatically extract embedded media files

Export Wizard

The export wizard guides you through 6 steps:

Step Purpose
1. Format Select GEDCOM 5.5.1 (other formats coming soon)
2. Folders Choose preference folders or specify custom folders
3. Options Configure privacy controls and entity inclusions
4. Preview Review entity counts and privacy summary
5. Export Watch progress with real-time log
6. Complete Download or save options

Privacy Controls:

  • Exclude living persons — Completely omit people without death dates born after threshold year
  • Redact living persons — Include structure but replace personal details with "[Living]"
  • Birth year threshold — Configure how recent a birth date triggers living person protection

Entity Inclusions:

Toggle which entity types to include in the export:

  • Sources and citations
  • Places with hierarchy
  • Notes and annotations

GEDCOM Import/Export

Charted Roots provides full round-trip support for GEDCOM 5.5.1 format, allowing you to import family trees from popular genealogy software and export your Obsidian data back to GEDCOM format.

Importing a GEDCOM File

Using the Import Wizard:

  1. Open the Import/Export Hub (see Opening the Hub)
  2. Click the Import card
  3. Select GEDCOM 5.5.1 format
  4. Drag and drop your .ged file or click to browse
  5. Configure import options:
    • Entity types — People, events, sources, places (toggle each on/off)
    • Target folder — Where to create notes
    • Conflict handling — Skip, overwrite, or merge duplicates
    • Dynamic blocks — Enable/disable dynamic content blocks
  6. Review the preview showing entity counts and any warnings
  7. Click Import to begin
  8. Optionally apply reference numbering in Step 6
  9. Review summary and use quick actions to open imported notes

Data Quality Preview:

Before any files are created, Charted Roots analyzes the GEDCOM data and shows a quality preview modal if issues or place name variants are detected. This allows you to:

  • Review detected issues organized by category:

    • Dates: Death before birth, future dates, events before birth/after death
    • Relationships: Gender/role mismatches, parent younger than child
    • References: Orphan references to non-existent records
    • Data: Missing names, unknown sex, no dates recorded
  • Standardize place name variants before import:

    • Choose canonical forms for country names (e.g., "USA" vs "United States of America")
    • Standardize state abbreviations (e.g., "CA" vs "California")
    • Your choices affect both file names and frontmatter property values
  • Decide how to proceed:

    • Click "Proceed with import" to apply your choices and continue
    • Click "Cancel" to abort without creating any files

This preview step ensures consistent data from the start, avoiding cleanup work after import.

Progress Indicator:

During import, a modal shows:

  • Current phase (validating, parsing, places, sources, people, relationships, events)
  • Progress bar with current/total count
  • Running statistics (places, sources, people, events created)

What Gets Created:

Note Type What's Created
People One note per individual with relationships, dates, places
Events One note per life event (birth, death, marriage, etc.) linked to person
Sources One note per GEDCOM source record with citation metadata
Citations One note per source citation with PAGE and QUAY metadata (only created when PAGE or QUAY is present). Person notes are updated with a citations array. See Citation Notes
Places Hierarchical place notes (city → county → state → country)

Supported GEDCOM Tags:

Individuals:

  • INDI - Individuals → person notes
  • NAME - Person names
  • BIRT/DEAT - Birth and death → event notes
  • DATE - Event dates (qualifiers ABT, BEF, AFT, CAL, EST, and BET...AND ranges are preserved)
  • PLAC - Event locations → place wikilinks
  • FAMC/FAMS - Family relationships
  • SEX - Gender
  • _UUID - Preserved as cr_id
  • Xref IDs (e.g., @I0001@) → external_id for round-trip export support

Events (create event notes):

  • Core: BIRT, DEAT, MARR, DIV
  • Life Events: BURI, CREM, ADOP, GRAD, RETI, CENS
  • Career/Residence: RESI, OCCU, EDUC
  • Legal/Estate: PROB, WILL, NATU, MILI
  • Migration: IMMI, EMIG
  • Religious: BAPM, CHR, CHRA, CONF, FCOM, ORDN, BARM, BASM, BLES
  • Family: ENGA, MARB, MARC, MARL, MARS, ANUL, DIVF

Person Attributes (stored as properties):

  • DSCRphysicalDescription
  • IDNOidentityNumber
  • NATInationality
  • RELIreligion
  • TITLtitle
  • PROPproperty
  • CASTcaste
  • NCHIchildrenCount
  • NMRmarriageCount
  • SSNssn (automatically redacted from exports)
  • _RESEARCH_LEVELresearch_level (custom tag, 0-6 research progress level)

Sources:

  • SOUR - Source records → source notes
  • TITL - Source title
  • AUTH - Author
  • PUBL - Publication info
  • REPO - Repository

Marriage Metadata (Enhanced Spouse Support):

  • MARR - Marriage events → spouse1_marriage_date
  • DIV - Divorce events → spouse1_divorce_date
  • PLAC - Marriage locations → spouse1_marriage_location

Media Import (OBJE Records):

GEDCOM media object (OBJE) records can be imported to link photos, documents, and scans to person, event, and source notes.

Enabling Media Import:

  1. In the import wizard Options step, enable Media references
  2. If your GEDCOM contains absolute paths (e.g., /media/pictures/Ancestors/photo.jpg), optionally set a Path prefix to strip to convert them to vault-relative paths

What Gets Imported:

  • Top-level 0 @Oxxxx@ OBJE record definitions
  • 1 OBJE @Oxxxx@ references on individuals, families, sources, and events
  • Inline OBJE records with embedded FILE paths
  • Media titles (TITL tags) are preserved for reference

Path Resolution:

GEDCOM Path Path Prefix Result
/media/pictures/photo.jpg /media/pictures/ [[photo.jpg]]
C:\Photos\scan.pdf C:\Photos\ [[scan.pdf]]
photo.jpg (none) [[photo.jpg]]

Import Wizard Preview:

Before import, the wizard shows a live preview of how GEDCOM paths will be converted to wikilinks. This helps you verify the path prefix setting is correct.

Vault Validation:

After import, Charted Roots validates that referenced media files exist in your vault. A notification reports any missing files, allowing you to copy them to your media folder.

Frontmatter Output:

media:
  - "[[photo1.jpg]]"
  - "[[document.pdf]]"

💡 Tip: If your media is stored in an external folder, consider using Obsidian's symlink support to link that folder into your vault's media directory.

After Import

  1. Wait for sync completion - If bidirectional sync is enabled, Charted Roots automatically processes all imported relationships. Progress notifications show sync status.
  2. Review imported notes in your configured folders (People, Events, Sources, Places)
  3. Add research notes below the frontmatter in each file
  4. Generate tree using Control Center → Tree Generation

Duplicate Handling

Person Notes: If you import the same GEDCOM multiple times:

  • Existing cr_id values are preserved
  • Relationships are updated (not duplicated)
  • New individuals are added
  • Warnings appear for conflicts

Place Notes: Place duplicate detection uses multiple strategies:

  • Primary: Case-insensitive match on full_name property
  • Fallback: Match by title + parent combination (for places with same name in different regions)
  • Existing places are updated (missing parent links added) rather than duplicated

State Abbreviation Normalization: US state abbreviations are automatically expanded to full names during import:

  • Comma-separated: Abbeville, SC, USAAbbeville, South Carolina, USA
  • Space-separated: Abbeville SCAbbeville, South Carolina

This prevents duplicate place notes from being created when GEDCOM data contains inconsistent state formats. All 50 US states plus DC are supported.

Place Type Inference: When importing places, Charted Roots uses context-aware type inference:

  • Administrative division suffixes (County, Parish, Township, etc.) are detected
  • When both "Abbeville" and "Abbeville County" exist as siblings, the non-suffixed version is inferred as a city/town rather than a county

Exporting to GEDCOM

Export your family data back to GEDCOM format for sharing with other genealogy software or family members.

Using the Export Wizard:

  1. Open the Import/Export Hub (see Opening the Hub)
  2. Click the Export card
  3. Select GEDCOM 5.5.1 format
  4. Choose folders:
    • Preference folders — Uses paths configured in Preferences
    • Specify folders — Select custom folders for each entity type
  5. Configure privacy and inclusion options
  6. Review the preview showing entity counts and privacy summary
  7. Click Export to generate the file
  8. Download or save the exported .ged file

Using Context Menu (Quick Export):

  1. Right-click on a folder containing person notes
  2. Select Export folder to GEDCOM
  3. Choose export options
  4. Save the .ged file

What Gets Exported:

  • All person notes in the selected folder
  • Relationships (parents, spouses, children)
  • Birth and death dates/places
  • Burial date and place
  • Cause of death
  • Marriage metadata (dates, locations, divorce dates) on FAM records
  • Marriage variants (banns, contract, license, settlement) and divorce filed events
  • Name components: prefix (NPFX), suffix (NSFX), surname prefix (SPFX), nickname (NICK)
  • Person attributes: title, religion, nationality, physical description, ID number, property, caste, children count, marriage count, SSN
  • Occupation (inline value)
  • Age at event (AGE sub-tag)
  • Date ranges (FROM/TO and BET/AND)
  • Adult christening (CHRA) and standard christening (CHR) events
  • Citation metadata: PAGE and QUAY sub-tags on SOUR references (from citation notes)
  • cr_id values preserved as _UUID tags
  • group_name values preserved as collection codes
  • research_level preserved as _RESEARCH_LEVEL custom tag (0-6)
  • Original GEDCOM xref IDs (if imported from GEDCOM) for round-trip support

Privacy Protection for Export

Charted Roots includes optional privacy controls for protecting living persons in GEDCOM exports:

Enable Privacy Protection:

  1. Go to Settings → Charted Roots → GEDCOM section
  2. Enable "Privacy protection for living persons"
  3. Configure the birth year threshold (default: 100 years ago)

Privacy Options:

  • Exclude living persons: Completely remove potentially living people from export
  • Anonymize living persons: Include structure but replace PII with "[Living]"

How Living Status is Determined:

  • People without death dates AND born after the threshold year are considered potentially living
  • Threshold is configurable (e.g., born after 1925 = potentially living)
  • Family structure is maintained even when details are anonymized

Use Cases:

  • Share family trees publicly without exposing living relatives' data
  • Comply with genealogical privacy best practices
  • Create "public" and "private" versions of your research

Exporting to Gramps XML

Export your family data to Gramps XML format (.gramps) for use with the Gramps desktop application. Available in the Export Wizard alongside GEDCOM.

What Gets Exported:

  • All person notes with relationships, dates, and places
  • Events linked to persons with source references
  • Source records
  • Places with hierarchy
  • Citation metadata: spage and confidence elements on sourceref tags (from citation notes)

Gramps XML Import

Charted Roots supports importing family data from Gramps, a popular open-source genealogy application.

Supported File Formats

  • .gpkg - Gramps Package (recommended) — bundles XML data with media files
  • .gramps - Native Gramps compressed format (gzip-compressed XML)
  • .xml - Uncompressed Gramps XML export

💡 Tip: Export from Gramps as .gpkg to include media files (photos, documents, scans). Charted Roots will extract them to your vault automatically.

Importing a Gramps File

Using the Import Wizard:

  1. Open the Import/Export Hub (see Opening the Hub)
  2. Click the Import card
  3. Select Gramps XML format (note: ".gpkg includes media")
  4. Drag and drop your .gpkg, .gramps, or .xml file
  5. Configure import options:
    • Entity types — People, events, sources, places (toggle each on/off)
    • Target folder — Where to create notes
    • Dynamic blocks — Enable/disable dynamic content blocks
  6. Review the preview showing entity counts and media files
  7. Click Import to begin (media files are automatically extracted from .gpkg)
  8. Optionally apply reference numbering
  9. Review summary and use quick actions

What Gets Created

Note Type What's Created
People One note per individual with relationships, dates, places, and linked media
Sources One note per source record with citations and linked media
Places One note per location (when enabled), linked from person notes, with linked media
Events One note per life event (when enabled), linked to persons, places, and media
Media Files extracted from .gpkg packages to your media folder

Place Linking

When you enable "Create place notes", Charted Roots:

  1. Creates place notes first
  2. Automatically converts birth/death places in person notes to wikilinks
  3. Links event notes to place notes as well

This creates a fully connected web of notes where you can navigate between people, events, and places.

Supported Event Types

Gramps events are mapped to Charted Roots event types:

Gramps Event Charted Roots Type
Birth birth
Death death
Marriage marriage
Divorce divorce
Burial burial
Baptism, Christening baptism
Confirmation confirmation
Ordination ordination
Residence residence
Occupation occupation
Military, Military Service military
Immigration, Emigration, Naturalization immigration
Education, Graduation education

Events not in this list are imported as "custom" type.

Person Attributes

Gramps person attributes are imported when present:

Gramps Attribute Charted Roots Property Description
Research Level research_level Research progress level (0-6)

The Research Level attribute is automatically recognized from Gramps person records and imported as the research_level property. See Research Level for details on the 0-6 scale.

Notes Import

Notes attached to entities in Gramps can be imported in two ways:

  1. Embedded notes (default) — Notes are appended to the corresponding entity note as a "## Notes" section
  2. Separate note files (opt-in) — Notes are created as standalone files in a dedicated Notes folder with wikilinks from the entity

The import wizard includes two toggles for notes:

  • Notes — Enable/disable notes import entirely (enabled by default)
  • Create separate note files — When enabled, creates standalone note files instead of embedding (disabled by default)

Embedded notes (default behavior):

Entity Type Notes Location
Person Appended as "## Notes" section in person note
Event Appended as "## Notes" section in event note
Place Appended as "## Notes" section in place note
Family Attached to marriage/family events (no separate family entity)

Separate note files:

When "Create separate note files" is enabled:

Note Created As
Note file Standalone file with cr_type: note in configured Notes folder
Entity link Wikilink added to entity's notes frontmatter property
Naming {NoteType} on {EntityName} (e.g., "Research on John Smith")

Separate note files include:

  • cr_type: note — Identifies as a note entity
  • cr_id — Unique identifier for sync support
  • gramps_id / gramps_handle — Original Gramps identifiers for round-tripping
  • cr_note_type — Note type from Gramps (Research, Person Note, Transcript, etc.)
  • private: true — When the Gramps note has the privacy flag set

This approach is recommended when:

  • You want to maintain notes as separate, reusable research documents
  • Multiple entities share the same research note
  • You plan to export data back to Gramps (preserves note identity)

Note formatting:

Gramps note styling is converted to Markdown:

Gramps Style Markdown Output
Bold **text**
Italic *text*
Strikethrough ~~text~~
Underline <u>text</u>
Superscript <sup>text</sup>
Subscript <sub>text</sub>
Link [text](url)

Note format handling:

  • Flowed notes (default): Normal text, rendered as regular Markdown
  • Formatted notes (preformatted): Wrapped in code fences to preserve whitespace

Note types:

Each note's type from Gramps (e.g., "Person Note", "Research", "Source text") becomes a ### Heading in the imported content, making it easy to distinguish different types of notes on the same entity.

Privacy handling:

If any note attached to an entity has the privacy flag set in Gramps (priv="1"), the imported Obsidian note will include private: true in its frontmatter. This allows you to filter or exclude private data when exporting.

Create Note Modal

In addition to importing notes from Gramps, you can manually create note entities using the Create Note modal.

Opening the Create Note Modal:

Method How
Command Palette Ctrl/Cmd+P → "Charted Roots: Create note"
Control Center Click Create Note in the Quick Actions

Create Note Form:

Field Description
Title Note title (used as filename)
Note type Classification: Research, Person Note, Transcript, Source text, General, or Custom
Custom type Shown when "Custom" is selected; enter your own type
Private Mark note as private (excluded from exports)
Linked entities Link to Person, Event, Place, or Source notes
Initial content Optional starting content for the note

Linking Entities:

Click "Add entity" to open a dropdown menu with entity type options:

  • Person — Opens person picker to search and select people
  • Event — Opens event picker to search and select events
  • Place — Opens place picker to search and select places
  • Source — Opens source picker to search and select sources

Selected entities appear as chips with remove buttons. These become wikilinks in the note's linked_entities frontmatter property.

Note File Structure:

---
cr_type: note
cr_id: note_abc123
cr_note_type: Research
linked_entities:
  - "[[John Smith]]"
  - "[[1850 Census]]"
---

Your note content here...

Place Type Mapping

Gramps place types are preserved and mapped to Charted Roots place types:

  • Administrative: country, state, province, county, region, district, borough, municipality
  • Populated: city, town, village, parish, neighborhood
  • Specific: cemetery, church, building, farm, street, address

After Import

  1. Review imported notes in your configured folders
  2. Add research notes below the frontmatter in each file
  3. Generate tree using Control Center → Tree Generation

Media Import from .gpkg

When importing a .gpkg package file, Charted Roots:

  1. Extracts media files to your configured media folder
  2. Links media to entities — Photos, documents, and scans attached in Gramps are linked to the corresponding person, event, place, or source notes via the media frontmatter property
  3. Preserves order — The first media item serves as the thumbnail (matching Gramps convention)

Media extracted from Gramps packages can be viewed using the Media Gallery dynamic block.

Limitations

  • Repositories: Repository records create properties on sources but not separate notes

CSV Import/Export

Charted Roots supports CSV and TSV file formats for easy data exchange with spreadsheets and other applications.

Importing from CSV/TSV

Using the Import Wizard:

  1. Open the Import/Export Hub (see Opening the Hub)
  2. Click the Import card
  3. Select CSV format
  4. Drag and drop your .csv or .tsv file
  5. Review the auto-detected column mapping and adjust if needed
  6. Configure target folder and options
  7. Review the preview
  8. Click Import to create notes

Auto-Detected Column Mapping:

Charted Roots automatically detects common column names and maps them to person properties:

Detected columns Maps to
name, full name, person name
birth, born, birth date born
death, died, death date died
father, father name father
mother, mother name mother
spouse, spouse name spouse
gender, sex gender

You can manually adjust any mapping before importing if the auto-detection doesn't match your file's column names.

What Happens:

  • Creates one Markdown note per row
  • Generates cr_id for each person automatically
  • Creates relationship links when parent/spouse columns reference other people in the file
  • Supports both wikilink format ([[Name]]) and plain text names

Exporting to CSV

Using the Export Wizard:

  1. Open the Import/Export Hub (see Opening the Hub)
  2. Click the Export card
  3. Select CSV format (coming soon)
  4. Choose folders to export from
  5. Configure columns to include
  6. Enable privacy protection if needed
  7. Review and export

Note: CSV export via the wizard is planned for a future release. Currently available via context menu on folders.

Configurable Columns:

Choose which fields to include in your export:

  • Core fields: name, cr_id, gender
  • Dates: born, died
  • Relationships: father, mother, spouse, children
  • Metadata: collection, group_name, lineage

Privacy Protection:

Same privacy options as GEDCOM export:

  • Exclude living persons entirely
  • Anonymize living persons (replace PII with "[Living]")
  • Configurable birth year threshold

Format Comparison

Feature CSV GEDCOM Gramps XML
Compatibility Spreadsheets, databases Most genealogy software Gramps only
Structure Flat (one row per person) Hierarchical (individuals + families) Hierarchical with events
Best for Quick edits, bulk changes Software interchange Gramps users
Marriage data Limited Full support Full support
Place hierarchy No Limited Yes
Events No Yes Yes
Sources No Yes Not yet
Export support Yes Yes Import only
Use case Working with data Archiving/sharing Migration from Gramps

Selective Branch Export

Export specific portions of your family tree rather than the entire dataset. Available for both GEDCOM and CSV formats.

Branch Types

Ancestors Only: Export only the ancestors (parents, grandparents, etc.) of a selected person.

  • Useful for pedigree charts
  • Creates focused lineage documentation
  • Reduces file size for large trees

Descendants Only: Export only the descendants (children, grandchildren, etc.) of a selected person.

  • Useful for descendant reports
  • Can optionally include spouses of descendants
  • Great for sharing a specific family branch

How to Use Selective Export

Using the Export Wizard:

  1. Open the Import/Export Hub and click Export
  2. Select your format (GEDCOM 5.5.1)
  3. In the Folders step, select "Branch export" mode
  4. Choose a root person for the branch
  5. Select branch type (ancestors or descendants)
  6. Optionally enable "Include spouses" for descendant exports
  7. Complete the remaining wizard steps

Combining with Collection Filtering

Selective branch export works together with collection filtering for precise exports:

  1. Filter by collection to narrow the scope
  2. Then apply branch selection to further refine
  3. Result includes only people matching both criteria

Example workflow:

  • Filter to "Maternal Line" collection
  • Select branch: descendants of "Great-Grandmother Jane"
  • Export only that specific branch within the maternal line

Include Spouses Option

When exporting descendants, you can optionally include spouses:

  • Enabled: Includes spouses of each descendant (helps show family units)
  • Disabled: Exports only direct blood descendants

This option is particularly useful when you want complete family units rather than just the bloodline.

⚠️ **GitHub.com Fallback** ⚠️