showyourwork / showyourwork

A workflow for reproducible and open scientific articles

Home Page:https://show-your.work

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zotero compatibility / CITATION.cff files

MilesCranmer opened this issue · comments

For users of Zotero, you can give Zotero a link and it will automatically add a paper to your bibliography. It does this using a suite of open-source website translators: https://github.com/zotero/translators/

On GitHub repositories, it will automatically read the CITATION.cff file from the repository: https://github.com/zotero/translators/blob/master/GitHub.js.

However, SYW repos don't automatically have a CITATION.cff file, and a user might forget to create one, or simply not know (likely unless they are well-versed in open-source tools). In this case, Zotero will classify the repository as "software" and link the GitHub repo... which is not optimal.

I think a good solution is to offer to create a CITATION.cff file if it doesn't already exist when a user runs showyourwork setup or showyourwork build. The user could paste their bibtex, or create it interactively. Then, it would be picked up by Zotero and other citation tools.

I wouldn't want to add it during a showyourwork build, but adding it to the cookiecutter template so that it gets added during showyourwork setup could be fine if sensible entries (e.g. author list) can be added at that time. I'd probably prefer to just add it to the docs, but I'm happy to comment on a PR!

Sounds good! 👍