Zotero-better-bibtex: Exact matches for search queries using item.search

Created on 1 May 2020  ·  7Comments  ·  Source: retorquere/zotero-better-bibtex

I am working on a CLI to access and manage Zotero items and am relying on BBT's advanced citekey generation and endpoints to access underlying data.

Currently, I am relying on the item.search endpoint to retrieve items by their citekeys. However, let's say, I am searching for citekey2010. I could be retrieving multiple items if there are also citekey2010a and citkey2010b in my library which is also the desired behaviour.

I was wondering, if an exact query paramater would be possible/desired or maybe even a more restricted item.search_citekey option that only looks at the citekeys + matches the search terms exactly.

I can work around this issue by providing a dynamic CLI interface to the end-user, however, I think that there is a definitive use case for exact queries as the user will often know which item they are looking for and simply want to retrieve metadata.

tl;dr:

  • Would an exact match option be feasible for item.search?
  • What about an item.query_citekey endpoint that is meant to retrieve individual items by strict matching of citekeys?
question

All 7 comments

You can do that with items.export([<list of citekeys>], 'jzon'). You can get all export formats this way; jzon is shorthand for BBT JSON.

That's not yet in the last release, there's a few issues I want to finish off and then I'm cutting a new release.

Oh sweet. Hadn't seen the recent additions. Amazing!

Are you planning to include all the recent additions to the JSON-RPC endpoint in the 5.2.22 release?

Yep.

Is there anyone already testing builds for items.export? If not feel free to tag me here.

I've just pushed out the release.

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings