Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pandoc Lua Filter for live references: Does not find items in non-default library #1647

Closed
visini opened this issue Sep 19, 2020 · 4 comments
Labels

Comments

@visini
Copy link

visini commented Sep 19, 2020

Better BibTeX version: 5.2.68
Zotero version: 5.0.91-beta.3+c5f01bc2f
pandoc --version: pandoc 2.10.1

Report ID: TBACV33E-euc

Exporter used: Pandoc Lua Filter, following instructions from here

Expected behavior:

I'm trying to create a .docx with (live) Zotero references. It works flawlessly with items in my default library ("My Library"). However, it does not work with other (shared) libraries. For that purpose, I've created an empty group called test555 on zotero.org, and added a single reference with citekey markovicNotMissBoat2030 (I've modified the citekey with 2030 to detect if there is a collision between citekeys from my default library and shared library; however, it does not seem to matter).

Then, I'm running the following command:

pandoc -s --lua-filter=zotero.lua --metadata=zotero_scannable_cite:true --metadata=client:jurism --metadata=zotero_library:test555 -o test.docx test.md

  • zotero.lua is cloned from here
  • test.md contains one line: lorem ipsum [@markovicNotMissBoat2030] dolor

Actual behavior:

When I omit --metadata=zotero_library:test555 from the command, and use @markovicNotMissBoat2020 (not 2030, which is located in test555), it works flawlessly (the reference is picked up from my default library). However, when I specify --metadata=zotero_library:test555 (my test library which contains a single reference), it does not seem to do anything except put the content of test.md inside a Word document, with the result looking like this:

Screenshot 2020-09-19 at 17 33 16

Further debugging:

Trying to get the entry from the shared library test555 via curl:

curl 'http://127.0.0.1:23119/better-bibtex/export/item?pandocFilterData=false&translator=json&library=test555&citationKeys=markovicNotMissBoat2030' -X GET -H "Content-Type: application/json"
no items found

Trying to get the entry from the default library (without specifying library query param):

curl 'http://127.0.0.1:23119/better-bibtex/export/item?pandocFilterData=false&translator=json&citationKeys=markovicNotMissBoat2020' -X GET -H "Content-Type: application/json"
{"items":{"markovicNotMissBoat2020":{"id":"markovicNotMissBoat2020","abstract":"abstract here...","accessed":{"date-parts":[[2020,9,19]]},"author":[{"family":"Markovic","given":"Stefan"},{"family":"Bagherzadeh","given":"Mehdi"},{"family":"Dubiel","given":"Anna"},{"family":"Cheng","given":"Jim"},{"family":"Vanhaverbeke","given":"Wim"}],"container-title":"Industrial Marketing Management","container-title-short":"Industrial Marketing Management","DOI":"10.1016/j.indmarman.2020.09.003","ISSN":"0019-8501","issued":{"date-parts":[[2020,11,1]]},"language":"en","page":"152-161","source":"ScienceDirect","title":"Do not miss the boat to outside-in open innovation: Enable your employees","title-short":"Do not miss the boat to outside-in open innovation","type":"article-journal","URL":"http://www.sciencedirect.com/science/article/pii/S0019850120308348","volume":"91"}},"zotero":{"markovicNotMissBoat2020":{"itemID":1211,"uri":"http://zotero.org/users/6901728/items/NX559BE8"}},"errors":{}}

I'm ready to assist in debugging this. Many thanks for your help!

@visini visini added the bug label Sep 19, 2020
@retorquere
Copy link
Owner

I've found the problem. I'm going to have to puzzle a bit for a fix.

@blip-bloop
Copy link
Collaborator

🤖 this is your friendly neighborhood build bot announcing test build 5.2.71.7171 ("fixed #1647")

Install in Zotero by downloading test build 5.2.71.7171, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

@visini
Copy link
Author

visini commented Sep 21, 2020

test build 5.2.71.7171 ("fixed #1647")

I can confirm that it's working as expected now. Many thanks for your stellar work on BBT!

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants