commonmeta-py 0.45__py3-none-any.whl → 0.48__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- commonmeta/__init__.py +1 -1
- commonmeta/metadata.py +2 -0
- commonmeta/readers/json_feed_reader.py +4 -0
- commonmeta/writers/inveniordm_writer.py +5 -2
- {commonmeta_py-0.45.dist-info → commonmeta_py-0.48.dist-info}/METADATA +1 -1
- {commonmeta_py-0.45.dist-info → commonmeta_py-0.48.dist-info}/RECORD +9 -9
- {commonmeta_py-0.45.dist-info → commonmeta_py-0.48.dist-info}/LICENSE +0 -0
- {commonmeta_py-0.45.dist-info → commonmeta_py-0.48.dist-info}/WHEEL +0 -0
- {commonmeta_py-0.45.dist-info → commonmeta_py-0.48.dist-info}/entry_points.txt +0 -0
commonmeta/__init__.py
CHANGED
commonmeta/metadata.py
CHANGED
@@ -101,6 +101,8 @@ class Metadata:
|
|
101
101
|
self.titles = meta.get("titles")
|
102
102
|
self.url = meta.get("url")
|
103
103
|
self.version = meta.get("version")
|
104
|
+
self.content = meta.get("content")
|
105
|
+
self.image = meta.get("image")
|
104
106
|
# other properties
|
105
107
|
self.date_created = meta.get("date_created")
|
106
108
|
self.date_registered = meta.get("date_registered")
|
@@ -134,6 +134,8 @@ def read_json_feed_item(data: Optional[dict], **kwargs) -> Commonmeta:
|
|
134
134
|
{"identifier": meta.get("id"), "identifierType": "UUID"},
|
135
135
|
{"identifier": meta.get("guid"), "identifierType": "GUID"},
|
136
136
|
]
|
137
|
+
content = py_.get(meta, "content_text", None)
|
138
|
+
image = py_.get(meta, "image", None)
|
137
139
|
files = get_files(_id)
|
138
140
|
state = "findable" if meta or read_options else "not_found"
|
139
141
|
|
@@ -158,6 +160,8 @@ def read_json_feed_item(data: Optional[dict], **kwargs) -> Commonmeta:
|
|
158
160
|
"fundingReferences": presence(funding_references),
|
159
161
|
"references": presence(references),
|
160
162
|
"relations": presence(relations),
|
163
|
+
"content": presence(content),
|
164
|
+
"image": presence(image),
|
161
165
|
"files": files,
|
162
166
|
# other properties
|
163
167
|
"container": presence(container),
|
@@ -46,7 +46,6 @@ def write_inveniordm(metadata):
|
|
46
46
|
"scheme": "url",
|
47
47
|
}
|
48
48
|
)
|
49
|
-
print(identifiers, metadata.id)
|
50
49
|
references = [
|
51
50
|
to_inveniordm_related_identifier(i)
|
52
51
|
for i in wrap(metadata.references)
|
@@ -127,6 +126,8 @@ def write_inveniordm(metadata):
|
|
127
126
|
"related_identifiers": presence(related_identifiers),
|
128
127
|
"funding": presence(funding),
|
129
128
|
"version": metadata.version,
|
129
|
+
"content": presence(metadata.content),
|
130
|
+
"image": presence(metadata.image),
|
130
131
|
}
|
131
132
|
),
|
132
133
|
"custom_fields": {
|
@@ -226,8 +227,10 @@ def to_inveniordm_related_identifier(relation: dict) -> dict:
|
|
226
227
|
relation_type = relation.get("type")
|
227
228
|
if relation.get("type", None) is None:
|
228
229
|
relation_type = "References"
|
229
|
-
|
230
|
+
elif relation.get("type") == "HasReview":
|
230
231
|
relation_type = "IsReviewedBy"
|
232
|
+
elif relation.get("type") == "IsPreprintOf":
|
233
|
+
relation_type = "IsPreviousVersionOf"
|
231
234
|
|
232
235
|
return compact(
|
233
236
|
{
|
@@ -1,4 +1,4 @@
|
|
1
|
-
commonmeta/__init__.py,sha256=
|
1
|
+
commonmeta/__init__.py,sha256=_iyemWEAkjOvqZ1JQuUOnfbHVNaT_h7YcQJHZl7wdCM,1779
|
2
2
|
commonmeta/api_utils.py,sha256=-ZHGVZZhJqnjnsLtp4-PoeHYbDqL0cQme7W70BEjo4U,2677
|
3
3
|
commonmeta/author_utils.py,sha256=zBIPTgP5n7Zx57xomJ2h7x0dvC0AV8gJ2gPoYeDy5Lo,8348
|
4
4
|
commonmeta/base_utils.py,sha256=AsUElA5kT2fw_Osy7Uaj2F6MKeq9yB7d5f2V-h2lh7c,3750
|
@@ -7,7 +7,7 @@ commonmeta/constants.py,sha256=VfjXLkwoV4A5uztH3vgDJ_qrt7PaWGO6QtHbAt4r03c,17501
|
|
7
7
|
commonmeta/crossref_utils.py,sha256=qJlTZtfKR2shAXQDm8VBYUujKFkTtZTUz19GuMUANaI,22198
|
8
8
|
commonmeta/date_utils.py,sha256=amF3E0ZJlh8yY5eY3aVXQyAO1x2WuZHJXw-ajOEcdUQ,5808
|
9
9
|
commonmeta/doi_utils.py,sha256=Dt6K9ADD2ga2WNsOzfX9f29gnubhn7xqeKL7U5pEpBs,8209
|
10
|
-
commonmeta/metadata.py,sha256=
|
10
|
+
commonmeta/metadata.py,sha256=cjvCcxW1FMtKCbNKan0zXX0FN6z5orHFGPYsgkp6fSI,12480
|
11
11
|
commonmeta/readers/__init__.py,sha256=vOf7UsOKNoh_ZCuyexxhAmPMt8wjB-pF_CfpWRaN8pk,45
|
12
12
|
commonmeta/readers/bibtex_reader.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
13
|
commonmeta/readers/cff_reader.py,sha256=5HMFUvjE1zb-zfpQSNM8vtB0YunD0reom99hn8N0xKc,6144
|
@@ -19,7 +19,7 @@ commonmeta/readers/csl_reader.py,sha256=5V_sHSJwcAWJmhB8SYk199nB96BWYX1Sq9vkQ3iE
|
|
19
19
|
commonmeta/readers/datacite_reader.py,sha256=CdOtxhthrakBoQMsLTdPx6sUCmqtEWo5ICYE6ZsWDdo,12026
|
20
20
|
commonmeta/readers/datacite_xml_reader.py,sha256=nhnO92fZihr1HZlbXjyem-HJXc9_DWLgJ2zeltuPMIg,13041
|
21
21
|
commonmeta/readers/inveniordm_reader.py,sha256=jzv0rXzT8OCdPD_MShBXTnlwD-F9tpTX7OKZGn8smzs,7480
|
22
|
-
commonmeta/readers/json_feed_reader.py,sha256=
|
22
|
+
commonmeta/readers/json_feed_reader.py,sha256=XDCtPDRglr5zKl2_tjrRHnvXrUghUXdAGxPtW8uaohw,13592
|
23
23
|
commonmeta/readers/kbase_reader.py,sha256=ehKXQsJyPCtaq2FmBxNb2Jb5Nktpx8pNscpmEM6N0A4,6763
|
24
24
|
commonmeta/readers/ris_reader.py,sha256=v6qOd-i2OcMTEFy5RGd3MlYthJcYSU6yzmZ5yHDzmII,3677
|
25
25
|
commonmeta/readers/schema_org_reader.py,sha256=xyWzO2XAWlI2pYVl2EbVRsUmfiWXEwP64CHRBQNRN-M,16835
|
@@ -66,11 +66,11 @@ commonmeta/writers/commonmeta_writer.py,sha256=2qlttCfYpGhfVjrYkjzbIra7AywssRLT3
|
|
66
66
|
commonmeta/writers/crossref_xml_writer.py,sha256=0Ds494RnXfdfjWw5CLX1kwV2zP7gqffdVqO-X74Uc6c,492
|
67
67
|
commonmeta/writers/csl_writer.py,sha256=rlCeShkvC6ui9By0yVfNCMay_JfaZ4AooUPOPg-g-2M,2819
|
68
68
|
commonmeta/writers/datacite_writer.py,sha256=G7Lr0aZ4sAEdbfXe3dG4Y6AyGUKA9UWr_iiaQRDnV24,6233
|
69
|
-
commonmeta/writers/inveniordm_writer.py,sha256
|
69
|
+
commonmeta/writers/inveniordm_writer.py,sha256=PrJa2BttyRkSkYkrvTUS_IlOYuY9hjlhiWm91adOFfw,9754
|
70
70
|
commonmeta/writers/ris_writer.py,sha256=AcnCszS3WY9lF594NbFBtLylsA8ownnYp_XLQJ84Ios,2093
|
71
71
|
commonmeta/writers/schema_org_writer.py,sha256=5j002uCNLdlScZMNQmPjodcVWqaBh2z38zL1H4lo2hY,5741
|
72
|
-
commonmeta_py-0.
|
73
|
-
commonmeta_py-0.
|
74
|
-
commonmeta_py-0.
|
75
|
-
commonmeta_py-0.
|
76
|
-
commonmeta_py-0.
|
72
|
+
commonmeta_py-0.48.dist-info/LICENSE,sha256=746hEF2wZCKkcckk5-_DcBLtHewfaEMS4iXTlA1PVwk,1074
|
73
|
+
commonmeta_py-0.48.dist-info/METADATA,sha256=zUXzVTywXF3K9fSiRiDNQj_xdVcO-eZXumKYHBOjk7E,8331
|
74
|
+
commonmeta_py-0.48.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
75
|
+
commonmeta_py-0.48.dist-info/entry_points.txt,sha256=vbcDw3_2lMTKdcAL2VUF4DRYRpKuzXVYLMCdgKVf88U,49
|
76
|
+
commonmeta_py-0.48.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|