From e407eb38fdf6770218189a295d109e40f6275ed0 Mon Sep 17 00:00:00 2001 From: lamco-office Date: Mon, 28 Jul 2025 18:28:45 +0300 Subject: [PATCH 01/11] Add Tag Extension structures This adds structures for the GEDCOM Tag Extension, which enables preservation of organizational tags commonly used in genealogy software. Extension repository: https://github.com/glamberson/gedcom-tags Structures added: - _TAG: Tag record type for defining reusable organizational markers - _TAG (ref): Substructure for applying tags to records - _COLOR: Optional color specification (6-digit hex) - _ATTR: Generic vendor attribute mechanism - _VALUE: Value for generic attributes --- structure/_ATTR.yaml | 32 ++++++++++++++++++++++++++++ structure/_COLOR.yaml | 31 +++++++++++++++++++++++++++ structure/_TAG.yaml | 37 +++++++++++++++++++++++++++++++++ structure/_TAG_ref.yaml | 46 +++++++++++++++++++++++++++++++++++++++++ structure/_VALUE.yaml | 28 +++++++++++++++++++++++++ 5 files changed, 174 insertions(+) create mode 100644 structure/_ATTR.yaml create mode 100644 structure/_COLOR.yaml create mode 100644 structure/_TAG.yaml create mode 100644 structure/_TAG_ref.yaml create mode 100644 structure/_VALUE.yaml diff --git a/structure/_ATTR.yaml b/structure/_ATTR.yaml new file mode 100644 index 00000000..b6afdda0 --- /dev/null +++ b/structure/_ATTR.yaml @@ -0,0 +1,32 @@ +%YAML 1.2 +--- +lang: en-US + +type: structure + +uri: https://gedcom.io/terms/v7/_ATTR + +standard tag: _ATTR + +specification: + - Generic Attribute + - | + The _ATTR structure provides a generic mechanism for vendors to add + custom attributes to tags. The payload contains the attribute name, + and the required _VALUE substructure contains the attribute value. + + This allows software to extend tags with specific functionality + without requiring changes to the base specification. + +label: 'Attribute' + +payload: http://www.w3.org/2001/XMLSchema#string + +substructures: + "https://gedcom.io/terms/v7/_VALUE": "{1:1}" + +superstructures: + "https://gedcom.io/terms/v7/_TAG": "{0:M}" + +contact: "glamberson@gmail.com" +... \ No newline at end of file diff --git a/structure/_COLOR.yaml b/structure/_COLOR.yaml new file mode 100644 index 00000000..f6bb30d1 --- /dev/null +++ b/structure/_COLOR.yaml @@ -0,0 +1,31 @@ +%YAML 1.2 +--- +lang: en-US + +type: structure + +uri: https://gedcom.io/terms/v7/_COLOR + +standard tag: _COLOR + +specification: + - Color + - | + The _COLOR structure specifies a color for visual representation of a tag. + The color must be specified as a 6-digit hexadecimal value in the format + #RRGGBB, where RR is red, GG is green, and BB is blue. Values are + case-insensitive. + + Examples: #FF0000 (red), #00FF00 (green), #0000FF (blue) + +label: 'Color' + +payload: http://www.w3.org/2001/XMLSchema#string + +substructures: {} + +superstructures: + "https://gedcom.io/terms/v7/_TAG": "{0:1}" + +contact: "glamberson@gmail.com" +... \ No newline at end of file diff --git a/structure/_TAG.yaml b/structure/_TAG.yaml new file mode 100644 index 00000000..8fb3427b --- /dev/null +++ b/structure/_TAG.yaml @@ -0,0 +1,37 @@ +%YAML 1.2 +--- +lang: en-US + +type: record + +uri: https://gedcom.io/terms/v7/_TAG + +standard tag: _TAG + +specification: + - Tag Record + - | + A _TAG record represents an organizational tag that can be applied to + any record type for categorization purposes. Tags support optional + visual color coding and vendor-specific attributes through the + generic _ATTR mechanism. + + Tags are first-class records that exist at the top level and are + referenced by other records using the _TAG substructure. + +label: 'Tag' + +payload: null + +substructures: + "https://gedcom.io/terms/v7/NAME": "{1:1}" + "https://gedcom.io/terms/v7/_COLOR": "{0:1}" + "https://gedcom.io/terms/v7/_ATTR": "{0:M}" + "https://gedcom.io/terms/v7/NOTE": "{0:M}" + "https://gedcom.io/terms/v7/SNOTE": "{0:M}" + "https://gedcom.io/terms/v7/CHAN": "{0:1}" + +superstructures: {} + +contact: "glamberson@gmail.com" +... \ No newline at end of file diff --git a/structure/_TAG_ref.yaml b/structure/_TAG_ref.yaml new file mode 100644 index 00000000..7da83a66 --- /dev/null +++ b/structure/_TAG_ref.yaml @@ -0,0 +1,46 @@ +%YAML 1.2 +--- +lang: en-US + +type: structure + +uri: https://gedcom.io/terms/v7/_TAG + +standard tag: _TAG + +specification: + - Tag Reference + - | + When used as a substructure, _TAG references a tag record to apply + that tag to the containing record. The payload is a pointer to a + _TAG record. Optional DATE and NOTE substructures can provide + context about when and why the tag was applied. + +label: 'Tag Reference' + +payload: https://gedcom.io/terms/v7/type-Pointer + +substructures: + "https://gedcom.io/terms/v7/DATE": "{0:1}" + "https://gedcom.io/terms/v7/NOTE": "{0:M}" + +superstructures: + "https://gedcom.io/terms/v7/record-INDI": "{0:M}" + "https://gedcom.io/terms/v7/record-FAM": "{0:M}" + "https://gedcom.io/terms/v7/record-SOUR": "{0:M}" + "https://gedcom.io/terms/v7/record-REPO": "{0:M}" + "https://gedcom.io/terms/v7/record-OBJE": "{0:M}" + "https://gedcom.io/terms/v7/record-NOTE": "{0:M}" + "https://gedcom.io/terms/v7/record-SNOTE": "{0:M}" + "https://gedcom.io/terms/v7/record-SUBM": "{0:M}" + "https://gedcom.io/terms/v7/EVEN": "{0:M}" + "https://gedcom.io/terms/v7/BIRT": "{0:M}" + "https://gedcom.io/terms/v7/DEAT": "{0:M}" + "https://gedcom.io/terms/v7/MARR": "{0:M}" + "https://gedcom.io/terms/v7/CENS": "{0:M}" + "https://gedcom.io/terms/v7/PLAC": "{0:M}" + "https://gedcom.io/terms/v7/NAME": "{0:M}" + "https://gedcom.io/terms/v7/ASSO": "{0:M}" + +contact: "glamberson@gmail.com" +... \ No newline at end of file diff --git a/structure/_VALUE.yaml b/structure/_VALUE.yaml new file mode 100644 index 00000000..3368deb5 --- /dev/null +++ b/structure/_VALUE.yaml @@ -0,0 +1,28 @@ +%YAML 1.2 +--- +lang: en-US + +type: structure + +uri: https://gedcom.io/terms/v7/_VALUE + +standard tag: _VALUE + +specification: + - Attribute Value + - | + The _VALUE structure contains the value for a generic attribute + defined by _ATTR. The value is a string that can contain any + vendor-specific data. + +label: 'Value' + +payload: http://www.w3.org/2001/XMLSchema#string + +substructures: {} + +superstructures: + "https://gedcom.io/terms/v7/_ATTR": "{1:1}" + +contact: "glamberson@gmail.com" +... \ No newline at end of file From 26707a7fc5d177e81c77f5eae1198a34468b46b2 Mon Sep 17 00:00:00 2001 From: lamco-office Date: Mon, 28 Jul 2025 20:04:40 +0300 Subject: [PATCH 02/11] Fix YAML validation errors for TAG extension - Move structure files to structure/extension/ subdirectory - Add extension-tags.yaml manifest file - Add 'extension tags:' field to all structure files - Update URIs to point to GitHub extension repository - Update contact email to lamberson@yahoo.com --- extension-tags.yaml | 29 +++++++++++++++++++++++++ structure/{ => extension}/_ATTR.yaml | 10 +++++---- structure/{ => extension}/_COLOR.yaml | 8 ++++--- structure/{ => extension}/_TAG.yaml | 10 +++++---- structure/{ => extension}/_TAG_ref.yaml | 6 +++-- structure/{ => extension}/_VALUE.yaml | 8 ++++--- 6 files changed, 55 insertions(+), 16 deletions(-) create mode 100644 extension-tags.yaml rename structure/{ => extension}/_ATTR.yaml (71%) rename structure/{ => extension}/_COLOR.yaml (75%) rename structure/{ => extension}/_TAG.yaml (76%) rename structure/{ => extension}/_TAG_ref.yaml (92%) rename structure/{ => extension}/_VALUE.yaml (68%) diff --git a/extension-tags.yaml b/extension-tags.yaml new file mode 100644 index 00000000..974a9898 --- /dev/null +++ b/extension-tags.yaml @@ -0,0 +1,29 @@ +%YAML 1.2 +--- +lang: en-US + +name: https://github.com/glamberson/gedcom-tags + +description: | + Organizational tag extension for GEDCOM 7. + + This extension provides a mechanism for users to organize their genealogical + data using custom tags with optional visual color coding. Tags are first-class + records that can be referenced by any other record type for flexible + categorization. + +authors: + - Greg Lamberson + +requirements: + - https://gedcom.io/terms/v7 + +tags: + - https://github.com/glamberson/gedcom-tags/_TAG + - https://github.com/glamberson/gedcom-tags/_TAG_ref + - https://github.com/glamberson/gedcom-tags/_COLOR + - https://github.com/glamberson/gedcom-tags/_ATTR + - https://github.com/glamberson/gedcom-tags/_VALUE + +contact: lamberson@yahoo.com +... \ No newline at end of file diff --git a/structure/_ATTR.yaml b/structure/extension/_ATTR.yaml similarity index 71% rename from structure/_ATTR.yaml rename to structure/extension/_ATTR.yaml index b6afdda0..946dce48 100644 --- a/structure/_ATTR.yaml +++ b/structure/extension/_ATTR.yaml @@ -4,10 +4,12 @@ lang: en-US type: structure -uri: https://gedcom.io/terms/v7/_ATTR +uri: https://github.com/glamberson/gedcom-tags/_ATTR standard tag: _ATTR +extension tags: _ATTR + specification: - Generic Attribute - | @@ -23,10 +25,10 @@ label: 'Attribute' payload: http://www.w3.org/2001/XMLSchema#string substructures: - "https://gedcom.io/terms/v7/_VALUE": "{1:1}" + "https://github.com/glamberson/gedcom-tags/_VALUE": "{1:1}" superstructures: - "https://gedcom.io/terms/v7/_TAG": "{0:M}" + "https://github.com/glamberson/gedcom-tags/_TAG": "{0:M}" -contact: "glamberson@gmail.com" +contact: "lamberson@yahoo.com" ... \ No newline at end of file diff --git a/structure/_COLOR.yaml b/structure/extension/_COLOR.yaml similarity index 75% rename from structure/_COLOR.yaml rename to structure/extension/_COLOR.yaml index f6bb30d1..be7f72ad 100644 --- a/structure/_COLOR.yaml +++ b/structure/extension/_COLOR.yaml @@ -4,10 +4,12 @@ lang: en-US type: structure -uri: https://gedcom.io/terms/v7/_COLOR +uri: https://github.com/glamberson/gedcom-tags/_COLOR standard tag: _COLOR +extension tags: _COLOR + specification: - Color - | @@ -25,7 +27,7 @@ payload: http://www.w3.org/2001/XMLSchema#string substructures: {} superstructures: - "https://gedcom.io/terms/v7/_TAG": "{0:1}" + "https://github.com/glamberson/gedcom-tags/_TAG": "{0:1}" -contact: "glamberson@gmail.com" +contact: "lamberson@yahoo.com" ... \ No newline at end of file diff --git a/structure/_TAG.yaml b/structure/extension/_TAG.yaml similarity index 76% rename from structure/_TAG.yaml rename to structure/extension/_TAG.yaml index 8fb3427b..2c7b7d7d 100644 --- a/structure/_TAG.yaml +++ b/structure/extension/_TAG.yaml @@ -4,10 +4,12 @@ lang: en-US type: record -uri: https://gedcom.io/terms/v7/_TAG +uri: https://github.com/glamberson/gedcom-tags/_TAG standard tag: _TAG +extension tags: _TAG + specification: - Tag Record - | @@ -25,13 +27,13 @@ payload: null substructures: "https://gedcom.io/terms/v7/NAME": "{1:1}" - "https://gedcom.io/terms/v7/_COLOR": "{0:1}" - "https://gedcom.io/terms/v7/_ATTR": "{0:M}" + "https://github.com/glamberson/gedcom-tags/_COLOR": "{0:1}" + "https://github.com/glamberson/gedcom-tags/_ATTR": "{0:M}" "https://gedcom.io/terms/v7/NOTE": "{0:M}" "https://gedcom.io/terms/v7/SNOTE": "{0:M}" "https://gedcom.io/terms/v7/CHAN": "{0:1}" superstructures: {} -contact: "glamberson@gmail.com" +contact: "lamberson@yahoo.com" ... \ No newline at end of file diff --git a/structure/_TAG_ref.yaml b/structure/extension/_TAG_ref.yaml similarity index 92% rename from structure/_TAG_ref.yaml rename to structure/extension/_TAG_ref.yaml index 7da83a66..83a41c8b 100644 --- a/structure/_TAG_ref.yaml +++ b/structure/extension/_TAG_ref.yaml @@ -4,10 +4,12 @@ lang: en-US type: structure -uri: https://gedcom.io/terms/v7/_TAG +uri: https://github.com/glamberson/gedcom-tags/_TAG standard tag: _TAG +extension tags: _TAG + specification: - Tag Reference - | @@ -42,5 +44,5 @@ superstructures: "https://gedcom.io/terms/v7/NAME": "{0:M}" "https://gedcom.io/terms/v7/ASSO": "{0:M}" -contact: "glamberson@gmail.com" +contact: "lamberson@yahoo.com" ... \ No newline at end of file diff --git a/structure/_VALUE.yaml b/structure/extension/_VALUE.yaml similarity index 68% rename from structure/_VALUE.yaml rename to structure/extension/_VALUE.yaml index 3368deb5..7279ada7 100644 --- a/structure/_VALUE.yaml +++ b/structure/extension/_VALUE.yaml @@ -4,10 +4,12 @@ lang: en-US type: structure -uri: https://gedcom.io/terms/v7/_VALUE +uri: https://github.com/glamberson/gedcom-tags/_VALUE standard tag: _VALUE +extension tags: _VALUE + specification: - Attribute Value - | @@ -22,7 +24,7 @@ payload: http://www.w3.org/2001/XMLSchema#string substructures: {} superstructures: - "https://gedcom.io/terms/v7/_ATTR": "{1:1}" + "https://github.com/glamberson/gedcom-tags/_ATTR": "{1:1}" -contact: "glamberson@gmail.com" +contact: "lamberson@yahoo.com" ... \ No newline at end of file From 4e7fb1b3e024c1f7277d253c5ce48a813edc5432 Mon Sep 17 00:00:00 2001 From: Luther Tychonievich Date: Tue, 29 Jul 2025 08:28:58 -0500 Subject: [PATCH 03/11] Add newline --- extension-tags.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension-tags.yaml b/extension-tags.yaml index 974a9898..b33a8e9b 100644 --- a/extension-tags.yaml +++ b/extension-tags.yaml @@ -26,4 +26,4 @@ tags: - https://github.com/glamberson/gedcom-tags/_VALUE contact: lamberson@yahoo.com -... \ No newline at end of file +... From 668f849ca3c698f233fab0b7886cae1474587c6b Mon Sep 17 00:00:00 2001 From: Luther Tychonievich Date: Tue, 29 Jul 2025 08:29:06 -0500 Subject: [PATCH 04/11] Add newline --- structure/extension/_ATTR.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structure/extension/_ATTR.yaml b/structure/extension/_ATTR.yaml index 946dce48..1ddd0dda 100644 --- a/structure/extension/_ATTR.yaml +++ b/structure/extension/_ATTR.yaml @@ -31,4 +31,4 @@ superstructures: "https://github.com/glamberson/gedcom-tags/_TAG": "{0:M}" contact: "lamberson@yahoo.com" -... \ No newline at end of file +... From 0ea2f85e556d69e4b071fe4b1b82c50d7b13e98d Mon Sep 17 00:00:00 2001 From: Luther Tychonievich Date: Tue, 29 Jul 2025 08:29:13 -0500 Subject: [PATCH 05/11] Add newline --- structure/extension/_COLOR.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structure/extension/_COLOR.yaml b/structure/extension/_COLOR.yaml index be7f72ad..2d70afb8 100644 --- a/structure/extension/_COLOR.yaml +++ b/structure/extension/_COLOR.yaml @@ -30,4 +30,4 @@ superstructures: "https://github.com/glamberson/gedcom-tags/_TAG": "{0:1}" contact: "lamberson@yahoo.com" -... \ No newline at end of file +... From c8d25f2bb17129c9f6e6f402ee0a771657768f9a Mon Sep 17 00:00:00 2001 From: Luther Tychonievich Date: Tue, 29 Jul 2025 08:29:22 -0500 Subject: [PATCH 06/11] Add newline --- structure/extension/_TAG.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structure/extension/_TAG.yaml b/structure/extension/_TAG.yaml index 2c7b7d7d..06f34e9c 100644 --- a/structure/extension/_TAG.yaml +++ b/structure/extension/_TAG.yaml @@ -36,4 +36,4 @@ substructures: superstructures: {} contact: "lamberson@yahoo.com" -... \ No newline at end of file +... From 5eb8e3d1dd857dfa8e467ee8d237b6d3f6815de1 Mon Sep 17 00:00:00 2001 From: Luther Tychonievich Date: Tue, 29 Jul 2025 08:29:28 -0500 Subject: [PATCH 07/11] Add newline --- structure/extension/_TAG_ref.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structure/extension/_TAG_ref.yaml b/structure/extension/_TAG_ref.yaml index 83a41c8b..a4bae743 100644 --- a/structure/extension/_TAG_ref.yaml +++ b/structure/extension/_TAG_ref.yaml @@ -45,4 +45,4 @@ superstructures: "https://gedcom.io/terms/v7/ASSO": "{0:M}" contact: "lamberson@yahoo.com" -... \ No newline at end of file +... From 9d69d7f9e45d15d1d8e4e066ebae752d8eb8e05e Mon Sep 17 00:00:00 2001 From: Luther Tychonievich Date: Tue, 29 Jul 2025 08:29:35 -0500 Subject: [PATCH 08/11] Add newline --- structure/extension/_VALUE.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structure/extension/_VALUE.yaml b/structure/extension/_VALUE.yaml index 7279ada7..f0607593 100644 --- a/structure/extension/_VALUE.yaml +++ b/structure/extension/_VALUE.yaml @@ -27,4 +27,4 @@ superstructures: "https://github.com/glamberson/gedcom-tags/_ATTR": "{1:1}" contact: "lamberson@yahoo.com" -... \ No newline at end of file +... From d219b90e55771f0d847568150caffff7ab34253a Mon Sep 17 00:00:00 2001 From: lamco-office Date: Mon, 4 Aug 2025 23:56:14 +0300 Subject: [PATCH 09/11] Fix issues identified in PR review - Remove extension-tags.yaml (registries don't register extensions as a whole) - Remove 'standard tag' field from all YAML files (only use 'extension tags') - Fix duplicate URI: _TAG_ref now uses its own URI - Fix pointer payload format to use '@@' syntax Addresses feedback from Dave Thaler and Luther Tychonievich --- extension-tags.yaml | 29 ----------------------------- structure/extension/_ATTR.yaml | 2 -- structure/extension/_COLOR.yaml | 2 -- structure/extension/_TAG.yaml | 2 -- structure/extension/_TAG_ref.yaml | 6 ++---- structure/extension/_VALUE.yaml | 2 -- 6 files changed, 2 insertions(+), 41 deletions(-) delete mode 100644 extension-tags.yaml diff --git a/extension-tags.yaml b/extension-tags.yaml deleted file mode 100644 index b33a8e9b..00000000 --- a/extension-tags.yaml +++ /dev/null @@ -1,29 +0,0 @@ -%YAML 1.2 ---- -lang: en-US - -name: https://github.com/glamberson/gedcom-tags - -description: | - Organizational tag extension for GEDCOM 7. - - This extension provides a mechanism for users to organize their genealogical - data using custom tags with optional visual color coding. Tags are first-class - records that can be referenced by any other record type for flexible - categorization. - -authors: - - Greg Lamberson - -requirements: - - https://gedcom.io/terms/v7 - -tags: - - https://github.com/glamberson/gedcom-tags/_TAG - - https://github.com/glamberson/gedcom-tags/_TAG_ref - - https://github.com/glamberson/gedcom-tags/_COLOR - - https://github.com/glamberson/gedcom-tags/_ATTR - - https://github.com/glamberson/gedcom-tags/_VALUE - -contact: lamberson@yahoo.com -... diff --git a/structure/extension/_ATTR.yaml b/structure/extension/_ATTR.yaml index 1ddd0dda..1ed95689 100644 --- a/structure/extension/_ATTR.yaml +++ b/structure/extension/_ATTR.yaml @@ -6,8 +6,6 @@ type: structure uri: https://github.com/glamberson/gedcom-tags/_ATTR -standard tag: _ATTR - extension tags: _ATTR specification: diff --git a/structure/extension/_COLOR.yaml b/structure/extension/_COLOR.yaml index 2d70afb8..6520e27e 100644 --- a/structure/extension/_COLOR.yaml +++ b/structure/extension/_COLOR.yaml @@ -6,8 +6,6 @@ type: structure uri: https://github.com/glamberson/gedcom-tags/_COLOR -standard tag: _COLOR - extension tags: _COLOR specification: diff --git a/structure/extension/_TAG.yaml b/structure/extension/_TAG.yaml index 06f34e9c..51e546b7 100644 --- a/structure/extension/_TAG.yaml +++ b/structure/extension/_TAG.yaml @@ -6,8 +6,6 @@ type: record uri: https://github.com/glamberson/gedcom-tags/_TAG -standard tag: _TAG - extension tags: _TAG specification: diff --git a/structure/extension/_TAG_ref.yaml b/structure/extension/_TAG_ref.yaml index a4bae743..77402edb 100644 --- a/structure/extension/_TAG_ref.yaml +++ b/structure/extension/_TAG_ref.yaml @@ -4,9 +4,7 @@ lang: en-US type: structure -uri: https://github.com/glamberson/gedcom-tags/_TAG - -standard tag: _TAG +uri: https://github.com/glamberson/gedcom-tags/_TAG_ref extension tags: _TAG @@ -20,7 +18,7 @@ specification: label: 'Tag Reference' -payload: https://gedcom.io/terms/v7/type-Pointer +payload: "@@" substructures: "https://gedcom.io/terms/v7/DATE": "{0:1}" diff --git a/structure/extension/_VALUE.yaml b/structure/extension/_VALUE.yaml index f0607593..ceaed0fa 100644 --- a/structure/extension/_VALUE.yaml +++ b/structure/extension/_VALUE.yaml @@ -6,8 +6,6 @@ type: structure uri: https://github.com/glamberson/gedcom-tags/_VALUE -standard tag: _VALUE - extension tags: _VALUE specification: From f94bc0154c19f04d1720a44046568183f14377ca Mon Sep 17 00:00:00 2001 From: lamco-office Date: Thu, 7 Aug 2025 19:06:26 +0300 Subject: [PATCH 10/11] Fix PR #174 review issues - Remove 'standard tag' fields from all YAML files - Convert extension tags to array syntax - Add blank line before closing '...' - Fix _TAG_ref.yaml URI to be unique (_TAG_ref instead of _TAG) - Fix _TAG_ref.yaml payload format to proper pointer syntax - Remove extension-tags.yaml file (not needed per review) --- fix_pr174_issues.py | 95 +++++++++++++++++++++++++++++++ registry_tools/GEDCOM.io | 2 +- structure/extension/_ATTR.yaml | 4 +- structure/extension/_COLOR.yaml | 4 +- structure/extension/_TAG.yaml | 4 +- structure/extension/_TAG_ref.yaml | 4 +- structure/extension/_VALUE.yaml | 4 +- 7 files changed, 111 insertions(+), 6 deletions(-) create mode 100644 fix_pr174_issues.py diff --git a/fix_pr174_issues.py b/fix_pr174_issues.py new file mode 100644 index 00000000..6943089f --- /dev/null +++ b/fix_pr174_issues.py @@ -0,0 +1,95 @@ +#!/usr/bin/env python3 +""" +Fix all issues identified in PR #174 review +""" + +import os +from pathlib import Path + +def fix_file(filepath, fixes): + """Apply fixes to a file.""" + with open(filepath, 'r') as f: + content = f.read() + + for old, new in fixes: + content = content.replace(old, new) + + with open(filepath, 'w') as f: + f.write(content) + + return True + +def main(): + base_dir = Path('structure/extension') + + # Fix 1: Remove "standard tag" lines and fix array syntax + files_to_fix = [ + '_ATTR.yaml', + '_COLOR.yaml', + '_TAG.yaml', + '_TAG_ref.yaml', + '_VALUE.yaml' + ] + + for filename in files_to_fix: + filepath = base_dir / filename + if filepath.exists(): + with open(filepath, 'r') as f: + content = f.read() + + # Remove standard tag lines + lines = content.split('\n') + new_lines = [] + for line in lines: + if 'standard tag:' not in line: + new_lines.append(line) + + # Fix array syntax for extension tags + content = '\n'.join(new_lines) + content = content.replace('extension tags: _', 'extension tags:\n - _') + + # Add blank line before ... + content = content.replace('\n...', '\n\n...') + + # Remove double blank lines + while '\n\n\n' in content: + content = content.replace('\n\n\n', '\n\n') + + with open(filepath, 'w') as f: + f.write(content) + + print(f"Fixed {filename}") + + # Fix 2: Update _TAG_ref.yaml URI and payload + tag_ref_file = base_dir / '_TAG_ref.yaml' + if tag_ref_file.exists(): + with open(tag_ref_file, 'r') as f: + content = f.read() + + # Change URI to make it unique + content = content.replace( + 'uri: https://github.com/glamberson/gedcom-tags/_TAG', + 'uri: https://github.com/glamberson/gedcom-tags/_TAG_ref' + ) + + # Fix payload format + content = content.replace( + 'payload: https://gedcom.io/terms/v7/type-Pointer', + 'payload: "@@"' + ) + + with open(tag_ref_file, 'w') as f: + f.write(content) + + print("Fixed _TAG_ref.yaml URI and payload") + + # Fix 3: Remove extension-tags.yaml if it exists + ext_file = Path('extension-tags.yaml') + if ext_file.exists(): + os.remove(ext_file) + print("Removed extension-tags.yaml") + + print("\n✅ All PR #174 issues fixed!") + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/registry_tools/GEDCOM.io b/registry_tools/GEDCOM.io index da76dfe9..ab7c415e 160000 --- a/registry_tools/GEDCOM.io +++ b/registry_tools/GEDCOM.io @@ -1 +1 @@ -Subproject commit da76dfe933b22833035e005e7092ba1a91be0140 +Subproject commit ab7c415e4437831ee40576081705f6f03dd67a47 diff --git a/structure/extension/_ATTR.yaml b/structure/extension/_ATTR.yaml index 1ed95689..75150f0f 100644 --- a/structure/extension/_ATTR.yaml +++ b/structure/extension/_ATTR.yaml @@ -6,7 +6,8 @@ type: structure uri: https://github.com/glamberson/gedcom-tags/_ATTR -extension tags: _ATTR +extension tags: + - _ATTR specification: - Generic Attribute @@ -29,4 +30,5 @@ superstructures: "https://github.com/glamberson/gedcom-tags/_TAG": "{0:M}" contact: "lamberson@yahoo.com" + ... diff --git a/structure/extension/_COLOR.yaml b/structure/extension/_COLOR.yaml index 6520e27e..94eff3dd 100644 --- a/structure/extension/_COLOR.yaml +++ b/structure/extension/_COLOR.yaml @@ -6,7 +6,8 @@ type: structure uri: https://github.com/glamberson/gedcom-tags/_COLOR -extension tags: _COLOR +extension tags: + - _COLOR specification: - Color @@ -28,4 +29,5 @@ superstructures: "https://github.com/glamberson/gedcom-tags/_TAG": "{0:1}" contact: "lamberson@yahoo.com" + ... diff --git a/structure/extension/_TAG.yaml b/structure/extension/_TAG.yaml index 51e546b7..df81d3da 100644 --- a/structure/extension/_TAG.yaml +++ b/structure/extension/_TAG.yaml @@ -6,7 +6,8 @@ type: record uri: https://github.com/glamberson/gedcom-tags/_TAG -extension tags: _TAG +extension tags: + - _TAG specification: - Tag Record @@ -34,4 +35,5 @@ substructures: superstructures: {} contact: "lamberson@yahoo.com" + ... diff --git a/structure/extension/_TAG_ref.yaml b/structure/extension/_TAG_ref.yaml index 77402edb..e186f618 100644 --- a/structure/extension/_TAG_ref.yaml +++ b/structure/extension/_TAG_ref.yaml @@ -6,7 +6,8 @@ type: structure uri: https://github.com/glamberson/gedcom-tags/_TAG_ref -extension tags: _TAG +extension tags: + - _TAG specification: - Tag Reference @@ -43,4 +44,5 @@ superstructures: "https://gedcom.io/terms/v7/ASSO": "{0:M}" contact: "lamberson@yahoo.com" + ... diff --git a/structure/extension/_VALUE.yaml b/structure/extension/_VALUE.yaml index ceaed0fa..6a81d9b9 100644 --- a/structure/extension/_VALUE.yaml +++ b/structure/extension/_VALUE.yaml @@ -6,7 +6,8 @@ type: structure uri: https://github.com/glamberson/gedcom-tags/_VALUE -extension tags: _VALUE +extension tags: + - _VALUE specification: - Attribute Value @@ -25,4 +26,5 @@ superstructures: "https://github.com/glamberson/gedcom-tags/_ATTR": "{1:1}" contact: "lamberson@yahoo.com" + ... From 90f23cd38ccbb5b812d66a14d292a9d01e4f9fee Mon Sep 17 00:00:00 2001 From: lamco-office Date: Tue, 12 Aug 2025 12:49:37 +0300 Subject: [PATCH 11/11] Remove helper script and reset submodule to upstream - Removed fix_pr174_issues.py (helper script not needed in PR) - Reset registry_tools/GEDCOM.io submodule to match upstream main branch --- fix_pr174_issues.py | 95 ---------------------------------------- registry_tools/GEDCOM.io | 2 +- 2 files changed, 1 insertion(+), 96 deletions(-) delete mode 100644 fix_pr174_issues.py diff --git a/fix_pr174_issues.py b/fix_pr174_issues.py deleted file mode 100644 index 6943089f..00000000 --- a/fix_pr174_issues.py +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env python3 -""" -Fix all issues identified in PR #174 review -""" - -import os -from pathlib import Path - -def fix_file(filepath, fixes): - """Apply fixes to a file.""" - with open(filepath, 'r') as f: - content = f.read() - - for old, new in fixes: - content = content.replace(old, new) - - with open(filepath, 'w') as f: - f.write(content) - - return True - -def main(): - base_dir = Path('structure/extension') - - # Fix 1: Remove "standard tag" lines and fix array syntax - files_to_fix = [ - '_ATTR.yaml', - '_COLOR.yaml', - '_TAG.yaml', - '_TAG_ref.yaml', - '_VALUE.yaml' - ] - - for filename in files_to_fix: - filepath = base_dir / filename - if filepath.exists(): - with open(filepath, 'r') as f: - content = f.read() - - # Remove standard tag lines - lines = content.split('\n') - new_lines = [] - for line in lines: - if 'standard tag:' not in line: - new_lines.append(line) - - # Fix array syntax for extension tags - content = '\n'.join(new_lines) - content = content.replace('extension tags: _', 'extension tags:\n - _') - - # Add blank line before ... - content = content.replace('\n...', '\n\n...') - - # Remove double blank lines - while '\n\n\n' in content: - content = content.replace('\n\n\n', '\n\n') - - with open(filepath, 'w') as f: - f.write(content) - - print(f"Fixed {filename}") - - # Fix 2: Update _TAG_ref.yaml URI and payload - tag_ref_file = base_dir / '_TAG_ref.yaml' - if tag_ref_file.exists(): - with open(tag_ref_file, 'r') as f: - content = f.read() - - # Change URI to make it unique - content = content.replace( - 'uri: https://github.com/glamberson/gedcom-tags/_TAG', - 'uri: https://github.com/glamberson/gedcom-tags/_TAG_ref' - ) - - # Fix payload format - content = content.replace( - 'payload: https://gedcom.io/terms/v7/type-Pointer', - 'payload: "@@"' - ) - - with open(tag_ref_file, 'w') as f: - f.write(content) - - print("Fixed _TAG_ref.yaml URI and payload") - - # Fix 3: Remove extension-tags.yaml if it exists - ext_file = Path('extension-tags.yaml') - if ext_file.exists(): - os.remove(ext_file) - print("Removed extension-tags.yaml") - - print("\n✅ All PR #174 issues fixed!") - -if __name__ == "__main__": - main() \ No newline at end of file diff --git a/registry_tools/GEDCOM.io b/registry_tools/GEDCOM.io index ab7c415e..45791f0a 160000 --- a/registry_tools/GEDCOM.io +++ b/registry_tools/GEDCOM.io @@ -1 +1 @@ -Subproject commit ab7c415e4437831ee40576081705f6f03dd67a47 +Subproject commit 45791f0a61ae7375bca211019fdaeb12179c3925