Skip to content

Commit

Permalink
switch to more semantic metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
xrotwang committed May 8, 2019
1 parent c964fd5 commit f36deac
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 20 deletions.
26 changes: 18 additions & 8 deletions cldf/StructureDataset-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,27 @@
],
"dc:conformsTo": "http://cldf.clld.org/v1.0/terms.rdf#StructureDataset",
"dc:source": "sources.bib",
"dialect": {
"commentPrefix": null
},
"notes": [
"prov:wasDerivedFrom": [
{
"dc:title": "environment",
"properties": {
"glottolog_version": "v3.3.2"
}
"dc:title": "phoible/phoible-dev",
"dc:description": "v2014-241-g0ec7201"
},
{
"dc:title": "bambooforest/phoible-scripts",
"dc:description": "a2a55d5"
},
{
"dc:title": "clld/glottolog",
"dc:description": "v3.3.2"
}
],
"prov:wasGeneratedBy": {
"dc:title": "cldf-datasets/phoible",
"dc:description": "v2.0-13-gc964fd5"
},
"dialect": {
"commentPrefix": null
},
"tables": [
{
"dc:conformsTo": "http://cldf.clld.org/v1.0/terms.rdf#ValueTable",
Expand Down
12 changes: 6 additions & 6 deletions cldf/sources.bib
Original file line number Diff line number Diff line change
Expand Up @@ -13698,7 +13698,7 @@ @incollection{1896_gawthorneetal1984
}

@book{1897_adelaaretal2004,
author = {Adelaar, Willem F. H. \\\\\\\\& Pieter C. Muysken},
author = {Adelaar, Willem F. H. & Pieter C. Muysken},
address = {New York},
bibtexkey = {Adelaaretal2004},
date-added = {2014-07-09 13:41:25 +0000},
Expand Down Expand Up @@ -14822,7 +14822,7 @@ @phdthesis{1953_oliveira2005
}

@book{1954_arikapu2010,
author = {Arikapú, Mamoa; Nazaré Arikapú; Hein van der Voort \\\\\\\\& Ana Carolina Ferreira Alves},
author = {Arikapú, Mamoa; Nazaré Arikapú; Hein van der Voort & Ana Carolina Ferreira Alves},
bibtexkey = {Arikapu2010},
booktitle = {Cadernos de Etnolingü{'i}stica},
date-added = {2014-07-09 13:41:25 +0000},
Expand Down Expand Up @@ -15571,7 +15571,7 @@ @book{1993_martins2005

@incollection{1994_tellesetal2011,
author = {Telles, Stella and Wetzels, Leo},
editor = {Emilio Bonvini, Joëlle Busuttil \\\\\\\\& Alain Peyraube},
editor = {Emilio Bonvini, Joëlle Busuttil & Alain Peyraube},
address = {Paris},
bibtexkey = {Tellesetal2011},
booktitle = {Dictionnaire des langues},
Expand All @@ -15588,7 +15588,7 @@ @incollection{1994_tellesetal2011

@incollection{1995_tellesetal2011,
author = {Telles, Stella and Wetzels, Leo},
editor = {Emilio Bonvini, Joëlle Busuttil \\\\\\\\& Alain Peyraube},
editor = {Emilio Bonvini, Joëlle Busuttil & Alain Peyraube},
address = {Paris},
bibtexkey = {Tellesetal2011},
booktitle = {Dictionnaire des langues},
Expand Down Expand Up @@ -17254,7 +17254,7 @@ @phdthesis{2083_martins2003
}

@book{2084_krivosheindecanese2000,
author = {Krivoshein de Canese, Natalia, \\\\\\\\& Feliciano Acosta Alcaraz},
author = {Krivoshein de Canese, Natalia, & Feliciano Acosta Alcaraz},
bibtexkey = {Krivosheindecanese2000},
date-added = {2014-07-09 13:41:25 +0000},
date-modified = {2014-07-09 13:41:26 +0000},
Expand Down Expand Up @@ -17979,7 +17979,7 @@ @article{2126_olson1967

@incollection{2127_muysken2000,
author = {Muysken, Pieter},
editor = {van der Voort \\\\\\\\& Simon van de Kerke, Hein},
editor = {van der Voort & Simon van de Kerke, Hein},
address = {Leiden},
bibtexkey = {Muysken2000},
date-added = {2014-07-09 13:41:25 +0000},
Expand Down
20 changes: 14 additions & 6 deletions create.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,20 @@ def main(scripts, dev, glr):
glottolog = Glottolog(glr)

ds = StructureDataset.in_dir(cldf_dir)
ds.tablegroup.notes.append(OrderedDict([
('dc:title', 'environment'),
('properties', OrderedDict([
('glottolog_version', git_describe(glottolog.repos)),
]))
]))

def describe_repos(r, org, name=None):
return OrderedDict([
('dc:title', '{0}/{1}'.format(org, name or r.name)),
('dc:description', git_describe(r))])

ds.tablegroup.common_props['prov:wasDerivedFrom'] = [
describe_repos(dev, 'phoible'),
describe_repos(scripts, 'bambooforest'),
describe_repos(glottolog.repos, 'clld'),
]
ds.tablegroup.common_props['prov:wasGeneratedBy'] = describe_repos(
Path(__file__).parent, 'cldf-datasets', name='phoible')

ds.add_columns(
'ValueTable',
{'name': 'Marginal', 'datatype': 'boolean'},
Expand Down

0 comments on commit f36deac

Please sign in to comment.