commonmeta-py 0.16.8__tar.gz → 0.16.10__tar.gz
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_py-0.16.8 → commonmeta_py-0.16.10}/PKG-INFO +2 -2
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/readers/schema_org_reader.py +23 -14
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/pyproject.toml +2 -2
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/LICENSE +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/README.md +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/__init__.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/api_utils.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/author_utils.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/base_utils.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/cli.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/constants.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/crossref_utils.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/date_utils.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/doi_utils.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/metadata.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/readers/__init__.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/readers/bibtex_reader.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/readers/cff_reader.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/readers/codemeta_reader.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/readers/commonmeta_reader.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/readers/crossref_reader.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/readers/crossref_xml_reader.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/readers/csl_reader.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/readers/datacite_reader.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/readers/datacite_xml_reader.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/readers/inveniordm_reader.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/readers/json_feed_reader.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/readers/kbase_reader.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/readers/ris_reader.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/cff_v1.2.0.json +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/commonmeta_v0.12.json +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/crossref/AccessIndicators.xsd +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/crossref/JATS-journalpublishing1-3d2-mathml3-elements.xsd +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/crossref/JATS-journalpublishing1-3d2-mathml3.xsd +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/crossref/JATS-journalpublishing1-elements.xsd +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/crossref/JATS-journalpublishing1-mathml3-elements.xsd +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/crossref/JATS-journalpublishing1-mathml3.xsd +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/crossref/JATS-journalpublishing1.xsd +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/crossref/clinicaltrials.xsd +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/crossref/common5.3.1.xsd +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/crossref/crossref5.3.1.xsd +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/crossref/crossref_query_output3.0.xsd +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/crossref/fundref.xsd +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/crossref/module-ali.xsd +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/crossref/relations.xsd +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/crossref-v0.2.json +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/csl-data.json +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/datacite-v4.5.json +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/ietf-bcp-47.json +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/iso-8601.json +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/spdx/licenses.json +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/spdx-schema..json +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/styles/apa.csl +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/styles/chicago-author-date.csl +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/styles/harvard-cite-them-right.csl +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/styles/ieee.csl +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/styles/modern-language-association.csl +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/styles/vancouver.csl +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/schema_utils.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/translators.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/utils.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/writers/__init__.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/writers/bibtex_writer.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/writers/citation_writer.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/writers/commonmeta_writer.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/writers/crossref_xml_writer.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/writers/csl_writer.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/writers/datacite_writer.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/writers/ris_writer.py +0 -0
- {commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/writers/schema_org_writer.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: commonmeta-py
|
3
|
-
Version: 0.16.
|
3
|
+
Version: 0.16.10
|
4
4
|
Summary: Library for conversions to/from the Commonmeta scholarly metadata format
|
5
5
|
Home-page: https://python.commonmeta.org
|
6
6
|
License: MIT
|
@@ -28,7 +28,7 @@ Requires-Dist: datacite (>=1.1,<2.0)
|
|
28
28
|
Requires-Dist: dateparser (>=1.1.7,<2.0.0)
|
29
29
|
Requires-Dist: docutils (>=0.19,<0.20)
|
30
30
|
Requires-Dist: furl (>=2.1.3,<3.0.0)
|
31
|
-
Requires-Dist: httpx (>=0.
|
31
|
+
Requires-Dist: httpx (>=0.24,<0.25)
|
32
32
|
Requires-Dist: jsonschema (>=4.21,<5.0)
|
33
33
|
Requires-Dist: jupyterlab (>=4.0.9,<5.0.0)
|
34
34
|
Requires-Dist: jupyterlab-quarto (>=0.2.8,<0.3.0)
|
@@ -64,20 +64,29 @@ def get_schema_org(pid: str, **kwargs) -> dict:
|
|
64
64
|
state = "bad_request"
|
65
65
|
return {"@id": url, "@type": "WebPage", "state": state, "via": "schema_org"}
|
66
66
|
elif response.headers.get("content-type") == "application/pdf":
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
67
|
+
try:
|
68
|
+
pdf = pikepdf.Pdf.open(io.BytesIO(response.content))
|
69
|
+
meta = pdf.docinfo if pdf.docinfo else {}
|
70
|
+
if meta.get("/doi", None) is not None:
|
71
|
+
return get_doi_meta(meta.get("/doi"))
|
72
|
+
date_modified = get_datetime_from_pdf_time(meta.get("/ModDate")) if meta.get("/ModDate", None) else None
|
73
|
+
name = meta.get("/Title", None)
|
74
|
+
return compact({
|
75
|
+
"@id": url,
|
76
|
+
"@type": "DigitalDocument",
|
77
|
+
"via": "schema_org",
|
78
|
+
"name": str(name),
|
79
|
+
"datePublished": date_modified,
|
80
|
+
"dateAccessed": datetime.now().isoformat("T", "seconds") if date_modified is None else None,
|
81
|
+
})
|
82
|
+
except Exception as error:
|
83
|
+
print(error)
|
84
|
+
return {
|
85
|
+
"@id": url,
|
86
|
+
"@type": "WebPage",
|
87
|
+
"state": "bad_request",
|
88
|
+
"via": "schema_org",
|
89
|
+
}
|
81
90
|
|
82
91
|
soup = BeautifulSoup(response.text, "html.parser")
|
83
92
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name="commonmeta-py"
|
3
|
-
version="0.16.
|
3
|
+
version="0.16.10"
|
4
4
|
repository = "https://github.com/front-matter/commonmeta-py"
|
5
5
|
homepage = "https://python.commonmeta.org"
|
6
6
|
documentation = "https://python.commonmeta.org"
|
@@ -17,7 +17,7 @@ docutils = "^0.19"
|
|
17
17
|
setuptools = "^69.0"
|
18
18
|
sphinxcontrib-issuetracker = "^0.11"
|
19
19
|
sphinx-autodoc-typehints = "^1.19"
|
20
|
-
httpx = "^0.
|
20
|
+
httpx = "^0.24"
|
21
21
|
dateparser = "^1.1.7"
|
22
22
|
types-dateparser = "^1.1"
|
23
23
|
PyYAML = "^6.0"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/crossref/AccessIndicators.xsd
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/crossref/clinicaltrials.xsd
RENAMED
File without changes
|
{commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/crossref/common5.3.1.xsd
RENAMED
File without changes
|
{commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/crossref/crossref5.3.1.xsd
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{commonmeta_py-0.16.8 → commonmeta_py-0.16.10}/commonmeta/resources/styles/chicago-author-date.csl
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|