commonmeta-py 0.128__tar.gz → 0.130__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.128 → commonmeta_py-0.130}/PKG-INFO +1 -1
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/__init__.py +1 -1
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/doi_utils.py +3 -5
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/readers/jsonfeed_reader.py +4 -1
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/writers/crossref_xml_writer.py +4 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/pyproject.toml +1 -1
- {commonmeta_py-0.128 → commonmeta_py-0.130}/.gitignore +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/LICENSE +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/README.md +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/api_utils.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/author_utils.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/base_utils.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/cli.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/constants.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/date_utils.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/file_utils.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/metadata.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/readers/__init__.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/readers/bibtex_reader.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/readers/cff_reader.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/readers/codemeta_reader.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/readers/commonmeta_reader.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/readers/crossref_reader.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/readers/crossref_xml_reader.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/readers/csl_reader.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/readers/datacite_reader.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/readers/datacite_xml_reader.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/readers/inveniordm_reader.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/readers/kbase_reader.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/readers/openalex_reader.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/readers/ris_reader.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/readers/schema_org_reader.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/cff_v1.2.0.json +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/commonmeta_v0.12.json +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/commonmeta_v0.13.json +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/commonmeta_v0.14.json +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/commonmeta_v0.15.json +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/commonmeta_v0.16.json +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/AccessIndicators.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/JATS-journalpublishing1-3d2-mathml3-elements.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/JATS-journalpublishing1-3d2-mathml3.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/JATS-journalpublishing1-elements.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/JATS-journalpublishing1-mathml3-elements.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/JATS-journalpublishing1-mathml3.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/JATS-journalpublishing1.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/clinicaltrials.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/common5.4.0.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/crossref5.4.0.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/crossref_query_output3.0.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/doi_resources5.4.0.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/fundingdata5.4.0.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/fundref.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/languages5.4.0.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/mediatypes5.4.0.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/module-ali.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/relations.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/standard-modules/mathml3/mathml3-common.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/standard-modules/mathml3/mathml3-content.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/standard-modules/mathml3/mathml3-presentation.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/standard-modules/mathml3/mathml3-strict-content.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/standard-modules/mathml3/mathml3.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/standard-modules/mathml3/module-ali.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/standard-modules/module-ali.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/standard-modules/xlink.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/standard-modules/xml.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/xml.xsd +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref-v0.2.json +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/csl-data.json +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/datacite-v4.5.json +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/datacite-v4.5pr.json +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/spdx/licenses.json +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/spdx-schema.json +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/styles/apa.csl +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/styles/chicago-author-date.csl +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/styles/harvard-cite-them-right.csl +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/styles/ieee.csl +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/styles/modern-language-association.csl +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/styles/vancouver.csl +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/schema_utils.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/translators.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/utils.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/writers/__init__.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/writers/bibtex_writer.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/writers/citation_writer.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/writers/commonmeta_writer.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/writers/csl_writer.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/writers/datacite_writer.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/writers/inveniordm_writer.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/writers/ris_writer.py +0 -0
- {commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/writers/schema_org_writer.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: commonmeta-py
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.130
|
4
4
|
Summary: Library for conversions to/from the Commonmeta scholarly metadata format
|
5
5
|
Project-URL: Homepage, https://python.commonmeta.org
|
6
6
|
Project-URL: Repository, https://github.com/front-matter/commonmeta-py
|
@@ -356,7 +356,7 @@ def generate_wordpress_doi(prefix: str, slug: str, guid: str) -> str:
|
|
356
356
|
return doi
|
357
357
|
|
358
358
|
|
359
|
-
def generate_doi_from_guid(prefix: str, guid: str) -> str:
|
359
|
+
def generate_doi_from_guid(prefix: str, guid: str, checksum=True) -> Optional[str]:
|
360
360
|
"""Validates a GUID that is a DOI"""
|
361
361
|
import base32_lib as base32
|
362
362
|
|
@@ -374,13 +374,11 @@ def generate_doi_from_guid(prefix: str, guid: str) -> str:
|
|
374
374
|
suffix = doi.split("/")[-1]
|
375
375
|
|
376
376
|
try:
|
377
|
-
number = base32.decode(suffix, checksum
|
377
|
+
number = base32.decode(suffix, checksum)
|
378
378
|
if number != 0:
|
379
379
|
return doi
|
380
380
|
except (ValueError, IndexError):
|
381
|
-
|
382
|
-
|
383
|
-
return ""
|
381
|
+
return None
|
384
382
|
|
385
383
|
|
386
384
|
def generate_substack_doi(prefix: str, guid: str) -> str:
|
@@ -75,7 +75,10 @@ def read_jsonfeed(data: Optional[dict], **kwargs) -> Commonmeta:
|
|
75
75
|
elif generator == "Substack" and prefix and guid:
|
76
76
|
_id = generate_substack_doi(prefix, guid)
|
77
77
|
elif prefix and guid:
|
78
|
-
|
78
|
+
# don't use checksum as some legacy GUIDs (generated with commonmeta Go between May 2024
|
79
|
+
# and April 2025) don't have valued checksum
|
80
|
+
guid = guid[:-2] # remove checksum
|
81
|
+
_id = generate_doi_from_guid(prefix, guid, checksum=False)
|
79
82
|
|
80
83
|
# If still no DOI but prefix provided and not registered for DOI generation
|
81
84
|
elif py_.get(meta, "blog.prefix") and not py_.get(meta, "blog.doi_reg", False):
|
@@ -371,6 +371,10 @@ def write_crossref_xml_list(metalist) -> Optional[str]:
|
|
371
371
|
crossref_xml_list = []
|
372
372
|
for item in metalist.items:
|
373
373
|
data = convert_crossref_xml(item)
|
374
|
+
if data is None:
|
375
|
+
logger.error(f"Could not convert metadata to Crossref XML: {item.id}")
|
376
|
+
continue
|
377
|
+
|
374
378
|
crossref_xml = schema.dump(data)
|
375
379
|
|
376
380
|
# Ensure the order of fields in the XML matches the expected order
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "commonmeta-py"
|
3
|
-
version = "0.
|
3
|
+
version = "0.130"
|
4
4
|
description = "Library for conversions to/from the Commonmeta scholarly metadata format"
|
5
5
|
authors = [{ name = "Martin Fenner", email = "martin@front-matter.io" }]
|
6
6
|
requires-python = ">=3.9,<4.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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{commonmeta_py-0.128 → commonmeta_py-0.130}/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.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/clinicaltrials.xsd
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/doi_resources5.4.0.xsd
RENAMED
File without changes
|
{commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/fundingdata5.4.0.xsd
RENAMED
File without changes
|
File without changes
|
{commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/languages5.4.0.xsd
RENAMED
File without changes
|
{commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/mediatypes5.4.0.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
|
{commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/standard-modules/xlink.xsd
RENAMED
File without changes
|
{commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/crossref/standard-modules/xml.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
|
{commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/styles/chicago-author-date.csl
RENAMED
File without changes
|
{commonmeta_py-0.128 → commonmeta_py-0.130}/commonmeta/resources/styles/harvard-cite-them-right.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
|