Closed maelle closed 2 years ago
our mendeley pkg is no more https://github.com/ropensci/RMendeley#rmendeley - but maybe its just a bit of code needed anyway
cc @cboettig
iirc the API support from Mendeley was too poor to make the package really useful; but in any event the package and the API were more geared towards searching the online mendeley database than supporting local citation use.
I'm not quite sure how this would work -- but Mendeley will already automatically maintain a library of *.bib files, so presumably you could just point citr
to those .bib
files? (note that in practice I've found pandoc/citeproc gets impossibly slow if the bib file is huge, e.g. if your whole Mendeley collection is in one or a few bib files). What would be the advantage of tapping the Mendeley database instead of these bib files? The Mendeley database is just a SQLite database anyway, so I suppose one could write a wrapper around RSQLite to tap that data?
p.s. thanks for pointing me to citr
, hadn't seen that; looks cool. One other nice thing about being *.bib
based is that it is more portable; e.g. collaborators can check out a repo with the .Rmd
and .bib
file without being Mendeley users or needing your Mendeley database. (I do find Mendeley convenient for generating *.bib files in the first place, though other tools like zotero do this equally well I think)
I agree that having a .bib
file is more portable, but the use case I had in mind where people whose co-authors would probably not try to knit the RMarkdown file themselves (not optimal but if you get the 1st authors to change tools at some point everyone could have switched?).
I think I need to play more with Mendeley and I also need to test the current citr
add-in on Word users and see how much a hassle they think it is. Word+Mendeley=install a plug-in. RMarkdown+Mendeley=install a plug-in + create a .bib containing the entire collection of articles like this or a .bib with a subset only but which won't be be updated if the Mendeley database changes. If I follow you correctly if the .bib is huge knitting is slow so maybe having something that communicates with the Mendeley database + creates a .bib for the manuscript like knitcitation
would be both easier and faster? Of course one needs to add the line of code for the creation of the bibliography but this could be included in an RMarkdown template like the ones in this package.
You're welcome about citr
, on the rOpenSci Slack I was pointed to knitcitation
which I started using. 👌
and thanks to both @sckott + @cboettig for your answers!
Hi @masalmon, I used to maintain the RMendeley package that Scott mentioned. It worked well for a while but I had to deprecate it because of significant API changes that just made it hard to keep up. However, as @cboettig mentioned, it was geared more towards the database rather than citation use. Note that it could be adapted for citation use if the API is now stable (I haven't looked at it in a couple of years) because one could auth into their account, load a folder, and then immediately have access to all citations in that particular document.
But @cboettig's suggestion is what I would recommend too. Back in the day (I stopped using Mendeley after their Elsevier acquisition), I set up Mendeley to auto export all folders to bib files on a local folder. My project makefile copied that bib to my git repo on each build right before knitting.
@karthik thanks! Is it slow to knit if you've got only one big .bib file?
Maybe I can use this Elsevier argument 😉
thanks! Is it slow to knit if you've got only one big .bib file?
It is. So that's why I export on per manuscript basis rather than whole library or really large collections.
I just made some updates to the rcrossref addin. I guess it somehow solved this issue (maybe?). People can use this rcrossref addin to search and build .bib file and use citr
to import and add to rmarkdown. As I said in the PR, any feedbacks are appreciated. :D 🚀
PR: https://github.com/ropensci/rcrossref/pull/171
Mendeley integration would be great. I think the best way currently is to make a folder of just the articles you are citing for a particular manuscript, and then you can export that particular folder .bib files as one file rather than exporting the whole .bib file. It's a two step process but relatively simple in Mendeley.
Thank you!
Note that future ideas should go to our wishlist forum category.
The package would have an add-in for RStudio that would mimick https://github.com/crsh/citr but querying directly the Mendeley database, not a .bib. This would be a RStudio version of the Mendeley Word add-in.
Related software that help getting a citation in RMarkdown are:
the aforementioned
citr
knitcitations
the add-in in rcrossref
but for the two latter ones you need the DOI.
I'm not 100% sure such an add-in would be super useful but the target audience I'm thinking of are people who currently use Word for writing their manuscripts and are used to using the Mendeley add-in. Copy-pasting DOI / having a .bib even synchronized with the Mendeley database adds a step which might make their RMarkdown experience less enjoyable or even not enjoyable enough to start using RMarkdown?
I am only suggesting the idea.