Skip to content

Commit e096c17

Browse files
LinguListlingulist
andauthored
add access to full zenodo metadata (#7)
Co-authored-by: lingulist <mattis.list@lingpy.org>
1 parent 1a33364 commit e096c17

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/cldfzenodo/record.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ class Record:
153153
closed_access = attr.ib(default=False, validator=attr.validators.instance_of(bool))
154154
version = attr.ib(default=None)
155155
concept_doi = attr.ib(default=None)
156+
metadata = attr.ib(default=attr.Factory(dict))
156157

157158
def __attrs_post_init__(self):
158159
if not self.download_url:
@@ -188,6 +189,7 @@ def from_dict(cls, d):
188189
concept_doi=d.get('conceptdoi'), # There are old records with "concept_rec_id" ...
189190
# FIXME: Check Zenodo API periodically to see whether URLs are correct now.
190191
download_urls=[f['links']['self'].replace('/api/', '/') for f in d.get('files')],
192+
metadata=d['metadata']
191193
)
192194
if 'license' in d['metadata']:
193195
lic = d['metadata']['license']

0 commit comments

Comments
 (0)