Compare commits

...

2 commits

Author SHA1 Message Date
03261a4f9e
docs: Warn of papis 0.14.1 incompatibility 2025-12-04 10:42:04 +01:00
d00e22668e
docs: Add developer info 2025-12-04 10:42:03 +01:00

View file

@ -2,6 +2,9 @@
Formats reference keys in papis similarly to the (zotero plugin) `better-bibtex` keys, in formats such as `Name2008TitleShort`, `Name2008titleshort`, or `Name2008`. Formats reference keys in papis similarly to the (zotero plugin) `better-bibtex` keys, in formats such as `Name2008TitleShort`, `Name2008titleshort`, or `Name2008`.
> [!IMPORTANT]
> In the current state this plugin is _not_ supported by papis v0.14.1 as that version refactors the formatting module. To my knowledge papis v0.14.0 should still be supported.
## Installation ## Installation
<!-- TODO set up pypi repository / explain git install path --> <!-- TODO set up pypi repository / explain git install path -->
@ -164,6 +167,23 @@ default-formatter = jinja2
Can be any of the installed papis formatters, including custom ones Can be any of the installed papis formatters, including custom ones
(though usually it will be `python`, which is also the default setting). (though usually it will be `python`, which is also the default setting).
## For developers
To get started hacking on this little plugin it is easiest to either inject papis into the development environment:
```sh
uv add --dev papis
```
Or, what I do, in turn inject it into your normal papis environment as editable: (`uv tool install --with-editable path/to/this/repo papis`).
Currently I can see two big things to do that would help this project out:
- A way to encode the options directly in the `ref-format` string, such as `ref-format = bbt:Author[1]year[2]TITLE[2, 20]` or something.
- Tests for all the little regex-y things we do. Tests for extracting the author, formatting the title, taking apart dates, and so on.
If you have the motivation to work on one of these let me know!
--- ---
This plugin is a fairly simple adaption from [this](https://github.com/hrdl-github/papis/commit/b9b9c6eaa3de159e1b210174ef49e90a89271eb8) commit, This plugin is a fairly simple adaption from [this](https://github.com/hrdl-github/papis/commit/b9b9c6eaa3de159e1b210174ef49e90a89271eb8) commit,