{"id":26364604,"url":"https://github.com/speciesfilegroup/ref2bibtex","last_synced_at":"2025-10-14T12:51:57.112Z","repository":{"id":21126211,"uuid":"24427088","full_name":"SpeciesFileGroup/ref2bibtex","owner":"SpeciesFileGroup","description":"An (almost) single purpose gem wrapping Crossref's API.  Pass it a full reference string, get back BibTeX.","archived":false,"fork":false,"pushed_at":"2019-03-05T22:14:34.000Z","size":27,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-09T19:56:47.118Z","etag":null,"topics":["api","bibtex","crossref","doi","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SpeciesFileGroup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-24T18:22:09.000Z","updated_at":"2019-03-05T22:14:33.000Z","dependencies_parsed_at":"2022-08-26T23:21:26.912Z","dependency_job_id":null,"html_url":"https://github.com/SpeciesFileGroup/ref2bibtex","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/SpeciesFileGroup/ref2bibtex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpeciesFileGroup%2Fref2bibtex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpeciesFileGroup%2Fref2bibtex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpeciesFileGroup%2Fref2bibtex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpeciesFileGroup%2Fref2bibtex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpeciesFileGroup","download_url":"https://codeload.github.com/SpeciesFileGroup/ref2bibtex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpeciesFileGroup%2Fref2bibtex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018577,"owners_count":26086580,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","bibtex","crossref","doi","ruby"],"created_at":"2025-03-16T19:22:01.682Z","updated_at":"2025-10-14T12:51:57.095Z","avatar_url":"https://github.com/SpeciesFileGroup.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/SpeciesFileGroup/ref2bibtex.svg?branch=master)](https://travis-ci.org/SpeciesFileGroup/ref2bibtex)\n\n# ref2bibtex\n\nAn (almost) single purpose gem wrapping Crossref's API.  Pass it a full reference string, get back BibTeX.  Pass it a DOI, get BibTeX.  Want something more complex? See [serrano](https://github.com/sckott/serrano).\n\n# usage\n\nBe polite (https://github.com/CrossRef/rest-api-doc#etiquette).  Provide a email as per CrossRef recommendations. Do this by:\n\n1) Add it to the file `~/.ref2bibtex_user_email`.\n\n2) Add it to the file .env in the root of your application:\n\n    `REF2BIBTEX_USER_EMAIL=user@example.com`\n\n3) Set `REF2BIBTEX_USER_EMAIL` in your shell profile.\n\nIf the email is set in multiple places priority is reverse order listed here.\n\nUse citation2bibtex (aliased _get_):\n\n```ruby\n\n gem install ref2bibtex\n\n require 'ref2bibtex' \n\n Ref2bibtex.get('Yoder, M. J., A. A. Valerio, A. Polaszek, L. Masner, and N. F. Johnson. 2009. Revision of Scelio pulchripennis - group species (Hymenoptera, Platygastroidea, Platygastridae). ZooKeys 20:53-118.') # =\u003e \"@article{Yoder_2009,\\n\\tdoi = {10.3897/zookeys.20.205},\\n\\turl = {http://dx.doi.org/10.3897/zookeys.20.205},\\n\\tyear = 2009,\\n\\tmonth = {sep},\\n\\tpublisher = {Pensoft Publishers},\\n\\tvolume = {20},\\n\\tnumber = {0},\\n\\tauthor = {Matthew Yoder and Andrew Polaszek and Lubomir Masner and Norman Johnson and Alejandro Valerio},\\n\\ttitle = {Revision of Scelio pulchripennis - group species (Hymenoptera, Platygastroidea, Platygastridae)},\\n\\tjournal = {{ZOOKEYS}}\\n}\"\n\n```\n\nIf you want the doi:\n\n```ruby\n\n   Ref2bibtex.get_doi('Yoder, M. J., A. A. Valerio, A. Polaszek, L. Masner, and N. F. Johnson. 2009. Revision of Scelio pulchripennis - group species (Hymenoptera, Platygastroidea, Platygastridae). ZooKeys 20:53-118.') #  =\u003e \"http://dx.doi.org/10.3897/zookeys.20.205\" \n\n```\n\nIf you have the doi:\n\n```ruby\n\n Ref2bibtex.get_bibtex('http://dx.doi.org/10.3897/zookeys.20.205') # =\u003e \"@article{Yoder_2009,\\n\\tdoi = {10.3897/zookeys.20.205},\\n\\turl = {http://dx.doi.org/10.3897/zookeys.20.205},\\n\\tyear = 2009,\\n\\tmonth = {sep},\\n\\tpublisher = {Pensoft Publishers},\\n\\tvolume = {20},\\n\\tnumber = {0},\\n\\tauthor = {Matthew Yoder and Andrew Polaszek and Lubomir Masner and Norman Johnson and Alejandro Valerio},\\n\\ttitle = {Revision of Scelio pulchripennis - group species (Hymenoptera, Platygastroidea, Platygastridae)},\\n\\tjournal = {{ZOOKEYS}}\\n}\" \n\n```\n\nIf you want a score: \n\n```ruby\n\n  Ref2bibtex.get_score('E. Ven. 1337. Fake articles. Journal Get Scores. Hm:mm') # =\u003e 23.688715\n\n```\n\nUses a cutoff against score, below cutoff returns false, set the cutoff:\n```ruby\n\n  Ref2bibtex.cutoff            # =\u003e 50 \n  Ref2bibtex.cutoff = 10       # =\u003e 10\n  Ref2bibtex.reset_cutoff      # =\u003e 50 \n\n``` \n\n# faq\n\n## What if there are multiple results?\nThe code is dumb, it takes the first. You could use the internals to get more results.\n\n# acknowledgements\n\nThe Crossref API. Jon Hill, University of York, for his Python version and bringing up the approach.\n\n# license\n\n[NCSA, UI flavor](http://opensource.org/licenses/NCSA)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeciesfilegroup%2Fref2bibtex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspeciesfilegroup%2Fref2bibtex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeciesfilegroup%2Fref2bibtex/lists"}