commonmeta-py 0.23__py3-none-any.whl → 0.24__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.
Files changed (76) hide show
  1. commonmeta/__init__.py +96 -0
  2. commonmeta/api_utils.py +77 -0
  3. commonmeta/author_utils.py +260 -0
  4. commonmeta/base_utils.py +121 -0
  5. commonmeta/cli.py +200 -0
  6. commonmeta/constants.py +587 -0
  7. commonmeta/crossref_utils.py +575 -0
  8. commonmeta/date_utils.py +193 -0
  9. commonmeta/doi_utils.py +273 -0
  10. commonmeta/metadata.py +320 -0
  11. commonmeta/readers/__init__.py +1 -0
  12. commonmeta/readers/cff_reader.py +199 -0
  13. commonmeta/readers/codemeta_reader.py +112 -0
  14. commonmeta/readers/commonmeta_reader.py +13 -0
  15. commonmeta/readers/crossref_reader.py +409 -0
  16. commonmeta/readers/crossref_xml_reader.py +505 -0
  17. commonmeta/readers/csl_reader.py +98 -0
  18. commonmeta/readers/datacite_reader.py +390 -0
  19. commonmeta/readers/datacite_xml_reader.py +359 -0
  20. commonmeta/readers/inveniordm_reader.py +218 -0
  21. commonmeta/readers/json_feed_reader.py +420 -0
  22. commonmeta/readers/kbase_reader.py +205 -0
  23. commonmeta/readers/ris_reader.py +103 -0
  24. commonmeta/readers/schema_org_reader.py +506 -0
  25. commonmeta/resources/cff_v1.2.0.json +1827 -0
  26. commonmeta/resources/commonmeta_v0.12.json +601 -0
  27. commonmeta/resources/commonmeta_v0.13.json +559 -0
  28. commonmeta/resources/commonmeta_v0.14.json +573 -0
  29. commonmeta/resources/crossref/AccessIndicators.xsd +47 -0
  30. commonmeta/resources/crossref/JATS-journalpublishing1-3d2-mathml3-elements.xsd +10130 -0
  31. commonmeta/resources/crossref/JATS-journalpublishing1-3d2-mathml3.xsd +48 -0
  32. commonmeta/resources/crossref/JATS-journalpublishing1-elements.xsd +8705 -0
  33. commonmeta/resources/crossref/JATS-journalpublishing1-mathml3-elements.xsd +8608 -0
  34. commonmeta/resources/crossref/JATS-journalpublishing1-mathml3.xsd +49 -0
  35. commonmeta/resources/crossref/JATS-journalpublishing1.xsd +6176 -0
  36. commonmeta/resources/crossref/clinicaltrials.xsd +61 -0
  37. commonmeta/resources/crossref/common5.3.1.xsd +1538 -0
  38. commonmeta/resources/crossref/crossref5.3.1.xsd +1949 -0
  39. commonmeta/resources/crossref/crossref_query_output3.0.xsd +1097 -0
  40. commonmeta/resources/crossref/fundref.xsd +49 -0
  41. commonmeta/resources/crossref/module-ali.xsd +39 -0
  42. commonmeta/resources/crossref/relations.xsd +444 -0
  43. commonmeta/resources/crossref-v0.2.json +60 -0
  44. commonmeta/resources/csl-data.json +538 -0
  45. commonmeta/resources/datacite-v4.5.json +829 -0
  46. commonmeta/resources/datacite-v4.5pr.json +608 -0
  47. commonmeta/resources/ietf-bcp-47.json +3025 -0
  48. commonmeta/resources/iso-8601.json +3182 -0
  49. commonmeta/resources/spdx/licenses.json +4851 -0
  50. commonmeta/resources/spdx-schema..json +903 -0
  51. commonmeta/resources/styles/apa.csl +1697 -0
  52. commonmeta/resources/styles/chicago-author-date.csl +684 -0
  53. commonmeta/resources/styles/harvard-cite-them-right.csl +321 -0
  54. commonmeta/resources/styles/ieee.csl +468 -0
  55. commonmeta/resources/styles/modern-language-association.csl +341 -0
  56. commonmeta/resources/styles/vancouver.csl +376 -0
  57. commonmeta/schema_utils.py +27 -0
  58. commonmeta/translators.py +47 -0
  59. commonmeta/utils.py +1108 -0
  60. commonmeta/writers/__init__.py +1 -0
  61. commonmeta/writers/bibtex_writer.py +149 -0
  62. commonmeta/writers/citation_writer.py +70 -0
  63. commonmeta/writers/commonmeta_writer.py +68 -0
  64. commonmeta/writers/crossref_xml_writer.py +17 -0
  65. commonmeta/writers/csl_writer.py +79 -0
  66. commonmeta/writers/datacite_writer.py +193 -0
  67. commonmeta/writers/inveniordm_writer.py +94 -0
  68. commonmeta/writers/ris_writer.py +58 -0
  69. commonmeta/writers/schema_org_writer.py +146 -0
  70. {commonmeta_py-0.23.dist-info → commonmeta_py-0.24.dist-info}/METADATA +56 -45
  71. commonmeta_py-0.24.dist-info/RECORD +75 -0
  72. {commonmeta_py-0.23.dist-info → commonmeta_py-0.24.dist-info}/WHEEL +1 -1
  73. commonmeta_py-0.24.dist-info/entry_points.txt +3 -0
  74. commonmeta_py-0.23.dist-info/RECORD +0 -5
  75. /commonmeta_py/__init__.py → /commonmeta/readers/bibtex_reader.py +0 -0
  76. {commonmeta_py-0.23.dist-info/licenses → commonmeta_py-0.24.dist-info}/LICENSE +0 -0
@@ -0,0 +1,538 @@
1
+ {
2
+ "description": "JSON schema for CSL input data",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "$id": "https://resource.citationstyles.org/schema/v1.0/input/json/csl-data.json",
5
+ "type": "array",
6
+ "items": {
7
+ "type": "object",
8
+ "properties": {
9
+ "type": {
10
+ "type": "string",
11
+ "enum": [
12
+ "article",
13
+ "article-journal",
14
+ "article-magazine",
15
+ "article-newspaper",
16
+ "bill",
17
+ "book",
18
+ "broadcast",
19
+ "chapter",
20
+ "classic",
21
+ "collection",
22
+ "dataset",
23
+ "document",
24
+ "entry",
25
+ "entry-dictionary",
26
+ "entry-encyclopedia",
27
+ "event",
28
+ "figure",
29
+ "graphic",
30
+ "hearing",
31
+ "interview",
32
+ "legal_case",
33
+ "legislation",
34
+ "manuscript",
35
+ "map",
36
+ "motion_picture",
37
+ "musical_score",
38
+ "pamphlet",
39
+ "paper-conference",
40
+ "patent",
41
+ "performance",
42
+ "periodical",
43
+ "personal_communication",
44
+ "post",
45
+ "post-weblog",
46
+ "regulation",
47
+ "report",
48
+ "review",
49
+ "review-book",
50
+ "software",
51
+ "song",
52
+ "speech",
53
+ "standard",
54
+ "thesis",
55
+ "treaty",
56
+ "webpage"
57
+ ]
58
+ },
59
+ "id": {
60
+ "type": ["string", "number"]
61
+ },
62
+ "citation-key": {
63
+ "type": "string"
64
+ },
65
+ "categories": {
66
+ "type": "array",
67
+ "items": {
68
+ "type": "string"
69
+ }
70
+ },
71
+ "language": {
72
+ "type": "string"
73
+ },
74
+ "journalAbbreviation": {
75
+ "type": "string"
76
+ },
77
+ "shortTitle": {
78
+ "type": "string"
79
+ },
80
+ "author": {
81
+ "type": "array",
82
+ "items": {
83
+ "$ref": "#/definitions/name-variable"
84
+ }
85
+ },
86
+ "chair": {
87
+ "type": "array",
88
+ "items": {
89
+ "$ref": "#/definitions/name-variable"
90
+ }
91
+ },
92
+ "collection-editor": {
93
+ "type": "array",
94
+ "items": {
95
+ "$ref": "#/definitions/name-variable"
96
+ }
97
+ },
98
+ "compiler": {
99
+ "type": "array",
100
+ "items": {
101
+ "$ref": "#/definitions/name-variable"
102
+ }
103
+ },
104
+ "composer": {
105
+ "type": "array",
106
+ "items": {
107
+ "$ref": "#/definitions/name-variable"
108
+ }
109
+ },
110
+ "container-author": {
111
+ "type": "array",
112
+ "items": {
113
+ "$ref": "#/definitions/name-variable"
114
+ }
115
+ },
116
+ "contributor": {
117
+ "type": "array",
118
+ "items": {
119
+ "$ref": "#/definitions/name-variable"
120
+ }
121
+ },
122
+ "curator": {
123
+ "type": "array",
124
+ "items": {
125
+ "$ref": "#/definitions/name-variable"
126
+ }
127
+ },
128
+ "director": {
129
+ "type": "array",
130
+ "items": {
131
+ "$ref": "#/definitions/name-variable"
132
+ }
133
+ },
134
+ "editor": {
135
+ "type": "array",
136
+ "items": {
137
+ "$ref": "#/definitions/name-variable"
138
+ }
139
+ },
140
+ "editorial-director": {
141
+ "type": "array",
142
+ "items": {
143
+ "$ref": "#/definitions/name-variable"
144
+ }
145
+ },
146
+ "executive-producer": {
147
+ "type": "array",
148
+ "items": {
149
+ "$ref": "#/definitions/name-variable"
150
+ }
151
+ },
152
+ "guest": {
153
+ "type": "array",
154
+ "items": {
155
+ "$ref": "#/definitions/name-variable"
156
+ }
157
+ },
158
+ "host": {
159
+ "type": "array",
160
+ "items": {
161
+ "$ref": "#/definitions/name-variable"
162
+ }
163
+ },
164
+ "interviewer": {
165
+ "type": "array",
166
+ "items": {
167
+ "$ref": "#/definitions/name-variable"
168
+ }
169
+ },
170
+ "illustrator": {
171
+ "type": "array",
172
+ "items": {
173
+ "$ref": "#/definitions/name-variable"
174
+ }
175
+ },
176
+ "narrator": {
177
+ "type": "array",
178
+ "items": {
179
+ "$ref": "#/definitions/name-variable"
180
+ }
181
+ },
182
+ "organizer": {
183
+ "type": "array",
184
+ "items": {
185
+ "$ref": "#/definitions/name-variable"
186
+ }
187
+ },
188
+ "original-author": {
189
+ "type": "array",
190
+ "items": {
191
+ "$ref": "#/definitions/name-variable"
192
+ }
193
+ },
194
+ "performer": {
195
+ "type": "array",
196
+ "items": {
197
+ "$ref": "#/definitions/name-variable"
198
+ }
199
+ },
200
+ "producer": {
201
+ "type": "array",
202
+ "items": {
203
+ "$ref": "#/definitions/name-variable"
204
+ }
205
+ },
206
+ "recipient": {
207
+ "type": "array",
208
+ "items": {
209
+ "$ref": "#/definitions/name-variable"
210
+ }
211
+ },
212
+ "reviewed-author": {
213
+ "type": "array",
214
+ "items": {
215
+ "$ref": "#/definitions/name-variable"
216
+ }
217
+ },
218
+ "script-writer": {
219
+ "type": "array",
220
+ "items": {
221
+ "$ref": "#/definitions/name-variable"
222
+ }
223
+ },
224
+ "series-creator": {
225
+ "type": "array",
226
+ "items": {
227
+ "$ref": "#/definitions/name-variable"
228
+ }
229
+ },
230
+ "translator": {
231
+ "type": "array",
232
+ "items": {
233
+ "$ref": "#/definitions/name-variable"
234
+ }
235
+ },
236
+ "accessed": {
237
+ "$ref": "#/definitions/date-variable"
238
+ },
239
+ "available-date": {
240
+ "$ref": "#/definitions/date-variable"
241
+ },
242
+ "event-date": {
243
+ "$ref": "#/definitions/date-variable"
244
+ },
245
+ "issued": {
246
+ "$ref": "#/definitions/date-variable"
247
+ },
248
+ "original-date": {
249
+ "$ref": "#/definitions/date-variable"
250
+ },
251
+ "submitted": {
252
+ "$ref": "#/definitions/date-variable"
253
+ },
254
+ "abstract": {
255
+ "type": "string"
256
+ },
257
+ "annote": {
258
+ "type": "string"
259
+ },
260
+ "archive": {
261
+ "type": "string"
262
+ },
263
+ "archive_collection": {
264
+ "type": "string"
265
+ },
266
+ "archive_location": {
267
+ "type": "string"
268
+ },
269
+ "archive-place": {
270
+ "type": "string"
271
+ },
272
+ "authority": {
273
+ "type": "string"
274
+ },
275
+ "call-number": {
276
+ "type": "string"
277
+ },
278
+ "chapter-number": {
279
+ "type": ["string", "number"]
280
+ },
281
+ "citation-number": {
282
+ "type": ["string", "number"]
283
+ },
284
+ "citation-label": {
285
+ "type": "string"
286
+ },
287
+ "collection-number": {
288
+ "type": ["string", "number"]
289
+ },
290
+ "collection-title": {
291
+ "type": "string"
292
+ },
293
+ "container-title": {
294
+ "type": "string"
295
+ },
296
+ "container-title-short": {
297
+ "type": "string"
298
+ },
299
+ "dimensions": {
300
+ "type": "string"
301
+ },
302
+ "division": {
303
+ "type": "string"
304
+ },
305
+ "DOI": {
306
+ "type": "string"
307
+ },
308
+ "edition": {
309
+ "type": ["string", "number"]
310
+ },
311
+ "event": {
312
+ "description": "[Deprecated - use 'event-title' instead. Will be removed in 1.1]",
313
+ "type": "string"
314
+ },
315
+ "event-title": {
316
+ "type": "string"
317
+ },
318
+ "event-place": {
319
+ "type": "string"
320
+ },
321
+ "first-reference-note-number": {
322
+ "type": ["string", "number"]
323
+ },
324
+ "genre": {
325
+ "type": "string"
326
+ },
327
+ "ISBN": {
328
+ "type": "string"
329
+ },
330
+ "ISSN": {
331
+ "type": "string"
332
+ },
333
+ "issue": {
334
+ "type": ["string", "number"]
335
+ },
336
+ "jurisdiction": {
337
+ "type": "string"
338
+ },
339
+ "keyword": {
340
+ "type": "string"
341
+ },
342
+ "locator": {
343
+ "type": ["string", "number"]
344
+ },
345
+ "medium": {
346
+ "type": "string"
347
+ },
348
+ "note": {
349
+ "type": "string"
350
+ },
351
+ "number": {
352
+ "type": ["string", "number"]
353
+ },
354
+ "number-of-pages": {
355
+ "type": ["string", "number"]
356
+ },
357
+ "number-of-volumes": {
358
+ "type": ["string", "number"]
359
+ },
360
+ "original-publisher": {
361
+ "type": "string"
362
+ },
363
+ "original-publisher-place": {
364
+ "type": "string"
365
+ },
366
+ "original-title": {
367
+ "type": "string"
368
+ },
369
+ "page": {
370
+ "type": ["string", "number"]
371
+ },
372
+ "page-first": {
373
+ "type": ["string", "number"]
374
+ },
375
+ "part": {
376
+ "type": ["string", "number"]
377
+ },
378
+ "part-title": {
379
+ "type": "string"
380
+ },
381
+ "PMCID": {
382
+ "type": "string"
383
+ },
384
+ "PMID": {
385
+ "type": "string"
386
+ },
387
+ "printing": {
388
+ "type": ["string", "number"]
389
+ },
390
+ "publisher": {
391
+ "type": "string"
392
+ },
393
+ "publisher-place": {
394
+ "type": "string"
395
+ },
396
+ "references": {
397
+ "type": "string"
398
+ },
399
+ "reviewed-genre": {
400
+ "type": "string"
401
+ },
402
+ "reviewed-title": {
403
+ "type": "string"
404
+ },
405
+ "scale": {
406
+ "type": "string"
407
+ },
408
+ "section": {
409
+ "type": "string"
410
+ },
411
+ "source": {
412
+ "type": "string"
413
+ },
414
+ "status": {
415
+ "type": "string"
416
+ },
417
+ "supplement": {
418
+ "type": ["string", "number"]
419
+ },
420
+ "title": {
421
+ "type": "string"
422
+ },
423
+ "title-short": {
424
+ "type": "string"
425
+ },
426
+ "URL": {
427
+ "type": "string"
428
+ },
429
+ "version": {
430
+ "type": "string"
431
+ },
432
+ "volume": {
433
+ "type": ["string", "number"]
434
+ },
435
+ "volume-title": {
436
+ "type": "string"
437
+ },
438
+ "volume-title-short": {
439
+ "type": "string"
440
+ },
441
+ "year-suffix": {
442
+ "type": "string"
443
+ },
444
+ "custom": {
445
+ "title": "Custom key-value pairs.",
446
+ "type": "object",
447
+ "description": "Used to store additional information that does not have a designated CSL JSON field. The custom field is preferred over the note field for storing custom data, particularly for storing key-value pairs, as the note field is used for user annotations in annotated bibliography styles.",
448
+ "examples": [
449
+ {
450
+ "short_id": "xyz",
451
+ "other-ids": ["alternative-id"]
452
+ },
453
+ {
454
+ "metadata-double-checked": true
455
+ }
456
+ ]
457
+ }
458
+ },
459
+ "required": ["type", "id"],
460
+ "additionalProperties": false
461
+ },
462
+ "definitions": {
463
+ "name-variable": {
464
+ "anyOf": [
465
+ {
466
+ "type": "object",
467
+ "properties": {
468
+ "family": {
469
+ "type": "string"
470
+ },
471
+ "given": {
472
+ "type": "string"
473
+ },
474
+ "dropping-particle": {
475
+ "type": "string"
476
+ },
477
+ "non-dropping-particle": {
478
+ "type": "string"
479
+ },
480
+ "suffix": {
481
+ "type": "string"
482
+ },
483
+ "comma-suffix": {
484
+ "type": ["string", "number", "boolean"]
485
+ },
486
+ "static-ordering": {
487
+ "type": ["string", "number", "boolean"]
488
+ },
489
+ "literal": {
490
+ "type": "string"
491
+ },
492
+ "parse-names": {
493
+ "type": ["string", "number", "boolean"]
494
+ }
495
+ },
496
+ "additionalProperties": false
497
+ }
498
+ ]
499
+ },
500
+ "date-variable": {
501
+ "title": "Date content model.",
502
+ "description": "The CSL input model supports two different date representations: an EDTF string (preferred), and a more structured alternative.",
503
+ "anyOf": [
504
+ {
505
+ "type": "object",
506
+ "properties": {
507
+ "date-parts": {
508
+ "type": "array",
509
+ "items": {
510
+ "type": "array",
511
+ "items": {
512
+ "type": ["string", "number"]
513
+ },
514
+ "minItems": 1,
515
+ "maxItems": 3
516
+ },
517
+ "minItems": 1,
518
+ "maxItems": 2
519
+ },
520
+ "season": {
521
+ "type": ["string", "number"]
522
+ },
523
+ "circa": {
524
+ "type": ["string", "number", "boolean"]
525
+ },
526
+ "literal": {
527
+ "type": "string"
528
+ },
529
+ "raw": {
530
+ "type": "string"
531
+ }
532
+ },
533
+ "additionalProperties": false
534
+ }
535
+ ]
536
+ }
537
+ }
538
+ }