Skip to content

Commit 67b099e

Browse files
authored
Update v7.1 extracted files to be prerelease (#667)
Resolves #664
1 parent ddda9ce commit 67b099e

32 files changed

Lines changed: 73 additions & 2 deletions

build/uri-def.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,16 @@ def yaml_str_helper(pfx, md, width=79):
362362
return pfx + txt
363363

364364
def expand_prefix(txt, prefixes):
365+
global prerelease
365366
for key in sorted(prefixes.keys(), key=lambda x:-len(x)):
366367
k = key+':'
367368
if txt.startswith(k):
368-
return prefixes[key] + txt[len(k):]
369+
uri = prefixes[key] + txt[len(k):]
370+
if 'https://gedcom.io/terms/v7.1/' in uri:
371+
prerelease = True
372+
return uri
373+
if 'https://gedcom.io/terms/v7.1/' in txt:
374+
prerelease = True
369375
return txt
370376

371377
if __name__ == '__main__':
@@ -404,6 +410,7 @@ def addpfx(tag):
404410

405411
for tag in g7:
406412
print('outputting', tag, '...', end=' ')
413+
prerelease = False
407414
maybe = join(dirname(specs[0]),'terms',tag)
408415
if exists(maybe):
409416
copyfile(maybe, join(dest,tag))
@@ -492,6 +499,9 @@ def addpfx(tag):
492499
print('\nvalue of:', file=fh)
493500
is_used_by = True
494501
print(' - "'+expand_prefix(tag2,prefixes)+'"', file=fh)
502+
503+
if prerelease:
504+
print('\nprerelease: true', file=fh)
495505

496506
print('\ncontact: "https://gedcom.io/community/"', file=fh)
497507
fh.write('...\n')
@@ -520,4 +530,3 @@ def addpfx(tag):
520530
print('\t'.join(row), file=f)
521531
print('done')
522532

523-
quit(1) # prevent next steps in Makefile

extracted-files/tags/ABBR

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,7 @@ substructures: {}
2222
superstructures:
2323
"https://gedcom.io/terms/v7.1/record-SOUR": "{0:1}"
2424

25+
prerelease: true
26+
2527
contact: "https://gedcom.io/community/"
2628
...

extracted-files/tags/ADDR

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,7 @@ superstructures:
110110
"https://gedcom.io/terms/v7/SSN": "{0:1}"
111111
"https://gedcom.io/terms/v7/WILL": "{0:1}"
112112

113+
prerelease: true
114+
113115
contact: "https://gedcom.io/community/"
114116
...

extracted-files/tags/AUTH

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@ substructures: {}
2424
superstructures:
2525
"https://gedcom.io/terms/v7.1/record-SOUR": "{0:1}"
2626

27+
prerelease: true
28+
2729
contact: "https://gedcom.io/community/"
2830
...

extracted-files/tags/CHAN

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,7 @@ superstructures:
3939
"https://gedcom.io/terms/v7/record-INDI": "{0:1}"
4040
"https://gedcom.io/terms/v7/record-OBJE": "{0:1}"
4141

42+
prerelease: true
43+
4244
contact: "https://gedcom.io/community/"
4345
...

extracted-files/tags/CREA

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,7 @@ superstructures:
3232
"https://gedcom.io/terms/v7/record-INDI": "{0:1}"
3333
"https://gedcom.io/terms/v7/record-OBJE": "{0:1}"
3434

35+
prerelease: true
36+
3537
contact: "https://gedcom.io/community/"
3638
...

extracted-files/tags/DATA

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,7 @@ substructures:
2727
superstructures:
2828
"https://gedcom.io/terms/v7.1/record-SOUR": "{0:1}"
2929

30+
prerelease: true
31+
3032
contact: "https://gedcom.io/community/"
3133
...

extracted-files/tags/EMAIL

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,7 @@ superstructures:
8787
"https://gedcom.io/terms/v7/SSN": "{0:M}"
8888
"https://gedcom.io/terms/v7/WILL": "{0:M}"
8989

90+
prerelease: true
91+
9092
contact: "https://gedcom.io/community/"
9193
...

extracted-files/tags/EXID

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,7 @@ superstructures:
4242
"https://gedcom.io/terms/v7/record-INDI": "{0:M}"
4343
"https://gedcom.io/terms/v7/record-OBJE": "{0:M}"
4444

45+
prerelease: true
46+
4547
contact: "https://gedcom.io/community/"
4648
...

extracted-files/tags/FAX

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,7 @@ superstructures:
7575
"https://gedcom.io/terms/v7/SSN": "{0:M}"
7676
"https://gedcom.io/terms/v7/WILL": "{0:M}"
7777

78+
prerelease: true
79+
7880
contact: "https://gedcom.io/community/"
7981
...

0 commit comments

Comments
 (0)