retorquere / zotero-better-bibtex

Make Zotero effective for us LaTeX holdouts
https://retorque.re/zotero-better-bibtex/
MIT License
5.21k stars 285 forks source link

Cannot ignore "archivePrefix" export field #1744

Closed talesa closed 3 years ago

talesa commented 3 years ago

Hello! Firstly, thanks for this amazing piece of software!

The problem: I cannot get Better Bibtex to ignore "archivePrefix" export field despite adding it (with different capitalization) to the "Fields to omit from export" field in the export settings. image

Report ID: IR9LXNSF-euc

Exporter used: "Copy as Better Bibtex" cmd+shift+c

Expected behavior:

@article{brekelmans2020All,
  title = {All in the {{Exponential Family}}: {{Bregman Duality}} in {{Thermodynamic Variational Inference}}},
  author = {Brekelmans, Rob and Masrani, Vaden and Wood, Frank and Steeg, Greg Ver and Galstyan, Aram},
  year = {2020},
  journal = {ICML}
}

Actual behavior:

@article{brekelmans2020All,
  title = {All in the {{Exponential Family}}: {{Bregman Duality}} in {{Thermodynamic Variational Inference}}},
  author = {Brekelmans, Rob and Masrani, Vaden and Wood, Frank and Steeg, Greg Ver and Galstyan, Aram},
  year = {2020},
  archivePrefix = {arXiv},
  journal = {ICML}
}

Best wishes, Adam

github-actions[bot] commented 3 years ago

:robot: this is your friendly neighborhood build bot announcing test build 5.2.120.415 ("fixes #1744")

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

talesa commented 3 years ago

Dear @retorquere, you are absolutely amazing, never saw such a responsive author before, thank you so much!

retorquere commented 3 years ago

You're welcome. Does it work for you? I've added IR9LXNSF-euc as a case in my test suite, so it should, but I always prefer to actually know it's fixed for you.

talesa commented 3 years ago

Yes, I confirm it works perfectly!

retorquere commented 3 years ago

Cool, I'll merge it in a new release. You can just keep this or force-upgrade when it drops in about 10 minutes (the full test suite must pass again), you'll be upgraded automatically when Zotero checks for new plugin releases. The new version is just what you have with a new version number slapped on.

retorquere commented 3 years ago

skip-fields should be case insensitive, but it does so by lower-casing the skip-fields input on the assumption that BBT adds all fields in lowercase, which it did, except for archivePrefix and primaryClass, meaning it was always impossible to match those. These are now added in lowercase, and I've added an extra check to make sure I cannot add fields that are not all-lowercase, so it should not occur again, because my tests will fail, and I can't release official or test builds when any test fails. Keeps me honest.