Skip to content

Commit 6a3a2bd

Browse files
committed
Merge main into v7.1 (excluding extracted-files)
1 parent 025620d commit 6a3a2bd

20 files changed

Lines changed: 456 additions & 461 deletions

.github/copilot-instructions.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ make
3737
If the build completes but the `extracted-files/tags/` directory is empty, run the URI extraction manually:
3838
```bash
3939
cd build
40-
python3 uri-def.py ../specification/gedcom*.md ../extracted-files/tags
40+
python3 extract-yaml.py --spec=../specification/ --dest=../extracted-files/
41+
python3 yaml-to-tsv.py --dest=../extracted-files/ ../extracted-files/tags
4142
```
4243

4344
This command generates:
@@ -94,7 +95,8 @@ mkdir -p ../extracted-files/tags
9495
make
9596

9697
# If tags directory is empty, run URI extraction manually
97-
python3 uri-def.py ../specification/gedcom*.md ../extracted-files/tags
98+
python3 extract-yaml.py --spec=../specification/ --dest=../extracted-files/
99+
python3 yaml-to-tsv.py --dest=../extracted-files/ ../extracted-files/tags
98100

99101
# Verify generated files exist
100102
ls -la ../specification/gedcom.html ../specification/gedcom.pdf
@@ -117,7 +119,7 @@ The repository has automated workflows that run on pushes and pull requests:
117119
- Creates PRs with updated extracted files if changes detected
118120
- Uses commands:
119121
- `python3 extract-grammars.py ../specification/gedcom*.md ../extracted-files/`
120-
- `python3 uri-def.py ../specification/gedcom*.md ../extracted-files/tags`
122+
- `python3 extract-yaml.py --spec=../specification/ --dest=../extracted-files/`
121123

122124
## Repository Structure
123125

@@ -144,7 +146,8 @@ The repository has automated workflows that run on pushes and pull requests:
144146
- `hyperlink.py` - Adds hyperlinks to markdown
145147
- `hyperlink-code.py` - Adds hyperlinks to code blocks in HTML
146148
- `extract-grammars.py` - Extracts ABNF and structure grammars
147-
- `uri-def.py` - Extracts tag definitions and generates YAML files
149+
- `extract-yaml.py` - Extracts tag definitions and generates YAML files
150+
- `yaml-to-tsv.py` - Extracts TSV files from YAML files
148151
- `push_to_gedcomio.py` - Uploads to gedcom.io (requires special access)
149152

150153
## Common Development Tasks
@@ -195,4 +198,4 @@ If build fails:
195198
The build process emits CSS-related warnings from weasyprint - these are normal and documented. Only stop the build for actual errors, not warnings.
196199

197200
### File Publishing
198-
Publishing to gedcom.io requires access to the separate GEDCOM.io repository and is not part of normal development workflows.
201+
Publishing to gedcom.io requires access to the separate GEDCOM.io repository and is not part of normal development workflows.

.github/workflows/generate-files.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
steps:
2929
- name: Check out GEDCOM
30-
uses: actions/checkout@v5
30+
uses: actions/checkout@v6
3131

3232
- name: Get the branch name
3333
id: extract_branch
@@ -42,7 +42,8 @@ jobs:
4242
run: |
4343
export MD_FILES=$(ls ${{ env.SPECDIR }}gedcom*.md | sort)
4444
python3 extract-grammars.py ${MD_FILES} ${{ env.EXTDIR }}
45-
python3 uri-def.py ${MD_FILES} ${{ env.EXTDIR }}tags
45+
python3 extract-yaml.py --spec=${{ env.SPECDIR }} --dest=${{ env.EXTDIR }}
46+
python3 yaml-to-tsv.py --dest=${{ env.EXTDIR }} ${{ env.EXTDIR }}tags
4647
ls -l ${{env.EXTDIR}}
4748
4849
- name: Set git config

.github/workflows/propagate-main-to-v7.1.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
steps:
2626
- name: Check out GEDCOM
27-
uses: actions/checkout@v5
27+
uses: actions/checkout@v6
2828

2929
- name: Set git config
3030
env:

.github/workflows/validate-yaml.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: Checkout GEDCOM
24-
uses: actions/checkout@v5
24+
uses: actions/checkout@v6
2525

2626
- name: Validate YAML
2727
run: yamllint .

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 1984-2025 Intellectual Reserve, Inc. All rights reserved. A service provided by The Church of Jesus Christ of Latter-day Saints.
189+
Copyright 1984-2026 Intellectual Reserve, Inc. All rights reserved. A service provided by The Church of Jesus Christ of Latter-day Saints.
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
NOTICE:
22

33
This work comprises, is based on, or is derived from the FAMILYSEARCH GEDCOM™
4-
Specification, © 1984-2025 Intellectual Reserve, Inc. All rights reserved.
4+
Specification, © 1984-2026 Intellectual Reserve, Inc. All rights reserved.
55

66
"FAMILYSEARCH GEDCOM™" and "FAMILYSEARCH®" are trademarks of Intellectual
77
Reserve, Inc. and may not be used except as allowed by the Apache 2.0 license

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ If you are looking for FamilySearch's GEDCOM 5.5.1 Java parser, which previously
1515
- `specification/gedcom-`number`-`title`.md` files are the source documents used to define the FamilySearch GEDCOM specification. It is written in pandoc-flavor markdown and is intended to be more easily written than read. It is split into several files (ordered by the integer in their names) to facilitate comparing files.
1616
- In a local check-out, this is also where the build scripts place rendered files `gedcom.html` and `gedcom.pdf`; see [releases](releases/latest) for a pre-rendered copy of these.
1717
- [`specification/terms/`](specification/terms/)
18-
- YAML files to be served in the <https://gedcom.io/terms/v7/> namespace, augmenting those automatically extracted from the specification itself by [`build/uri-def.py`](build/uri-def.py).
18+
- YAML files to be served in the <https://gedcom.io/terms/v7/> namespace, augmenting those automatically extracted from the specification itself by [`build/extract-yaml.py`](build/extract-yaml.py).
1919
- [`build/`](build/) contains files needed to render the specification
2020
- See [`build/README.md`](build/) for more
2121
- [`extracted-files/`](extracted-files/) contains digested information automatically extracted from the specification. All files in this directory are automatically generated by scripts in the [`build/`](build/) directory.
2222
- [`extracted-files/grammar.abnf`](extracted-files/grammar.abnf) contains all the character-level ABNF for parsing lines and datatypes.
2323
- [`extracted-files/grammar.gedstruct`](extracted-files/grammar.gedstruct) contains a custom structure organization metasyntax.
24-
- various `.tsv` files to assist automated validation of files, including:
24+
- various `.tsv` files to assist automated validation of files, extracted from the YAML files by [`build/yaml-to-tsv.py`](build/yaml-to-tsv.py), including:
2525
- [`extracted-files/cardinalities.tsv`](extracted-files/cardinalities.tsv) with columns "superstructure type ID, substructure type ID, cardinality marker"
2626
- [`extracted-files/enumerations.tsv`](extracted-files/enumerations.tsv) with columns "superstructure type ID, enumeration string, enumeration ID"
2727
- [`extracted-files/payloads.tsv`](extracted-files/payloads.tsv) with columns "structure type ID, payload type"

build/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ $(HTML_FILE): hyperlink-code.py GEDCOM-tmp.html
2121
python3 hyperlink-code.py GEDCOM-tmp.html $(HTML_FILE)
2222

2323
$(TAGDEFS): $(MD_FILES) $(TERMS_FILES) $(EXTDIR)grammar.gedstruct extract-yaml.py
24+
mkdir -p $(TAGDEFS)
2425
python3 extract-yaml.py --spec=$(SPECDIR) --dest=$(EXTDIR)
2526
rsync -au $(TERMS_FILES) $(EXTDIR)tags
2627
python3 yaml-to-tsv.py --dest=$(EXTDIR) $(TAGDEFS)

build/extract-yaml.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,12 @@ def type_specific(self) -> list[str]:
157157
if val is None: ans.append(key+': null')
158158
elif val == [] or isinstance(val, bool): ans.append(key+': '+str(val).lower())
159159
elif isinstance(val, str):
160-
assert '"' not in val and '\n' not in val, f"Simplified serialization failed for {uri}'s {key}"
160+
assert '"' not in val and '\n' not in val, f"Simplified serialization failed for {self.uri}'s {key}"
161161
ans.append(key+': "'+val+'"')
162162
else:
163163
entry = key+':'
164164
for v in (sorted(val) if key != 'months' else val):
165-
assert '"' not in v and '\n' not in v, f"Simplified serialization failed for {uri}'s {key}"
165+
assert '"' not in v and '\n' not in v, f"Simplified serialization failed for {self.uri}'s {key}"
166166
entry += '\n - "'+v+'"'
167167
ans.append(entry)
168168

@@ -392,7 +392,7 @@ def do_pfx(uri:str) -> str:
392392
if not uri.startswith('https://gedcom.io'): continue # not ours to define
393393
if uri not in data: data[uri] = Concept('data type', uri)
394394
data[uri].set('label', header)
395-
if re.search(f'^{typename.replace(':','-')} +=', section, flags=re.M):
395+
if re.search(f"^{typename.replace(':','-')} +=", section, flags=re.M):
396396
data[uri].set('abnf_production', typename.replace(':','-'))
397397
data[uri].spec.append(section)
398398

@@ -436,7 +436,7 @@ def do_pfx(uri:str) -> str:
436436

437437
# step 1: read the files
438438
src_gedstruct = open(Path(args.dest, 'grammar.gedstruct')).read()
439-
src_markdown = '\n\n'.join(open(s).read().replace('\xA0',' ') for s in args.spec.glob('gedcom*.md'))
439+
src_markdown = '\n\n'.join(open(s).read().replace('\xA0',' ') for s in sorted(args.spec.glob('gedcom*.md')))
440440

441441
# step 2: find all tables and convert them to {section header: [{column header: column value}]}
442442
tables = all_tables(src_markdown)

build/hyperlink-code.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ def anchorify(m):
4444
return full
4545

4646
doc = re.sub(r'<code>(g7:[^<]*)</code></h', r'<code class="uri">\1</code></h', doc)
47-
doc = re.sub(r'<code>(g7.1:[^<]*)</code></h', r'<code class="uri">\1</code></h', doc)
4847

4948
chunks = re.split(r'(<pre[^>]*ged(?:struct|com)[^>]*>.*?</pre>)', doc, flags=re.DOTALL)
5049

0 commit comments

Comments
 (0)