commonmeta-py 0.61__py3-none-any.whl → 0.62__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 CHANGED
@@ -10,7 +10,7 @@ commonmeta-py is a Python library to convert scholarly metadata
10
10
  """
11
11
 
12
12
  __title__ = "commonmeta-py"
13
- __version__ = "0.61"
13
+ __version__ = "0.62"
14
14
  __author__ = "Martin Fenner"
15
15
  __license__ = "MIT"
16
16
 
@@ -33,6 +33,8 @@ def write_csl_item(metadata) -> Optional[dict]:
33
33
 
34
34
  container = metadata.container or {}
35
35
  publisher = metadata.publisher or {}
36
+ date = metadata.date or {}
37
+
36
38
  return compact(
37
39
  {
38
40
  "type": _type,
@@ -47,14 +49,14 @@ def write_csl_item(metadata) -> Optional[dict]:
47
49
  "language": metadata.language,
48
50
  "author": author,
49
51
  # "contributor": to_csl(wrap(metadata.contributors)),
50
- "issued": get_date_parts(metadata.date.get("published"))
51
- if metadata.date.get("published", None)
52
+ "issued": get_date_parts(date.get("published"))
53
+ if date.get("published", None)
52
54
  else None,
53
- "submitted": get_date_parts(metadata.date.get("submitted"))
54
- if metadata.date.get("submitted", None)
55
+ "submitted": get_date_parts(date.get("submitted"))
56
+ if date.get("submitted", None)
55
57
  else None,
56
- "accessed": get_date_parts(metadata.date.get("accessed"))
57
- if metadata.date.get("accessed", None)
58
+ "accessed": get_date_parts(date.get("accessed"))
59
+ if date.get("accessed", None)
58
60
  else None,
59
61
  "abstract": parse_attributes(
60
62
  metadata.descriptions, content="description", first=True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: commonmeta-py
3
- Version: 0.61
3
+ Version: 0.62
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
@@ -1,4 +1,4 @@
1
- commonmeta/__init__.py,sha256=mpMVDsuOZKg_uoM4S0GKd7huJDFJqyJmX4ER-SIp1wc,1795
1
+ commonmeta/__init__.py,sha256=t2QRGjR73eSP55rlkljDk1Rckce3LCX8TSKrmZzNbh4,1795
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
@@ -64,13 +64,13 @@ commonmeta/writers/bibtex_writer.py,sha256=s3hIJIgWvSG7TAriZMRQEAyuitw6ebwWSI1Yc
64
64
  commonmeta/writers/citation_writer.py,sha256=RjaNh9EALxq6gfODLRWVJxGxPArGd6ZiHUlkYnCT6MA,2355
65
65
  commonmeta/writers/commonmeta_writer.py,sha256=2qlttCfYpGhfVjrYkjzbIra7AywssRLT30FlxEWgXGw,1844
66
66
  commonmeta/writers/crossref_xml_writer.py,sha256=0Ds494RnXfdfjWw5CLX1kwV2zP7gqffdVqO-X74Uc6c,492
67
- commonmeta/writers/csl_writer.py,sha256=rlCeShkvC6ui9By0yVfNCMay_JfaZ4AooUPOPg-g-2M,2819
67
+ commonmeta/writers/csl_writer.py,sha256=6N-93R1emcOsZrUTIhPBVd_Fv1C8Z5EAFYI0mYjoYaY,2797
68
68
  commonmeta/writers/datacite_writer.py,sha256=G7Lr0aZ4sAEdbfXe3dG4Y6AyGUKA9UWr_iiaQRDnV24,6233
69
69
  commonmeta/writers/inveniordm_writer.py,sha256=oVcXdHYtuugbfDgKO8JwTRXmP7AK2U96uK4YF0eKXAY,11399
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.61.dist-info/LICENSE,sha256=746hEF2wZCKkcckk5-_DcBLtHewfaEMS4iXTlA1PVwk,1074
73
- commonmeta_py-0.61.dist-info/METADATA,sha256=y-HIlL_4UrT-S2JKmeR88cqbEvQHkYA4petMmujIoCw,8279
74
- commonmeta_py-0.61.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
75
- commonmeta_py-0.61.dist-info/entry_points.txt,sha256=vbcDw3_2lMTKdcAL2VUF4DRYRpKuzXVYLMCdgKVf88U,49
76
- commonmeta_py-0.61.dist-info/RECORD,,
72
+ commonmeta_py-0.62.dist-info/LICENSE,sha256=746hEF2wZCKkcckk5-_DcBLtHewfaEMS4iXTlA1PVwk,1074
73
+ commonmeta_py-0.62.dist-info/METADATA,sha256=3amCMEJUFi6F88HR4wPmrBww-8VL49HgBs0LamBOsqo,8279
74
+ commonmeta_py-0.62.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
75
+ commonmeta_py-0.62.dist-info/entry_points.txt,sha256=vbcDw3_2lMTKdcAL2VUF4DRYRpKuzXVYLMCdgKVf88U,49
76
+ commonmeta_py-0.62.dist-info/RECORD,,