Create a brew cite foo command that returns an URL (or optionally Bibtex) for the requested tool and its dependencies.
Usage
❯❯❯ brew cite samtools
http://doi.org/10.1093/bioinformatics/btp352
❯❯❯ brew cite --bib samtools
@article{Li_2009, title={The Sequence Alignment/Map format and SAMtools}, volume={25}, ISSN={1460-2059}, url={http://dx.doi.org/10.1093/bioinformatics/btp352}, DOI={10.1093/bioinformatics/btp352}, number={16}, journal={Bioinformatics}, publisher={Oxford University Press (OUP)}, author={Li, H. and Handsaker, B. and Wysoker, A. and Fennell, T. and Ruan, J. and Homer, N. and Marth, G. and Abecasis, G. and Durbin, R.}, year={2009}, month={Jun}, pages={2078–2079}}
Options
-b or --bib return Bibtex entries rather than an URLs
-1 return only the requested formulae and not their dependencies
Implementation
The code and data lives in a GitHub repository linuxbrew/homebrew-cite.
The data will be stored in a TSV file in the same repository with two columns, Formula and Citation.
The --bib option uses the doi.org service to fetch the Bibtex entry. For example:
Create a
brew cite foo
command that returns an URL (or optionally Bibtex) for the requested tool and its dependencies.Usage
Options
-b
or--bib
return Bibtex entries rather than an URLs-1
return only the requested formulae and not their dependenciesImplementation
linuxbrew/homebrew-cite
.Formula
andCitation
.--bib
option uses thedoi.org
service to fetch the Bibtex entry. For example:brew desc
command that was eventually migrated intoHomebrew/brew
. https://github.com/telemachus/homebrew-desc/blob/master/cmd/brew-desc.rb