Debian Codegraph @

PKG-INFO

raw
1 Metadata-Version: 2.4
2 Name: citeproc-py
3 Version: 0.10.4
4 Summary: Citations and bibliography formatter
5 Author-email: Brecht Machiels <[email protected]>
6 License-Expression: BSD-2-Clause-Views
7 Project-URL: homepage, https://github.com/citeproc-py/citeproc-py
8 Keywords: csl,citation,html,rst,bibtex,xml
9 Classifier: Development Status :: 3 - Alpha
10 Classifier: Environment :: Console
11 Classifier: Environment :: Other Environment
12 Classifier: Environment :: Web Environment
13 Classifier: Intended Audience :: Developers
14 Classifier: Intended Audience :: Education
15 Classifier: Intended Audience :: End Users/Desktop
16 Classifier: Intended Audience :: Legal Industry
17 Classifier: Intended Audience :: Other Audience
18 Classifier: Intended Audience :: Science/Research
19 Classifier: Operating System :: OS Independent
20 Classifier: Programming Language :: Python
21 Classifier: Programming Language :: Python :: 3.9
22 Classifier: Programming Language :: Python :: 3.10
23 Classifier: Programming Language :: Python :: 3.11
24 Classifier: Programming Language :: Python :: 3.12
25 Classifier: Programming Language :: Python :: 3.13
26 Classifier: Programming Language :: Python :: 3.14
27 Classifier: Topic :: Documentation
28 Classifier: Topic :: Printing
29 Classifier: Topic :: Software Development :: Documentation
30 Classifier: Topic :: Software Development :: Libraries :: Python Modules
31 Provides: citeproc
32 Requires-Python: >=3.9
33 Description-Content-Type: text/markdown
34 License-File: LICENSE
35 Requires-Dist: lxml
36 Provides-Extra: full
37 Requires-Dist: citeproc-py-styles; extra == "full"
38 Provides-Extra: tests
39 Requires-Dist: citeproc-py-styles; extra == "tests"
40 Dynamic: license-file
41
42 # citeproc-py
43
44 [![PyPI - Version](https://img.shields.io/pypi/v/citeproc-py)](https://pypi.org/project/citeproc-py/)
45 [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/citeproc-py/citeproc-py/test.yml)](https://github.com/citeproc-py/citeproc-py/actions?query=branch%3Amaster+workflow%3ATest)
46 [![Coveralls](https://img.shields.io/coverallsCoverage/github/citeproc-py/citeproc-py)](https://coveralls.io/github/citeproc-py/citeproc-py)
47
48
49 citeproc-py is a [CSL](https://citationstyles.org/) processor for Python. It aims to implement the
50 [CSL 1.0.2 specification](https://docs.citationstyles.org/en/v1.0.2/specification.html).
51 citeproc-py can output styled citations and
52 bibliographies in a number of different output formats. Currently
53 supported are plain text, reStructuredText and HTML. Other formats can
54 be added easily.
55
56 citeproc-py uses [semantic versioning](https://semver.org/). Currently, its major version
57 number is still at 0, meaning the API is not yet stable. However, you
58 should not expect to see any major API changes soon.
59
60 ## Requirements
61
62 citeproc-py supports Python 3.9 and up. It depends on [lxml](https://lxml.de/) for parsing and
63 navigating the CSL style and locale files.
64
65 # Installation
66
67 The recommended way of installing citeproc-py is by using
68 [pip](https://pip.pypa.io/en/latest/):
69 ```bash
70 pip install citeproc-py
71 ```
72
73 If `lxml` isn't installed, `pip` will try to install it for you.
74
75 If you insist, you can manually install citeproc-py from distribution packages
76 hosted at [PyPI](https://pypi.python.org/pypi/citeproc-py/). Please ignore the release archives offered by GitHub.
77
78 ## Getting Started
79
80 To get started with citeproc-py, take a look at the examples under
81 `examples/`. Two examples are provided, one parsing references from a
82 JSON representation of references as supported by citeproc-js, another
83 parsing the references from a BibTeX file. Both show and explain how to
84 cite references and render the bibliography.
85
86 ## CSL Compatibility
87
88 Currently, citeproc-py passes almost 60% of the (relevant) tests in the
89 [citeproc-test suite](https://github.com/citation-style-language/test-suite).
90 However, it is more than 60% complete, as
91 citeproc-py doesn't take care of double spaces and repeated punctuation
92 marks yet, making a good deal of the tests fail. In addition, the
93 following features have not yet been implemented (there are probably
94 some I forgot though):
95
96 - disambiguation/year-suffix
97 - et-al-subsequent-min/et-al-subsequent-use-first
98 - collapsing
99 - punctuation-in-quote
100 - display
101
102 Also, some [citeproc-js](https://github.com/juris-m/citeproc-js)
103 functionality that is not part of the CSL spec is not (yet) supported:
104
105 - raw dates
106 - static-ordering
107 - literal names
108
109 ## Contributing
110
111 citeproc-py is 100% volunteer maintained, and new contributions are always welcome.
112 If you would like to contribute, please follow the guidelines in the
113 [CONTRIBUTING.md](https://github.com/citeproc-py/citeproc-py/blob/master/CONTRIBUTING.md) file.
114
115 ## Local Install and Running the Tests
116
117 First clone the `citeproc-py` repository and install the submodules with
118 ```bash
119 git submodule update --init
120 ```
121
122 Then install with
123 ```bash
124 pip install --editable .
125 ```
126
127 Then move to the `tests` directory and run
128 ```bash
129 python citeproc-test.py
130 ```
131
132 Run
133 ```bash
134 citeproc-test.py --help
135 ```
136 to see its usage information. The first time
137 you run the script it will clone the
138 [citeproc-test suite](https://github.com/citation-style-language/test-suite) repository into the
139 `tests` directory and checkout the last tested version. By default failed tests are
140 automatically added into the `failing_tests.txt` file and aren't shown when
141 running the test suite again.
142
143 If you want git to fully ignore the submodule, you can type
144 ```bash
145 git update-index --assume-unchanged citeproc/data/schema
146 ```
147
148 # v0.10.4 (Wed Aug 05 2026)
149
150 #### 🐛 Bug Fix
151
152 - setup.py: Prune imports [#191](https://github.com/citeproc-py/citeproc-py/pull/191) ([@hseg](https://github.com/hseg))
153 - Remove unneeded nonuniversal wheel declaration [#191](https://github.com/citeproc-py/citeproc-py/pull/191) ([@hseg](https://github.com/hseg))
154 - Fix project URL [#191](https://github.com/citeproc-py/citeproc-py/pull/191) ([@hseg](https://github.com/hseg))
155 - Specify license file [#191](https://github.com/citeproc-py/citeproc-py/pull/191) ([@hseg](https://github.com/hseg))
156 - Add missing build dep: lxml [#191](https://github.com/citeproc-py/citeproc-py/pull/191) ([@hseg](https://github.com/hseg))
157 - Use entry points for running scripts [#191](https://github.com/citeproc-py/citeproc-py/pull/191) ([@hseg](https://github.com/hseg))
158 - Use setuptools' builtin multifile longdesc support [#191](https://github.com/citeproc-py/citeproc-py/pull/191) ([@hseg](https://github.com/hseg))
159 - Rely on setuptools' automatic package discovery [#191](https://github.com/citeproc-py/citeproc-py/pull/191) ([@hseg](https://github.com/hseg))
160 - Migrate versioneer to pyproject.toml [#191](https://github.com/citeproc-py/citeproc-py/pull/191) ([@hseg](https://github.com/hseg))
161 - Migrate simple metadata to pyproject.toml [#191](https://github.com/citeproc-py/citeproc-py/pull/191) ([@hseg](https://github.com/hseg))
162
163 #### Authors: 1
164
165 - [@hseg](https://github.com/hseg)
166
167 ---
168
169 # v0.10.3 (Fri Jul 24 2026)
170
171 #### 🐛 Bug Fix
172
173 - swap csl 1.0.1 harvard1 for harvard-cite-them-right [#197](https://github.com/citeproc-py/citeproc-py/pull/197) ([@tmorrell](https://github.com/tmorrell))
174 - tests: add python 3.14 [#199](https://github.com/citeproc-py/citeproc-py/pull/199) ([@tmorrell](https://github.com/tmorrell))
175
176 #### 🔩 Dependency Updates
177
178 - build(deps): bump actions/setup-python from 6 to 7 [#200](https://github.com/citeproc-py/citeproc-py/pull/200) ([@dependabot[bot]](https://github.com/dependabot[bot]))
179
180 #### Authors: 2
181
182 - [@dependabot[bot]](https://github.com/dependabot[bot])
183 - Tom Morrell ([@tmorrell](https://github.com/tmorrell))
184
185 ---
186
187 # v0.10.2 (Tue Jul 21 2026)
188
189 #### 🐛 Bug Fix
190
191 - Additional chicago style page range formats in csl 1.0.2 [#198](https://github.com/citeproc-py/citeproc-py/pull/198) ([@tmorrell](https://github.com/tmorrell))
192
193 #### Authors: 1
194
195 - Tom Morrell ([@tmorrell](https://github.com/tmorrell))
196
197 ---
198
199 # v0.10.1 (Wed Jul 08 2026)
200
201 #### 🐛 Bug Fix
202
203 - Update GitHub Actions for token and Python version [#196](https://github.com/citeproc-py/citeproc-py/pull/196) ([@tmorrell](https://github.com/tmorrell))
204 - Better handle decimals in multiple number regex [#195](https://github.com/citeproc-py/citeproc-py/pull/195) ([@tmorrell](https://github.com/tmorrell))
205 - fix spacing changes in csl 1.0.2 [#195](https://github.com/citeproc-py/citeproc-py/pull/195) ([@tmorrell](https://github.com/tmorrell))
206
207 #### Authors: 1
208
209 - Tom Morrell ([@tmorrell](https://github.com/tmorrell))
210
211 ---
212
213 # v0.10.0 (Tue Jul 07 2026)
214
215 #### 🚀 Enhancement
216
217 - fix: preserve text case for non-english title case [#192](https://github.com/citeproc-py/citeproc-py/pull/192) ([@mairasalazar](https://github.com/mairasalazar))
218 - Upgrade to csl 1.0.2 [#192](https://github.com/citeproc-py/citeproc-py/pull/192) ([@mairasalazar](https://github.com/mairasalazar))
219
220 #### 🔩 Dependency Updates
221
222 - Bump actions/checkout from 6 to 7 [#193](https://github.com/citeproc-py/citeproc-py/pull/193) ([@dependabot[bot]](https://github.com/dependabot[bot]))
223
224 #### Authors: 2
225
226 - [@dependabot[bot]](https://github.com/dependabot[bot])
227 - Maira Salazar ([@mairasalazar](https://github.com/mairasalazar))
228
229 ---
230
231 # v0.9.3 (Thu Apr 30 2026)
232
233 #### 🐛 Bug Fix
234
235 - fix: Et_Al looked up literal term name 'variable' instead of the local variable [#190](https://github.com/citeproc-py/citeproc-py/pull/190) ([@Jasaj4](https://github.com/Jasaj4))
236
237 #### 🔩 Dependency Updates
238
239 - Bump actions/checkout from 4 to 6 [#187](https://github.com/citeproc-py/citeproc-py/pull/187) ([@dependabot[bot]](https://github.com/dependabot[bot]))
240 - Bump actions/setup-python from 5 to 6 [#186](https://github.com/citeproc-py/citeproc-py/pull/186) ([@dependabot[bot]](https://github.com/dependabot[bot]))
241
242 #### Authors: 2
243
244 - [@dependabot[bot]](https://github.com/dependabot[bot])
245 - [@Jasaj4](https://github.com/Jasaj4)
246
247 ---
248
249 # v0.9.2 (Tue Apr 21 2026)
250
251 #### 🐛 Bug Fix
252
253 - setup: add citeproc-py-styles to tests [#189](https://github.com/citeproc-py/citeproc-py/pull/189) ([@tmorrell](https://github.com/tmorrell))
254
255 #### Authors: 1
256
257 - Tom Morrell ([@tmorrell](https://github.com/tmorrell))
258
259 ---
260
261 # v0.9.1 (Mon Apr 20 2026)
262
263 #### 🐛 Bug Fix
264
265 - Add Dependabot configuration for GitHub Actions [#185](https://github.com/citeproc-py/citeproc-py/pull/185) ([@tmorrell](https://github.com/tmorrell))
266 - tests: drop python 3.9 [#179](https://github.com/citeproc-py/citeproc-py/pull/179) ([@tmorrell](https://github.com/tmorrell))
267 - Fix ordinal suffixes when style has embedded locale without ordinal terms [#184](https://github.com/citeproc-py/citeproc-py/pull/184) ([@Copilot](https://github.com/Copilot))
268
269 #### Authors: 2
270
271 - [@Copilot](https://github.com/Copilot)
272 - Tom Morrell ([@tmorrell](https://github.com/tmorrell))
273
274 ---
275
276 # v0.9.0 (Mon Aug 25 2025)
277
278 #### 🚀 Enhancement
279
280 - Feature/flexible style loading [#180](https://github.com/citeproc-py/citeproc-py/pull/180) ([@yarikoptic](https://github.com/yarikoptic))
281
282 #### Authors: 1
283
284 - Yaroslav Halchenko ([@yarikoptic](https://github.com/yarikoptic))
285
286 ---
287
288 # v0.8.3 (Mon Aug 18 2025)
289
290 #### 🐛 Bug Fix
291
292 - setup: match license label with actual text [#175](https://github.com/citeproc-py/citeproc-py/pull/175) ([@tmorrell](https://github.com/tmorrell))
293 - Fix Non-existent Terms [#156](https://github.com/citeproc-py/citeproc-py/pull/156) ([@JVickery-TBS](https://github.com/JVickery-TBS))
294
295 #### 🏠 Internal
296
297 - Remove hardcoded option for auto to onlyPublishWithReleaseLabel [#178](https://github.com/citeproc-py/citeproc-py/pull/178) ([@yarikoptic](https://github.com/yarikoptic))
298 - release action: missing semicolon [#177](https://github.com/citeproc-py/citeproc-py/pull/177) ([@tmorrell](https://github.com/tmorrell))
299 - release action: missing quotes [#176](https://github.com/citeproc-py/citeproc-py/pull/176) ([@tmorrell](https://github.com/tmorrell))
300 - coveralls: try to reenable [#163](https://github.com/citeproc-py/citeproc-py/pull/163) ([@tmorrell](https://github.com/tmorrell))
301
302 #### 📝 Documentation
303
304 - Fix some formatting issues in README [#164](https://github.com/citeproc-py/citeproc-py/pull/164) ([@alexfikl](https://github.com/alexfikl))
305
306 #### Authors: 4
307
308 - Alex Fikl ([@alexfikl](https://github.com/alexfikl))
309 - Jesse Vickery ([@JVickery-TBS](https://github.com/JVickery-TBS))
310 - Tom Morrell ([@tmorrell](https://github.com/tmorrell))
311 - Yaroslav Halchenko ([@yarikoptic](https://github.com/yarikoptic))
312
313 ---
314
315 # v0.8.2 (Wed Mar 12 2025)
316
317 #### 🏠 Internal
318
319 - Explicitly specify utf-8 encoding while reading top level .md files for description [#162](https://github.com/citeproc-py/citeproc-py/pull/162) ([@yarikoptic](https://github.com/yarikoptic))
320 - Instruct that long description is in markdown and not ReST [#160](https://github.com/citeproc-py/citeproc-py/pull/160) ([@yarikoptic](https://github.com/yarikoptic))
321
322 #### Authors: 1
323
324 - Yaroslav Halchenko ([@yarikoptic](https://github.com/yarikoptic))
325
326 ---
327
328 # v0.8.1 (Wed Mar 12 2025)
329
330 #### 🏠 Internal
331
332 - release: checkout with submodules [#159](https://github.com/citeproc-py/citeproc-py/pull/159) ([@yarikoptic](https://github.com/yarikoptic))
333
334 #### Authors: 1
335
336 - Yaroslav Halchenko ([@yarikoptic](https://github.com/yarikoptic))
337
338 ---
339
340 # v0.8.0 (Wed Mar 12 2025)
341
342 #### 🚀 Enhancement
343
344 - release: use GitHUb App token for checkout and push [#158](https://github.com/citeproc-py/citeproc-py/pull/158) ([@tmorrell](https://github.com/tmorrell))
345
346 #### ⚠️ Pushed to `master`
347
348 - Rename CHANGES to CHANGELOG ([@yarikoptic](https://github.com/yarikoptic))
349
350 #### 🏠 Internal
351
352 - release: switch to using GitHub App to overcome branch protection [#157](https://github.com/citeproc-py/citeproc-py/pull/157) ([@tmorrell](https://github.com/tmorrell))
353 - Set up `auto` to automate releases [#153](https://github.com/citeproc-py/citeproc-py/pull/153) ([@jwodder](https://github.com/jwodder) [@yarikoptic](https://github.com/yarikoptic))
354
355 #### 📝 Documentation
356
357 - Convert CHANGES.rst, CONTRIBUTING.rst, and README.md to markdown [#154](https://github.com/citeproc-py/citeproc-py/pull/154) ([@tmorrell](https://github.com/tmorrell))
358
359 #### Authors: 3
360
361 - John T. Wodder II ([@jwodder](https://github.com/jwodder))
362 - Tom Morrell ([@tmorrell](https://github.com/tmorrell))
363 - Yaroslav Halchenko ([@yarikoptic](https://github.com/yarikoptic))
364
365 ---
366
367
368 # Release 0.7.0 (2025-02-19)
369
370 Just to get a release out after long period.
371
372 #### Bug fixes
373
374 * Better handling of ordinals
375 * Fix locator conditions (resolves #142)
376 * Make family name optional
377 * Allow date parts to not be integers
378 * Support space macros
379 * Fix multiple capitals
380 * Fix parsing BibTex integer values
381
382 #### Other changes:
383
384 * Removed support for Python 3.6, 3.7, 3.8 and added for 3.10 - 3.13
385 * Switch versioning to versioneer
386
387
388 # Release 0.6.0 (2021-05-27)
389
390 #### Bug fixes
391
392 * Various issues on Windows: testing, explicit utf-8 encoding
393 * Strings with unescaped \ declared r"aw"
394
395 #### Other changes:
396
397 * Removed support for Python 2.7, 3.5 and added for 3.9
398 * Travis CI is removed in favor of GitHub actions testing across
399 all 3 major OSes (MacOS, Windows, GNU/Linux Ubuntu)
400 * CSL test-suite progressed from 5779a8c to c3db429
401
402
403 # Release 0.5.1 (2020-03-06)
404
405 #### Bug fixed:
406
407 * avoid rnc2rng 2.6.2 which breaks installation of citeproc-py
408
409 # Release 0.5.0 (2020-02-09)
410
411 #### Enhancements:
412
413 * handle commas and ampersands in a functional style
414 * Number: handle commas and ampersands
415 * added symbol for textquotesingle
416 * specify fallback locales for fr-CA and es-CL
417 * improved page number and ranges parsing
418
419 #### Bug fixed:
420
421 * don't fail on empty page ranges (#90) (bbm)
422 * detect end of file while parsing incorrect bib (#59) (John Vandenberg)
423
424 #### Other changes:
425
426 * Removed 3.2-3.4 and added 3.7, 3.8 to supported Pythons
427 * Refactored locales handling
428
429 # Release 0.4.0 (2017-06-23)
430
431 #### New features:
432
433 * allow specifying the encoding of a BibTeX database file (#20 and #25)
434 * BibTeX 'month' field: support integers and "<month> <day>" values
435 * BibTeX 'pages' field: support "10", "10+", "10-12" and "10--12" formats
436 * BibTeX entry types: map the non-standard 'thesis' and 'report' entries
437 * update the CSL schema to version 1.0.1 (#5)
438 * update the CSL locales to commit 49bf3fc0
439
440 #### Bug fixed:
441
442 * avoid crash when there is nothing to affix (David Lesieur)
443 * fix BibTeX month to CSL month mapping (#24)
444 * strip leading/trailing whitespace from BibTeX values (#37)
445
446 # Release 0.3.0 (2014-11-07)
447
448 #### Major improvements to the BibTeX parser:
449
450 * split names into parts and assign them to the equivalent CSL name parts
451 * fixed handling of accent macros and escaped characters
452 * more compatible (La)TeX macro handling in general (but still basic)
453 * handle standard Computer Modern ligatures such as --, ---, and <<
454 * added unit tests for the BibTeX and LaTeX parsers
455
456 #### Other changes:
457
458 * disable RelaxNG validation of CSL styles by default (API change)
459
460 # Release 0.2.0 (2014-10-25)
461
462 * bad cite callback function can determine how a bad cite is displayed (hetsch)
463 * added option to disable RelaxNG validation (Jasper Op de Coul)
464 * distutils was replaced with setuptools (Joshua Carp)
465 * bug fixes (Yaroslav Halchenko, David Lesieur)
466 * CitationStylesBibliography.bibliography() now returns the list of entries