paleolimbot / rbbt

R Interface to the Better BiBTex Zotero Connector
142 stars 25 forks source link

Expose .action in bbt_write_bib() #20

Closed dmi3kno closed 3 years ago

dmi3kno commented 3 years ago

I want to be able to "intercept" bib entries fetched from Zotero and edit them before they get written to .bib file in reproducible way. Could we, please, expose .action argument to allow users write their own wrappers around bib_return() to modify bib entries in sustainable/reproducible fashion? I asked {bibtex} maintainers to enable parsing of entries into bibentry format here.

P.S. My particular usecase is some crazy Journal Name Abbreviation requirements for this particular publication, which Zotero does not support, but I could write a simple script in R to do on the fly. This has a potential of enabling "Zotero filters" in R, which, although do not modify Zotero database directly, could allow scripting some important post-processing steps for bibliographies.

paleolimbot commented 3 years ago

Great idea! I will add shortly.

paleolimbot commented 3 years ago

I'm calling it filter in bbt_write_bib(), but you should be good to go!

dmi3kno commented 3 years ago

Brilliant. Pushing some more changes in RefManageR to make this a reality.

Did you know that {rbbt} can be used in xaringan (i.e. without pandoc)? Today I am citing with `r cp("@kear2005DucksGeeseSwans")` where cp() is my thin wrapper over RefManageR::Citep() to produce proper reference in text.