commonmeta-py 0.22__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 (77) 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/bibtex_reader.py +0 -0
  13. commonmeta/readers/cff_reader.py +199 -0
  14. commonmeta/readers/codemeta_reader.py +112 -0
  15. commonmeta/readers/commonmeta_reader.py +13 -0
  16. commonmeta/readers/crossref_reader.py +409 -0
  17. commonmeta/readers/crossref_xml_reader.py +505 -0
  18. commonmeta/readers/csl_reader.py +98 -0
  19. commonmeta/readers/datacite_reader.py +390 -0
  20. commonmeta/readers/datacite_xml_reader.py +359 -0
  21. commonmeta/readers/inveniordm_reader.py +218 -0
  22. commonmeta/readers/json_feed_reader.py +420 -0
  23. commonmeta/readers/kbase_reader.py +205 -0
  24. commonmeta/readers/ris_reader.py +103 -0
  25. commonmeta/readers/schema_org_reader.py +506 -0
  26. commonmeta/resources/cff_v1.2.0.json +1827 -0
  27. commonmeta/resources/commonmeta_v0.12.json +601 -0
  28. commonmeta/resources/commonmeta_v0.13.json +559 -0
  29. commonmeta/resources/commonmeta_v0.14.json +573 -0
  30. commonmeta/resources/crossref/AccessIndicators.xsd +47 -0
  31. commonmeta/resources/crossref/JATS-journalpublishing1-3d2-mathml3-elements.xsd +10130 -0
  32. commonmeta/resources/crossref/JATS-journalpublishing1-3d2-mathml3.xsd +48 -0
  33. commonmeta/resources/crossref/JATS-journalpublishing1-elements.xsd +8705 -0
  34. commonmeta/resources/crossref/JATS-journalpublishing1-mathml3-elements.xsd +8608 -0
  35. commonmeta/resources/crossref/JATS-journalpublishing1-mathml3.xsd +49 -0
  36. commonmeta/resources/crossref/JATS-journalpublishing1.xsd +6176 -0
  37. commonmeta/resources/crossref/clinicaltrials.xsd +61 -0
  38. commonmeta/resources/crossref/common5.3.1.xsd +1538 -0
  39. commonmeta/resources/crossref/crossref5.3.1.xsd +1949 -0
  40. commonmeta/resources/crossref/crossref_query_output3.0.xsd +1097 -0
  41. commonmeta/resources/crossref/fundref.xsd +49 -0
  42. commonmeta/resources/crossref/module-ali.xsd +39 -0
  43. commonmeta/resources/crossref/relations.xsd +444 -0
  44. commonmeta/resources/crossref-v0.2.json +60 -0
  45. commonmeta/resources/csl-data.json +538 -0
  46. commonmeta/resources/datacite-v4.5.json +829 -0
  47. commonmeta/resources/datacite-v4.5pr.json +608 -0
  48. commonmeta/resources/ietf-bcp-47.json +3025 -0
  49. commonmeta/resources/iso-8601.json +3182 -0
  50. commonmeta/resources/spdx/licenses.json +4851 -0
  51. commonmeta/resources/spdx-schema..json +903 -0
  52. commonmeta/resources/styles/apa.csl +1697 -0
  53. commonmeta/resources/styles/chicago-author-date.csl +684 -0
  54. commonmeta/resources/styles/harvard-cite-them-right.csl +321 -0
  55. commonmeta/resources/styles/ieee.csl +468 -0
  56. commonmeta/resources/styles/modern-language-association.csl +341 -0
  57. commonmeta/resources/styles/vancouver.csl +376 -0
  58. commonmeta/schema_utils.py +27 -0
  59. commonmeta/translators.py +47 -0
  60. commonmeta/utils.py +1108 -0
  61. commonmeta/writers/__init__.py +1 -0
  62. commonmeta/writers/bibtex_writer.py +149 -0
  63. commonmeta/writers/citation_writer.py +70 -0
  64. commonmeta/writers/commonmeta_writer.py +68 -0
  65. commonmeta/writers/crossref_xml_writer.py +17 -0
  66. commonmeta/writers/csl_writer.py +79 -0
  67. commonmeta/writers/datacite_writer.py +193 -0
  68. commonmeta/writers/inveniordm_writer.py +94 -0
  69. commonmeta/writers/ris_writer.py +58 -0
  70. commonmeta/writers/schema_org_writer.py +146 -0
  71. {commonmeta_py-0.22.dist-info → commonmeta_py-0.24.dist-info}/METADATA +56 -45
  72. commonmeta_py-0.24.dist-info/RECORD +75 -0
  73. {commonmeta_py-0.22.dist-info → commonmeta_py-0.24.dist-info}/WHEEL +1 -1
  74. commonmeta_py-0.24.dist-info/entry_points.txt +3 -0
  75. commonmeta_py/__init__.py +0 -2
  76. commonmeta_py-0.22.dist-info/RECORD +0 -5
  77. {commonmeta_py-0.22.dist-info/licenses → commonmeta_py-0.24.dist-info}/LICENSE +0 -0
@@ -0,0 +1,341 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never" page-range-format="minimal-two">
3
+ <info>
4
+ <title>Modern Language Association 9th edition</title>
5
+ <title-short>MLA</title-short>
6
+ <id>http://www.zotero.org/styles/modern-language-association</id>
7
+ <link href="http://www.zotero.org/styles/modern-language-association" rel="self"/>
8
+ <link href="http://style.mla.org" rel="documentation"/>
9
+ <author>
10
+ <name>Sebastian Karcher</name>
11
+ </author>
12
+ <contributor>
13
+ <name>Patrick O'Brien</name>
14
+ </contributor>
15
+ <category citation-format="author"/>
16
+ <category field="generic-base"/>
17
+ <summary>This style adheres to the MLA 9th edition handbook. Follows the structure of references as outlined in the MLA Manual closely</summary>
18
+ <updated>2023-07-21T20:05:10+00:00</updated>
19
+ <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
20
+ </info>
21
+ <locale xml:lang="en">
22
+ <date form="text">
23
+ <date-part name="day" suffix=" "/>
24
+ <date-part name="month" suffix=" " form="short"/>
25
+ <date-part name="year"/>
26
+ </date>
27
+ <terms>
28
+ <term name="month-01" form="short">Jan.</term>
29
+ <term name="month-02" form="short">Feb.</term>
30
+ <term name="month-03" form="short">Mar.</term>
31
+ <term name="month-04" form="short">Apr.</term>
32
+ <term name="month-05" form="short">May</term>
33
+ <term name="month-06" form="short">June</term>
34
+ <term name="month-07" form="short">July</term>
35
+ <term name="month-08" form="short">Aug.</term>
36
+ <term name="month-09" form="short">Sept.</term>
37
+ <term name="month-10" form="short">Oct.</term>
38
+ <term name="month-11" form="short">Nov.</term>
39
+ <term name="month-12" form="short">Dec.</term>
40
+ <term name="translator" form="short">trans.</term>
41
+ </terms>
42
+ </locale>
43
+ <macro name="author">
44
+ <names variable="author">
45
+ <name name-as-sort-order="first" and="text" delimiter-precedes-last="always" delimiter-precedes-et-al="always" initialize="false" initialize-with=". "/>
46
+ <label form="long" prefix=", "/>
47
+ <substitute>
48
+ <names variable="editor"/>
49
+ <names variable="translator"/>
50
+ <text macro="title"/>
51
+ </substitute>
52
+ </names>
53
+ </macro>
54
+ <macro name="author-short">
55
+ <group delimiter=", ">
56
+ <names variable="author">
57
+ <name form="short" initialize-with=". " and="text"/>
58
+ <substitute>
59
+ <names variable="editor"/>
60
+ <names variable="translator"/>
61
+ <text macro="title-short"/>
62
+ </substitute>
63
+ </names>
64
+ <choose>
65
+ <if disambiguate="true">
66
+ <text macro="title-short"/>
67
+ </if>
68
+ </choose>
69
+ </group>
70
+ </macro>
71
+ <macro name="title">
72
+ <choose>
73
+ <if variable="container-title" match="any">
74
+ <text variable="title" quotes="true" text-case="title"/>
75
+ </if>
76
+ <else>
77
+ <text variable="title" font-style="italic" text-case="title"/>
78
+ </else>
79
+ </choose>
80
+ </macro>
81
+ <macro name="title-short">
82
+ <choose>
83
+ <if variable="container-title" match="any">
84
+ <text variable="title" form="short" quotes="true" text-case="title"/>
85
+ </if>
86
+ <else>
87
+ <text variable="title" form="short" font-style="italic" text-case="title"/>
88
+ </else>
89
+ </choose>
90
+ </macro>
91
+ <macro name="container-title">
92
+ <text variable="container-title" font-style="italic" text-case="title"/>
93
+ </macro>
94
+ <macro name="other-contributors">
95
+ <choose>
96
+ <if variable="container-title" match="any">
97
+ <group delimiter=", ">
98
+ <names variable="container-author" delimiter=", ">
99
+ <label form="verb" suffix=" "/>
100
+ <name and="text"/>
101
+ </names>
102
+ <names variable="editor translator" delimiter=", ">
103
+ <label form="verb" suffix=" "/>
104
+ <name and="text"/>
105
+ </names>
106
+ <names variable="director illustrator interviewer" delimiter=", ">
107
+ <label form="verb" suffix=" "/>
108
+ <name and="text"/>
109
+ </names>
110
+ </group>
111
+ </if>
112
+ <else>
113
+ <group delimiter=", ">
114
+ <names variable="container-author" delimiter=", ">
115
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
116
+ <name and="text"/>
117
+ </names>
118
+ <names variable="editor translator" delimiter=", ">
119
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
120
+ <name and="text"/>
121
+ </names>
122
+ <names variable="director illustrator interviewer" delimiter=", ">
123
+ <label form="verb" suffix=" " text-case="capitalize-first"/>
124
+ <name and="text"/>
125
+ </names>
126
+ </group>
127
+ </else>
128
+ </choose>
129
+ </macro>
130
+ <macro name="version">
131
+ <group delimiter=", ">
132
+ <choose>
133
+ <if is-numeric="edition">
134
+ <group delimiter=" ">
135
+ <number variable="edition" form="ordinal"/>
136
+ <text term="edition" form="short"/>
137
+ </group>
138
+ </if>
139
+ <else>
140
+ <text variable="edition" text-case="capitalize-first"/>
141
+ </else>
142
+ </choose>
143
+ <text variable="version"/>
144
+ <text variable="medium"/>
145
+ </group>
146
+ </macro>
147
+ <macro name="volume-lowercase">
148
+ <group delimiter=" ">
149
+ <text term="volume" form="short"/>
150
+ <text variable="volume"/>
151
+ </group>
152
+ </macro>
153
+ <macro name="number">
154
+ <group delimiter=", ">
155
+ <group>
156
+ <choose>
157
+ <!--lowercase if we have a preceding element-->
158
+ <if variable="edition container-title" match="any">
159
+ <text macro="volume-lowercase"/>
160
+ </if>
161
+ <!--other contributors preceding the volume-->
162
+ <else-if variable="author" match="all">
163
+ <choose>
164
+ <if variable="editor translator container-author illustrator interviewer director" match="any">
165
+ <text macro="volume-lowercase"/>
166
+ </if>
167
+ </choose>
168
+ </else-if>
169
+ <else-if variable="editor" match="all">
170
+ <choose>
171
+ <if variable="translator container-author illustrator interviewer director" match="any">
172
+ <text macro="volume-lowercase"/>
173
+ </if>
174
+ </choose>
175
+ </else-if>
176
+ <else-if variable="container-author illustrator interviewer director" match="any">
177
+ <text macro="volume-lowercase"/>
178
+ </else-if>
179
+ <else>
180
+ <group delimiter=" ">
181
+ <text term="volume" form="short" text-case="capitalize-first"/>
182
+ <text variable="volume"/>
183
+ </group>
184
+ </else>
185
+ </choose>
186
+ </group>
187
+ <group delimiter=" ">
188
+ <text term="issue" form="short"/>
189
+ <text variable="issue"/>
190
+ </group>
191
+ <choose>
192
+ <if type="report">
193
+ <text variable="genre"/>
194
+ </if>
195
+ </choose>
196
+ <text variable="number"/>
197
+ </group>
198
+ </macro>
199
+ <macro name="publisher">
200
+ <choose>
201
+ <if type="thesis" match="any">
202
+ <group delimiter=". ">
203
+ <date variable="issued" form="numeric" date-parts="year"/>
204
+ <group delimiter=", ">
205
+ <text variable="publisher"/>
206
+ <text variable="genre"/>
207
+ </group>
208
+ </group>
209
+ </if>
210
+ <else-if type="article-magazine article-newspaper article-journal" match="none">
211
+ <text variable="publisher"/>
212
+ </else-if>
213
+ </choose>
214
+ </macro>
215
+ <macro name="publication-date">
216
+ <choose>
217
+ <if type="book chapter paper-conference motion_picture" match="any">
218
+ <date variable="issued" form="numeric" date-parts="year"/>
219
+ </if>
220
+ <else-if type="article-journal" match="any">
221
+ <date variable="issued" form="text" date-parts="year-month"/>
222
+ </else-if>
223
+ <else-if type="speech thesis" match="none">
224
+ <date variable="issued" form="text"/>
225
+ </else-if>
226
+ </choose>
227
+ </macro>
228
+ <macro name="location">
229
+ <group delimiter=", ">
230
+ <group delimiter=" ">
231
+ <label variable="page" form="short"/>
232
+ <text variable="page"/>
233
+ </group>
234
+ <choose>
235
+ <if variable="source" match="none">
236
+ <text macro="URI"/>
237
+ </if>
238
+ </choose>
239
+ </group>
240
+ </macro>
241
+ <macro name="container2-title">
242
+ <group delimiter=", ">
243
+ <choose>
244
+ <if type="speech">
245
+ <text variable="event"/>
246
+ <date variable="event-date" form="text"/>
247
+ <text variable="event-place"/>
248
+ </if>
249
+ </choose>
250
+ <text variable="archive"/>
251
+ <text variable="archive-place"/>
252
+ <text variable="archive_location"/>
253
+ </group>
254
+ </macro>
255
+ <macro name="container2-location">
256
+ <choose>
257
+ <if variable="source">
258
+ <choose>
259
+ <if variable="DOI URL" match="any">
260
+ <group delimiter=", ">
261
+ <text variable="source" font-style="italic"/>
262
+ <text macro="URI"/>
263
+ </group>
264
+ </if>
265
+ </choose>
266
+ </if>
267
+ </choose>
268
+ </macro>
269
+ <macro name="URI">
270
+ <choose>
271
+ <if variable="DOI">
272
+ <text variable="DOI" prefix="https://doi.org/"/>
273
+ </if>
274
+ <else>
275
+ <text variable="URL"/>
276
+ </else>
277
+ </choose>
278
+ </macro>
279
+ <macro name="accessed">
280
+ <!--using accessed where we don't have an issued date; follows recommendation on p. 53 -->
281
+ <choose>
282
+ <if variable="issued" match="none">
283
+ <group delimiter=" ">
284
+ <text term="accessed" text-case="capitalize-first"/>
285
+ <date variable="accessed" form="text"/>
286
+ </group>
287
+ </if>
288
+ </choose>
289
+ </macro>
290
+ <citation et-al-min="3" et-al-use-first="1" disambiguate-add-names="true" disambiguate-add-givenname="true">
291
+ <layout prefix="(" suffix=")" delimiter="; ">
292
+ <choose>
293
+ <if locator="page line" match="any">
294
+ <group delimiter=" ">
295
+ <text macro="author-short"/>
296
+ <text variable="locator"/>
297
+ </group>
298
+ </if>
299
+ <else>
300
+ <group delimiter=", ">
301
+ <text macro="author-short"/>
302
+ <group>
303
+ <label variable="locator" form="short"/>
304
+ <text variable="locator"/>
305
+ </group>
306
+ </group>
307
+ </else>
308
+ </choose>
309
+ </layout>
310
+ </citation>
311
+ <bibliography hanging-indent="true" et-al-min="3" et-al-use-first="1" line-spacing="2" entry-spacing="0" subsequent-author-substitute="---">
312
+ <sort>
313
+ <key macro="author"/>
314
+ <key variable="title"/>
315
+ </sort>
316
+ <layout suffix=".">
317
+ <group delimiter=". ">
318
+ <text macro="author"/>
319
+ <text macro="title"/>
320
+ <date variable="original-date" form="numeric" date-parts="year"/>
321
+ <group delimiter=", ">
322
+ <!---This group corresponds to MLA's "Container 1"-->
323
+ <text macro="container-title"/>
324
+ <text macro="other-contributors"/>
325
+ <text macro="version"/>
326
+ <text macro="number"/>
327
+ <text macro="publisher"/>
328
+ <text macro="publication-date"/>
329
+ <text macro="location"/>
330
+ </group>
331
+ <group delimiter=", ">
332
+ <!---This group corresponds to MLA's "Container 2"-->
333
+ <!--currently just using this one for archival info-->
334
+ <text macro="container2-title"/>
335
+ <text macro="container2-location"/>
336
+ </group>
337
+ <text macro="accessed"/>
338
+ </group>
339
+ </layout>
340
+ </bibliography>
341
+ </style>