commonmeta-py 0.28__py3-none-any.whl → 0.30__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/inveniordm_reader.py +1 -1
- commonmeta/readers/json_feed_reader.py +10 -4
- commonmeta/writers/inveniordm_writer.py +34 -26
- {commonmeta_py-0.28.dist-info → commonmeta_py-0.30.dist-info}/METADATA +1 -1
- {commonmeta_py-0.28.dist-info → commonmeta_py-0.30.dist-info}/RECORD +9 -9
- {commonmeta_py-0.28.dist-info → commonmeta_py-0.30.dist-info}/LICENSE +0 -0
- {commonmeta_py-0.28.dist-info → commonmeta_py-0.30.dist-info}/WHEEL +0 -0
- {commonmeta_py-0.28.dist-info → commonmeta_py-0.30.dist-info}/entry_points.txt +0 -0
commonmeta/__init__.py
CHANGED
@@ -79,6 +79,7 @@ def read_inveniordm(data: dict, **kwargs) -> Commonmeta:
|
|
79
79
|
"title": "Zenodo",
|
80
80
|
}
|
81
81
|
)
|
82
|
+
publisher = {"name": "Zenodo"}
|
82
83
|
else:
|
83
84
|
container = py_.get(meta, "custom_fields.journal:journal")
|
84
85
|
if container:
|
@@ -96,7 +97,6 @@ def read_inveniordm(data: dict, **kwargs) -> Commonmeta:
|
|
96
97
|
)
|
97
98
|
if license_:
|
98
99
|
license_ = dict_to_spdx({"id": license_})
|
99
|
-
print(license_)
|
100
100
|
descriptions = format_descriptions(
|
101
101
|
[
|
102
102
|
py_.get(meta, "metadata.description"),
|
@@ -46,6 +46,7 @@ def read_json_feed_item(data: Optional[dict], **kwargs) -> Commonmeta:
|
|
46
46
|
if data is None:
|
47
47
|
return {"state": "not_found"}
|
48
48
|
meta = data
|
49
|
+
print(meta)
|
49
50
|
read_options = kwargs or {}
|
50
51
|
|
51
52
|
url = normalize_url(meta.get("url", None))
|
@@ -65,10 +66,6 @@ def read_json_feed_item(data: Optional[dict], **kwargs) -> Commonmeta:
|
|
65
66
|
title = parse_attributes(meta.get("title", None))
|
66
67
|
titles = [{"title": sanitize(title)}] if title else None
|
67
68
|
|
68
|
-
publisher = py_.get(meta, "blog.title", None)
|
69
|
-
if publisher is not None:
|
70
|
-
publisher = {"name": publisher}
|
71
|
-
|
72
69
|
date: dict = {}
|
73
70
|
date["published"] = (
|
74
71
|
get_date_from_unix_timestamp(meta.get("published_at", None))
|
@@ -98,6 +95,15 @@ def read_json_feed_item(data: Optional[dict], **kwargs) -> Commonmeta:
|
|
98
95
|
"identifierType": "ISSN" if issn else "URL",
|
99
96
|
}
|
100
97
|
)
|
98
|
+
publisher = (
|
99
|
+
{"name": "Front Matter"}
|
100
|
+
if is_rogue_scholar_doi(_id)
|
101
|
+
or (
|
102
|
+
container.get("identifierType", None) == "URL"
|
103
|
+
and furl(container.get("identifier", None)).host == "rogue-scholar.org"
|
104
|
+
)
|
105
|
+
else None
|
106
|
+
)
|
101
107
|
|
102
108
|
description = meta.get("summary", None)
|
103
109
|
if description is not None:
|
@@ -50,32 +50,40 @@ def write_inveniordm(metadata):
|
|
50
50
|
},
|
51
51
|
"access": {"record": "public", "files": "public"},
|
52
52
|
"files": {"enabled": True},
|
53
|
-
"metadata":
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
53
|
+
"metadata": compact(
|
54
|
+
{
|
55
|
+
"resource_type": {"id": _type},
|
56
|
+
"creators": creators,
|
57
|
+
"title": parse_attributes(
|
58
|
+
metadata.titles, content="title", first=True
|
59
|
+
),
|
60
|
+
"publisher": metadata.publisher.get("name", None)
|
61
|
+
if metadata.publisher
|
62
|
+
else None,
|
63
|
+
"publication_date": metadata.date.get("published")
|
64
|
+
if metadata.date.get("published", None)
|
65
|
+
else None,
|
66
|
+
"dates": [
|
67
|
+
{"date": metadata.date.get("updated"), "type": "updated"}
|
68
|
+
],
|
69
|
+
"subjects": parse_attributes(
|
70
|
+
wrap(metadata.subjects), content="subject", first=False
|
71
|
+
),
|
72
|
+
"description": parse_attributes(
|
73
|
+
metadata.descriptions, content="description", first=True
|
74
|
+
),
|
75
|
+
"rights": [{"id": metadata.license.get("id").lower()}]
|
76
|
+
if metadata.license.get("id", None)
|
77
|
+
else None,
|
78
|
+
"languages": [
|
79
|
+
{"id": get_language(metadata.language, format="alpha_3")}
|
80
|
+
]
|
81
|
+
if metadata.language
|
82
|
+
else None,
|
83
|
+
"identifiers": identifiers,
|
84
|
+
"version": metadata.version,
|
85
|
+
}
|
86
|
+
),
|
79
87
|
"custom_fields": {
|
80
88
|
"journal:journal": compact({"title": journal, "issn": issn}),
|
81
89
|
},
|
@@ -1,4 +1,4 @@
|
|
1
|
-
commonmeta/__init__.py,sha256=
|
1
|
+
commonmeta/__init__.py,sha256=XHZvIRHYbOUr54ZbWsDXfsLaA652FoU7zL-j_wX9_hM,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
|
@@ -18,8 +18,8 @@ commonmeta/readers/crossref_xml_reader.py,sha256=QF1A-r3OJbykBTH9YMSxusT3-KSKmmz
|
|
18
18
|
commonmeta/readers/csl_reader.py,sha256=5V_sHSJwcAWJmhB8SYk199nB96BWYX1Sq9vkQ3iEmAY,3164
|
19
19
|
commonmeta/readers/datacite_reader.py,sha256=CdOtxhthrakBoQMsLTdPx6sUCmqtEWo5ICYE6ZsWDdo,12026
|
20
20
|
commonmeta/readers/datacite_xml_reader.py,sha256=nhnO92fZihr1HZlbXjyem-HJXc9_DWLgJ2zeltuPMIg,13041
|
21
|
-
commonmeta/readers/inveniordm_reader.py,sha256=
|
22
|
-
commonmeta/readers/json_feed_reader.py,sha256=
|
21
|
+
commonmeta/readers/inveniordm_reader.py,sha256=ejhpj4KX6bJU79lKrkTQeG3AATw0h2DdNdieNlx5j0w,7521
|
22
|
+
commonmeta/readers/json_feed_reader.py,sha256=_rOAIGhBoEwmNbGGlYixEzVHhUszVNlzmwkjqFQY1kw,13946
|
23
23
|
commonmeta/readers/kbase_reader.py,sha256=NpIK-_fh5QFN4Q_ArqcrnH4tS5zR1gqbPew6VEjrUbs,6764
|
24
24
|
commonmeta/readers/ris_reader.py,sha256=v6qOd-i2OcMTEFy5RGd3MlYthJcYSU6yzmZ5yHDzmII,3677
|
25
25
|
commonmeta/readers/schema_org_reader.py,sha256=xyWzO2XAWlI2pYVl2EbVRsUmfiWXEwP64CHRBQNRN-M,16835
|
@@ -65,11 +65,11 @@ commonmeta/writers/commonmeta_writer.py,sha256=2qlttCfYpGhfVjrYkjzbIra7AywssRLT3
|
|
65
65
|
commonmeta/writers/crossref_xml_writer.py,sha256=0Ds494RnXfdfjWw5CLX1kwV2zP7gqffdVqO-X74Uc6c,492
|
66
66
|
commonmeta/writers/csl_writer.py,sha256=rlCeShkvC6ui9By0yVfNCMay_JfaZ4AooUPOPg-g-2M,2819
|
67
67
|
commonmeta/writers/datacite_writer.py,sha256=G7Lr0aZ4sAEdbfXe3dG4Y6AyGUKA9UWr_iiaQRDnV24,6233
|
68
|
-
commonmeta/writers/inveniordm_writer.py,sha256=
|
68
|
+
commonmeta/writers/inveniordm_writer.py,sha256=lfuNdyHxyQa3rfioM8kGZh-p6h8Grl2B581f_feN8f8,4464
|
69
69
|
commonmeta/writers/ris_writer.py,sha256=AcnCszS3WY9lF594NbFBtLylsA8ownnYp_XLQJ84Ios,2093
|
70
70
|
commonmeta/writers/schema_org_writer.py,sha256=5j002uCNLdlScZMNQmPjodcVWqaBh2z38zL1H4lo2hY,5741
|
71
|
-
commonmeta_py-0.
|
72
|
-
commonmeta_py-0.
|
73
|
-
commonmeta_py-0.
|
74
|
-
commonmeta_py-0.
|
75
|
-
commonmeta_py-0.
|
71
|
+
commonmeta_py-0.30.dist-info/LICENSE,sha256=746hEF2wZCKkcckk5-_DcBLtHewfaEMS4iXTlA1PVwk,1074
|
72
|
+
commonmeta_py-0.30.dist-info/METADATA,sha256=GUODVocf6zYFgKtJ52NJqmgXvnQmNLdSiD32HYX0xv0,8331
|
73
|
+
commonmeta_py-0.30.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
74
|
+
commonmeta_py-0.30.dist-info/entry_points.txt,sha256=vbcDw3_2lMTKdcAL2VUF4DRYRpKuzXVYLMCdgKVf88U,49
|
75
|
+
commonmeta_py-0.30.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|