Debian Codegraph @

PKG-INFO

raw
1 Metadata-Version: 2.4
2 Name: citeproc-py
3 Version: 0.11.1
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 Requires-Dist: tox; extra == "tests"
41 Dynamic: license-file
42
43 # citeproc-py
44
45 [![PyPI - Version](https://img.shields.io/pypi/v/citeproc-py)](https://pypi.org/project/citeproc-py/)
46 [![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)
47 [![Coveralls](https://img.shields.io/coverallsCoverage/github/citeproc-py/citeproc-py)](https://coveralls.io/github/citeproc-py/citeproc-py)
48
49
50 citeproc-py is a [CSL](https://citationstyles.org/) processor for Python. It aims to implement the
51 [CSL 1.0.2 specification](https://docs.citationstyles.org/en/v1.0.2/specification.html).
52 citeproc-py can output styled citations and
53 bibliographies in a number of different output formats. Currently
54 supported are plain text, reStructuredText and HTML. Other formats can
55 be added easily.
56
57 citeproc-py uses [semantic versioning](https://semver.org/). Currently, its major version
58 number is still at 0, meaning the API is not yet stable. However, you
59 should not expect to see any major API changes soon.
60
61 ## Requirements
62
63 citeproc-py supports Python 3.9 and up. It depends on [lxml](https://lxml.de/) for parsing and
64 navigating the CSL style and locale files.
65
66 # Installation
67
68 The recommended way of installing citeproc-py is by using
69 [pip](https://pip.pypa.io/en/latest/):
70 ```bash
71 pip install citeproc-py
72 ```
73
74 If `lxml` isn't installed, `pip` will try to install it for you.
75
76 If you insist, you can manually install citeproc-py from distribution packages
77 hosted at [PyPI](https://pypi.python.org/pypi/citeproc-py/). Please ignore the release archives offered by GitHub.
78
79 ## Getting Started
80
81 To get started with citeproc-py, take a look at the examples under
82 `examples/`. Two examples are provided, one parsing references from a
83 JSON representation of references as supported by citeproc-js, another
84 parsing the references from a BibTeX file. Both show and explain how to
85 cite references and render the bibliography.
86
87 ## CSL Compatibility
88
89 Currently, citeproc-py passes about 60% of the tests in the
90 [citeproc-test suite](https://github.com/citation-style-language/test-suite).
91 A non-exhaustive list of functionality that is missing includes:
92
93 - disambiguation/year-suffix
94 - et-al-subsequent-min/et-al-subsequent-use-first
95 - collapsing
96 - punctuation-in-quote
97 - display
98
99 Also, some [citeproc-js](https://github.com/juris-m/citeproc-js)
100 functionality that is not part of the CSL spec is not (yet) supported:
101
102 - raw dates
103 - static-ordering
104 - literal names
105
106 ## Contributing
107
108 citeproc-py is 100% volunteer maintained, and new contributions are always welcome.
109 If you would like to contribute, please follow the guidelines in the
110 [CONTRIBUTING.md](https://github.com/citeproc-py/citeproc-py/blob/master/CONTRIBUTING.md) file.
111
112 ## Local Install and Running the Tests
113
114 First clone the `citeproc-py` repository and install the submodules with
115 ```bash
116 git submodule update --init
117 ```
118
119 Then install with
120 ```bash
121 pip install --editable .[tests]
122 ```
123
124 You can run all the tests using tox:
125 ```bash
126 tox run -e py314
127 ```
128
129 Or you can manually run citeproc-test tests using
130 ```bash
131 python tests/citeproc-test.py
132 ```
133
134 The first time
135 you run the script it will clone the
136 [citeproc-test suite](https://github.com/citation-style-language/test-suite) repository into the
137 `tests` directory and checkout the last tested version. By default failed tests are
138 automatically added into the `failing_tests.txt` file and aren't shown when
139 running the test suite again.
140
141 If you want git to fully ignore the submodule, you can type
142 ```bash
143 git update-index --assume-unchanged citeproc/data/schema
144 ```
145
146 # v0.11.1 (Tue Sep 01 2026)
147
148 #### πŸ› Bug Fix
149
150 - Contributing: update contributing guidelines [#214](https://github.com/citeproc-py/citeproc-py/pull/214) ([@tmorrell](https://github.com/tmorrell))
151 - coverage: ignore _version.py [#214](https://github.com/citeproc-py/citeproc-py/pull/214) ([@tmorrell](https://github.com/tmorrell))
152 - tests: recommend tox and modernize coveralls setup [#214](https://github.com/citeproc-py/citeproc-py/pull/214) ([@tmorrell](https://github.com/tmorrell))
153
154 #### 🏠 Internal
155
156 - tests: remove global, ancient python code, and deprecated load_module [#213](https://github.com/citeproc-py/citeproc-py/pull/213) ([@tmorrell](https://github.com/tmorrell))
157
158 #### Authors: 1
159
160 - Tom Morrell ([@tmorrell](https://github.com/tmorrell))
161
162 ---
163
164 # v0.11.0 (Thu Aug 20 2026)
165
166 #### πŸš€ Enhancement
167
168 - test: refresh citeproc seam expectations [#208](https://github.com/citeproc-py/citeproc-py/pull/208) ([@tomatotomata](https://github.com/tomatotomata))
169 - fix: normalize punctuation at formatter seams [#208](https://github.com/citeproc-py/citeproc-py/pull/208) ([@tomatotomata](https://github.com/tomatotomata))
170 - Update compatability description [#208](https://github.com/citeproc-py/citeproc-py/pull/208) ([@tmorrell](https://github.com/tmorrell))
171 - Normalize whitespace and duplicate punctuation at string seams [#208](https://github.com/citeproc-py/citeproc-py/pull/208) ([@tmorrell](https://github.com/tmorrell))
172
173 #### Authors: 2
174
175 - Tom Morrell ([@tmorrell](https://github.com/tmorrell))
176 - tomatotomata ([@tomatotomata](https://github.com/tomatotomata))
177
178 ---
179
180 # v0.10.7 (Mon Aug 10 2026)
181
182 #### πŸ› Bug Fix
183
184 - fix default delimiter [#201](https://github.com/citeproc-py/citeproc-py/pull/201) ([@tmorrell](https://github.com/tmorrell))
185
186 #### Authors: 1
187
188 - Tom Morrell ([@tmorrell](https://github.com/tmorrell))
189
190 ---
191
192 # v0.10.6 (Mon Aug 10 2026)
193
194 #### πŸ› Bug Fix
195
196 - Count citation-number as a variable call in cs:group [#206](https://github.com/citeproc-py/citeproc-py/pull/206) ([@eseifert](https://github.com/eseifert))
197
198 #### Authors: 1
199
200 - Erich Seifert ([@eseifert](https://github.com/eseifert))
201
202 ---
203
204 # v0.10.5 (Mon Aug 10 2026)
205
206 #### πŸ› Bug Fix
207
208 - fix(model): add defensive check in get_locale_option() for Locale roots [#209](https://github.com/citeproc-py/citeproc-py/pull/209) ([@kyodai0000](https://github.com/kyodai0000))
209
210 #### Authors: 1
211
212 - OndΕ™ej Ruml ([@kyodai0000](https://github.com/kyodai0000))
213
214 ---
215
216 # v0.10.4 (Wed Aug 05 2026)
217
218 #### πŸ› Bug Fix
219
220 - setup.py: Prune imports [#191](https://github.com/citeproc-py/citeproc-py/pull/191) ([@hseg](https://github.com/hseg))
221 - Remove unneeded nonuniversal wheel declaration [#191](https://github.com/citeproc-py/citeproc-py/pull/191) ([@hseg](https://github.com/hseg))
222 - Fix project URL [#191](https://github.com/citeproc-py/citeproc-py/pull/191) ([@hseg](https://github.com/hseg))
223 - Specify license file [#191](https://github.com/citeproc-py/citeproc-py/pull/191) ([@hseg](https://github.com/hseg))
224 - Add missing build dep: lxml [#191](https://github.com/citeproc-py/citeproc-py/pull/191) ([@hseg](https://github.com/hseg))
225 - Use entry points for running scripts [#191](https://github.com/citeproc-py/citeproc-py/pull/191) ([@hseg](https://github.com/hseg))
226 - Use setuptools' builtin multifile longdesc support [#191](https://github.com/citeproc-py/citeproc-py/pull/191) ([@hseg](https://github.com/hseg))
227 - Rely on setuptools' automatic package discovery [#191](https://github.com/citeproc-py/citeproc-py/pull/191) ([@hseg](https://github.com/hseg))
228 - Migrate versioneer to pyproject.toml [#191](https://github.com/citeproc-py/citeproc-py/pull/191) ([@hseg](https://github.com/hseg))
229 - Migrate simple metadata to pyproject.toml [#191](https://github.com/citeproc-py/citeproc-py/pull/191) ([@hseg](https://github.com/hseg))
230
231 #### Authors: 1
232
233 - [@hseg](https://github.com/hseg)
234
235 ---
236
237 # v0.10.3 (Fri Jul 24 2026)
238
239 #### πŸ› Bug Fix
240
241 - 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))
242 - tests: add python 3.14 [#199](https://github.com/citeproc-py/citeproc-py/pull/199) ([@tmorrell](https://github.com/tmorrell))
243
244 #### πŸ”© Dependency Updates
245
246 - 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]))
247
248 #### Authors: 2
249
250 - [@dependabot[bot]](https://github.com/dependabot[bot])
251 - Tom Morrell ([@tmorrell](https://github.com/tmorrell))
252
253 ---
254
255 # v0.10.2 (Tue Jul 21 2026)
256
257 #### πŸ› Bug Fix
258
259 - 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))
260
261 #### Authors: 1
262
263 - Tom Morrell ([@tmorrell](https://github.com/tmorrell))
264
265 ---
266
267 # v0.10.1 (Wed Jul 08 2026)
268
269 #### πŸ› Bug Fix
270
271 - Update GitHub Actions for token and Python version [#196](https://github.com/citeproc-py/citeproc-py/pull/196) ([@tmorrell](https://github.com/tmorrell))
272 - Better handle decimals in multiple number regex [#195](https://github.com/citeproc-py/citeproc-py/pull/195) ([@tmorrell](https://github.com/tmorrell))
273 - fix spacing changes in csl 1.0.2 [#195](https://github.com/citeproc-py/citeproc-py/pull/195) ([@tmorrell](https://github.com/tmorrell))
274
275 #### Authors: 1
276
277 - Tom Morrell ([@tmorrell](https://github.com/tmorrell))
278
279 ---
280
281 # v0.10.0 (Tue Jul 07 2026)
282
283 #### πŸš€ Enhancement
284
285 - fix: preserve text case for non-english title case [#192](https://github.com/citeproc-py/citeproc-py/pull/192) ([@mairasalazar](https://github.com/mairasalazar))
286 - Upgrade to csl 1.0.2 [#192](https://github.com/citeproc-py/citeproc-py/pull/192) ([@mairasalazar](https://github.com/mairasalazar))
287
288 #### πŸ”© Dependency Updates
289
290 - Bump actions/checkout from 6 to 7 [#193](https://github.com/citeproc-py/citeproc-py/pull/193) ([@dependabot[bot]](https://github.com/dependabot[bot]))
291
292 #### Authors: 2
293
294 - [@dependabot[bot]](https://github.com/dependabot[bot])
295 - Maira Salazar ([@mairasalazar](https://github.com/mairasalazar))
296
297 ---
298
299 # v0.9.3 (Thu Apr 30 2026)
300
301 #### πŸ› Bug Fix
302
303 - 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))
304
305 #### πŸ”© Dependency Updates
306
307 - Bump actions/checkout from 4 to 6 [#187](https://github.com/citeproc-py/citeproc-py/pull/187) ([@dependabot[bot]](https://github.com/dependabot[bot]))
308 - 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]))
309
310 #### Authors: 2
311
312 - [@dependabot[bot]](https://github.com/dependabot[bot])
313 - [@Jasaj4](https://github.com/Jasaj4)
314
315 ---
316
317 # v0.9.2 (Tue Apr 21 2026)
318
319 #### πŸ› Bug Fix
320
321 - setup: add citeproc-py-styles to tests [#189](https://github.com/citeproc-py/citeproc-py/pull/189) ([@tmorrell](https://github.com/tmorrell))
322
323 #### Authors: 1
324
325 - Tom Morrell ([@tmorrell](https://github.com/tmorrell))
326
327 ---
328
329 # v0.9.1 (Mon Apr 20 2026)
330
331 #### πŸ› Bug Fix
332
333 - Add Dependabot configuration for GitHub Actions [#185](https://github.com/citeproc-py/citeproc-py/pull/185) ([@tmorrell](https://github.com/tmorrell))
334 - tests: drop python 3.9 [#179](https://github.com/citeproc-py/citeproc-py/pull/179) ([@tmorrell](https://github.com/tmorrell))
335 - 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))
336
337 #### Authors: 2
338
339 - [@Copilot](https://github.com/Copilot)
340 - Tom Morrell ([@tmorrell](https://github.com/tmorrell))
341
342 ---
343
344 # v0.9.0 (Mon Aug 25 2025)
345
346 #### πŸš€ Enhancement
347
348 - Feature/flexible style loading [#180](https://github.com/citeproc-py/citeproc-py/pull/180) ([@yarikoptic](https://github.com/yarikoptic))
349
350 #### Authors: 1
351
352 - Yaroslav Halchenko ([@yarikoptic](https://github.com/yarikoptic))
353
354 ---
355
356 # v0.8.3 (Mon Aug 18 2025)
357
358 #### πŸ› Bug Fix
359
360 - setup: match license label with actual text [#175](https://github.com/citeproc-py/citeproc-py/pull/175) ([@tmorrell](https://github.com/tmorrell))
361 - Fix Non-existent Terms [#156](https://github.com/citeproc-py/citeproc-py/pull/156) ([@JVickery-TBS](https://github.com/JVickery-TBS))
362
363 #### 🏠 Internal
364
365 - Remove hardcoded option for auto to onlyPublishWithReleaseLabel [#178](https://github.com/citeproc-py/citeproc-py/pull/178) ([@yarikoptic](https://github.com/yarikoptic))
366 - release action: missing semicolon [#177](https://github.com/citeproc-py/citeproc-py/pull/177) ([@tmorrell](https://github.com/tmorrell))
367 - release action: missing quotes [#176](https://github.com/citeproc-py/citeproc-py/pull/176) ([@tmorrell](https://github.com/tmorrell))
368 - coveralls: try to reenable [#163](https://github.com/citeproc-py/citeproc-py/pull/163) ([@tmorrell](https://github.com/tmorrell))
369
370 #### πŸ“ Documentation
371
372 - Fix some formatting issues in README [#164](https://github.com/citeproc-py/citeproc-py/pull/164) ([@alexfikl](https://github.com/alexfikl))
373
374 #### Authors: 4
375
376 - Alex Fikl ([@alexfikl](https://github.com/alexfikl))
377 - Jesse Vickery ([@JVickery-TBS](https://github.com/JVickery-TBS))
378 - Tom Morrell ([@tmorrell](https://github.com/tmorrell))
379 - Yaroslav Halchenko ([@yarikoptic](https://github.com/yarikoptic))
380
381 ---
382
383 # v0.8.2 (Wed Mar 12 2025)
384
385 #### 🏠 Internal
386
387 - 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))
388 - 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))
389
390 #### Authors: 1
391
392 - Yaroslav Halchenko ([@yarikoptic](https://github.com/yarikoptic))
393
394 ---
395
396 # v0.8.1 (Wed Mar 12 2025)
397
398 #### 🏠 Internal
399
400 - release: checkout with submodules [#159](https://github.com/citeproc-py/citeproc-py/pull/159) ([@yarikoptic](https://github.com/yarikoptic))
401
402 #### Authors: 1
403
404 - Yaroslav Halchenko ([@yarikoptic](https://github.com/yarikoptic))
405
406 ---
407
408 # v0.8.0 (Wed Mar 12 2025)
409
410 #### πŸš€ Enhancement
411
412 - release: use GitHUb App token for checkout and push [#158](https://github.com/citeproc-py/citeproc-py/pull/158) ([@tmorrell](https://github.com/tmorrell))
413
414 #### ⚠️ Pushed to `master`
415
416 - Rename CHANGES to CHANGELOG ([@yarikoptic](https://github.com/yarikoptic))
417
418 #### 🏠 Internal
419
420 - 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))
421 - 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))
422
423 #### πŸ“ Documentation
424
425 - 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))
426
427 #### Authors: 3
428
429 - John T. Wodder II ([@jwodder](https://github.com/jwodder))
430 - Tom Morrell ([@tmorrell](https://github.com/tmorrell))
431 - Yaroslav Halchenko ([@yarikoptic](https://github.com/yarikoptic))
432
433 ---
434
435
436 # Release 0.7.0 (2025-02-19)
437
438 Just to get a release out after long period.
439
440 #### Bug fixes
441
442 * Better handling of ordinals
443 * Fix locator conditions (resolves #142)
444 * Make family name optional
445 * Allow date parts to not be integers
446 * Support space macros
447 * Fix multiple capitals
448 * Fix parsing BibTex integer values
449
450 #### Other changes:
451
452 * Removed support for Python 3.6, 3.7, 3.8 and added for 3.10 - 3.13
453 * Switch versioning to versioneer
454
455
456 # Release 0.6.0 (2021-05-27)
457
458 #### Bug fixes
459
460 * Various issues on Windows: testing, explicit utf-8 encoding
461 * Strings with unescaped \ declared r"aw"
462
463 #### Other changes:
464
465 * Removed support for Python 2.7, 3.5 and added for 3.9
466 * Travis CI is removed in favor of GitHub actions testing across
467 all 3 major OSes (MacOS, Windows, GNU/Linux Ubuntu)
468 * CSL test-suite progressed from 5779a8c to c3db429
469
470
471 # Release 0.5.1 (2020-03-06)
472
473 #### Bug fixed:
474
475 * avoid rnc2rng 2.6.2 which breaks installation of citeproc-py
476
477 # Release 0.5.0 (2020-02-09)
478
479 #### Enhancements:
480
481 * handle commas and ampersands in a functional style
482 * Number: handle commas and ampersands
483 * added symbol for textquotesingle
484 * specify fallback locales for fr-CA and es-CL
485 * improved page number and ranges parsing
486
487 #### Bug fixed:
488
489 * don't fail on empty page ranges (#90) (bbm)
490 * detect end of file while parsing incorrect bib (#59) (John Vandenberg)
491
492 #### Other changes:
493
494 * Removed 3.2-3.4 and added 3.7, 3.8 to supported Pythons
495 * Refactored locales handling
496
497 # Release 0.4.0 (2017-06-23)
498
499 #### New features:
500
501 * allow specifying the encoding of a BibTeX database file (#20 and #25)
502 * BibTeX 'month' field: support integers and "<month> <day>" values
503 * BibTeX 'pages' field: support "10", "10+", "10-12" and "10--12" formats
504 * BibTeX entry types: map the non-standard 'thesis' and 'report' entries
505 * update the CSL schema to version 1.0.1 (#5)
506 * update the CSL locales to commit 49bf3fc0
507
508 #### Bug fixed:
509
510 * avoid crash when there is nothing to affix (David Lesieur)
511 * fix BibTeX month to CSL month mapping (#24)
512 * strip leading/trailing whitespace from BibTeX values (#37)
513
514 # Release 0.3.0 (2014-11-07)
515
516 #### Major improvements to the BibTeX parser:
517
518 * split names into parts and assign them to the equivalent CSL name parts
519 * fixed handling of accent macros and escaped characters
520 * more compatible (La)TeX macro handling in general (but still basic)
521 * handle standard Computer Modern ligatures such as --, ---, and <<
522 * added unit tests for the BibTeX and LaTeX parsers
523
524 #### Other changes:
525
526 * disable RelaxNG validation of CSL styles by default (API change)
527
528 # Release 0.2.0 (2014-10-25)
529
530 * bad cite callback function can determine how a bad cite is displayed (hetsch)
531 * added option to disable RelaxNG validation (Jasper Op de Coul)
532 * distutils was replaced with setuptools (Joshua Carp)
533 * bug fixes (Yaroslav Halchenko, David Lesieur)
534 * CitationStylesBibliography.bibliography() now returns the list of entries