Provides APA7 style for Pybtex
Project description
APA7 Style for Pybtex
This is a fork of naeka's pybtex-apa-style.
Pybtex provides Python support for interacting with bibtex-formatted
bibliography information. Style plugins are required to format a bibliography in a given
style, similar to the role that csl
files play for LaTeX.
This plugin provides APA7 style.
Installation
$ pip install pybtex pybtex-apa7-style
Usage
Pybtex uses Python's plugin system. To use APA7, load it as a plugin.
from pybtex.plugin import find_plugin
from pybtex.database import parse_file
APA = find_plugin('pybtex.style.formatting', 'apa7')()
HTML = find_plugin('pybtex.backends', 'html')()
def bib_to_apa7_html(bibfile):
bibliography = parse_file(bibfile, 'bibtex')
formatted_bib = APA.format_bibliography(bibliography)
return "<br>".join(entry.text.render(HTML) for entry in formatted_bib)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pybtex-apa7-style-0.1.1.tar.gz
.
File metadata
- Download URL: pybtex-apa7-style-0.1.1.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.13 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8dca8198909a5e13ee3e3e0642c7703f43f19ac94cf663ec996f14398ddcf839 |
|
MD5 | 1461cb52e9d58dd2afcc95a46520bf97 |
|
BLAKE2b-256 | 83e363711e659267130f2c388ddfcbcccb3f2d7f939a2f04c31203e210c9249e |
File details
Details for the file pybtex_apa7_style-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pybtex_apa7_style-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.13 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7266fa23c1aaa3a103d92b5c1378499113b1921a62fb380b37d5d700e25e8393 |
|
MD5 | 20d21560eba7b42ef15fc0e2120c2881 |
|
BLAKE2b-256 | 4511ac68de4be3d9f4bd2fd434c456a78a8229aade66c310eb61a427e22a3470 |