commonmeta-py 0.42__py3-none-any.whl → 0.44__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/readers/json_feed_reader.py +5 -2
- commonmeta/writers/inveniordm_writer.py +6 -0
- {commonmeta_py-0.42.dist-info → commonmeta_py-0.44.dist-info}/METADATA +1 -1
- {commonmeta_py-0.42.dist-info → commonmeta_py-0.44.dist-info}/RECORD +8 -8
- {commonmeta_py-0.42.dist-info → commonmeta_py-0.44.dist-info}/LICENSE +0 -0
- {commonmeta_py-0.42.dist-info → commonmeta_py-0.44.dist-info}/WHEEL +0 -0
- {commonmeta_py-0.42.dist-info → commonmeta_py-0.44.dist-info}/entry_points.txt +0 -0
commonmeta/__init__.py
CHANGED
@@ -47,8 +47,11 @@ def read_json_feed_item(data: Optional[dict], **kwargs) -> Commonmeta:
|
|
47
47
|
return {"state": "not_found"}
|
48
48
|
meta = data
|
49
49
|
read_options = kwargs or {}
|
50
|
-
|
51
|
-
|
50
|
+
url = None
|
51
|
+
if py_.get(meta, "blog.status", None) == "active":
|
52
|
+
url = normalize_url(meta.get("url", None))
|
53
|
+
elif py_.get(meta, "blog.status", None) == "archived":
|
54
|
+
url = normalize_url(meta.get("archive_url", None))
|
52
55
|
_id = normalize_doi(read_options.get("doi", None) or meta.get("doi", None)) or url
|
53
56
|
_type = "Article"
|
54
57
|
|
@@ -40,6 +40,12 @@ def write_inveniordm(metadata):
|
|
40
40
|
for i in wrap(metadata.identifiers)
|
41
41
|
if i.get("identifier", None) != metadata.id
|
42
42
|
]
|
43
|
+
identifiers.append(
|
44
|
+
{
|
45
|
+
"identifier": metadata.url,
|
46
|
+
"scheme": "url",
|
47
|
+
}
|
48
|
+
)
|
43
49
|
print(identifiers, metadata.id)
|
44
50
|
references = [
|
45
51
|
to_inveniordm_related_identifier(i)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
commonmeta/__init__.py,sha256=
|
1
|
+
commonmeta/__init__.py,sha256=FlclubppW_GDhF_tihWRu6nUfRikxMQcPM3gs6khp5I,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=0t6fr9XGeeTBoMlKSAMI7p_EmKsA6wYRW0roEBXVcc8,3722
|
@@ -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=knTu7vamMyNUPv552FmnEQulsR43r9M7ti6ADzT-dKg,13429
|
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=-rMdMBgS5oGvr0aNG15wI7z3pML42kHTLzK7pNBjqlc,9579
|
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.44.dist-info/LICENSE,sha256=746hEF2wZCKkcckk5-_DcBLtHewfaEMS4iXTlA1PVwk,1074
|
73
|
+
commonmeta_py-0.44.dist-info/METADATA,sha256=Pj_d5FqiaZtFB5bFAwLy-_F-r5BdlMHXYKaRDPZN9So,8331
|
74
|
+
commonmeta_py-0.44.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
75
|
+
commonmeta_py-0.44.dist-info/entry_points.txt,sha256=vbcDw3_2lMTKdcAL2VUF4DRYRpKuzXVYLMCdgKVf88U,49
|
76
|
+
commonmeta_py-0.44.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|