{"id":13477687,"url":"https://github.com/texworld/betterbib","last_synced_at":"2025-05-14T19:03:35.387Z","repository":{"id":10143883,"uuid":"12219673","full_name":"texworld/betterbib","owner":"texworld","description":":green_book: Command-line tools for bibliographies.","archived":false,"fork":false,"pushed_at":"2025-01-02T18:13:09.000Z","size":2098,"stargazers_count":825,"open_issues_count":3,"forks_count":42,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-06T09:02:04.462Z","etag":null,"topics":["bibtex","latex","pypi","python"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/texworld.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-08-19T15:05:44.000Z","updated_at":"2025-04-04T09:36:42.000Z","dependencies_parsed_at":"2024-01-03T06:43:05.277Z","dependency_job_id":"e746d95a-6249-46cb-9a69-b29586181bc3","html_url":"https://github.com/texworld/betterbib","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"34765affc5a4a405a3039aec363c3004e75145cb"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/texworld%2Fbetterbib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/texworld%2Fbetterbib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/texworld%2Fbetterbib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/texworld%2Fbetterbib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/texworld","download_url":"https://codeload.github.com/texworld/betterbib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248717241,"owners_count":21150387,"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","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":["bibtex","latex","pypi","python"],"created_at":"2024-07-31T16:01:46.124Z","updated_at":"2025-04-13T12:43:29.241Z","avatar_url":"https://github.com/texworld.png","language":null,"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"betterbib\" src=\"https://raw.githubusercontent.com/texworld/betterbib/assets/betterbib.svg\" width=\"60%\"\u003e\n\u003c/p\u003e\n\n[![PyPi Version](https://img.shields.io/pypi/v/betterbib.svg?style=flat-square)](https://pypi.org/project/betterbib)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/betterbib.svg?style=flat-square)](https://pypi.org/pypi/betterbib/)\n[![GitHub stars](https://img.shields.io/github/stars/texworld/betterbib.svg?style=flat-square\u0026logo=github\u0026label=Stars\u0026logoColor=white)](https://github.com/texworld/betterbib)\n\n\u003c!-- [![Downloads](https://pepy.tech/badge/betterbib/month?style=flat-square)](https://pepy.tech/project/betterbib) --\u003e\n\u003c!--[![PyPi downloads](https://img.shields.io/pypi/dm/betterbib.svg?style=flat-square)](https://pypistats.org/packages/betterbib)--\u003e\n\n[![Discord](https://img.shields.io/static/v1?logo=discord\u0026logoColor=white\u0026label=chat\u0026message=on%20discord\u0026color=7289da\u0026style=flat-square)](https://discord.gg/hnTJ5MRX2Y)\n\n\u003e [!NOTE]\n\u003e See [here](https://github.com/texworld) for licensing information.\n\nBibliography files are notoriously hard to work with. Betterbib contains\na number of easy-to-use command-line tools to help.\n\n- [`betterbib convert`](#convert) converts between different bibliography formats, e.g.\n\n  - [BibTeX](https://www.bibtex.org/Format/)\n  - [BibLaTeX](https://ctan.org/pkg/biblatex)\n  - [RIS](\u003chttps://en.wikipedia.org/wiki/RIS_(file_format)\u003e)\n  - [CSL-JSON](https://citeproc-js.readthedocs.io/en/latest/csl-json/markup.html)\n\n- [`betterbib sync`](#sync) syncs bibliography data with a number of online sources, e.g.,\n\n  - [Crossref](https://www.crossref.org/)\n  - [DBLP](https://dblp.uni-trier.de/)\n  - [PubMed](https://pubmed.ncbi.nlm.nih.gov/)\n  - [arXiv](https://arxiv.org/)\n  - [Zenodo](https://zenodo.org/)\n\n- [`betterbib format`](#format) formats your bibliography files to your liking.\n  Can also (un)abbreviate author and journal names.\n\n- [`betterbib doi-to`](#dereference-dois) converts a DOI or DOI URL to a bibliography entry.\n\n### Installation\n\nInstall betterbib [from PyPI](https://pypi.org/project/betterbib/) with\n\n\u003c!--pytest.mark.skip--\u003e\n\n```\npip install betterbib\n```\n\n#### Convert\n\n#### Sync\n\nSimply run\n\n\u003c!--pytest.mark.skip--\u003e\n\n```sh\nbetterbib sync in.bib\n```\n\nto sync your bibliography file with online sources. For example, the input\n\n```bibtex\n@article{wiles,\ntitle={Fermat Last Theorem},\ndoi={10.2307/2118559},\n}\n```\n\nis converted to\n\n```bibtex\n@article{wiles,\n  number = {3},\n  doi = {10.2307/2118559},\n  pages = {443},\n  source = {Crossref},\n  volume = {141},\n  author = {Wiles, Andrew},\n  year = {1995},\n  month = may,\n  url = {https://doi.org/10.2307/2118559},\n  issn = {0003-486X},\n  journal = {The Annals of Mathematics},\n  publisher = {JSTOR},\n  title = {Modular Elliptic Curves and Fermat's Last Theorem},\n}\n```\n\nSee `-h`/`--help` for all options.\n\n\u003c!--pytest.mark.skipif(sys.version_info \u003c (3, 11), reason=\"Need Python 3.11+\")--\u003e\n\n```sh\nbetterbib sync -h\n```\n\n\u003c!--pytest-codeblocks: expected-output-ignore-whitespace--\u003e\n\n```\nUsage: betterbib sync [-h] [-i] [-c N] [-s SRC] [-m MINIMUM_SCORE] [-q] [--debug]\n                      [--output-format {bibtex,biblatex,csl-json,ris}]\n                      infiles [infiles ...]\n\nPositional Arguments:\n  infiles               input bibliography files\n\nOptions:\n  -h, --help            show this help message and exit\n  -i, --in-place        modify infile in place\n  -c, --num-concurrent-requests N\n                        number of concurrent HTTPS requests (default: 1)\n  -s, --sources SRC     sources to try (comma-separated, with order; default:\n                        crossref,dblp,pubmed)\n  -m, --minimum-score MINIMUM_SCORE\n                        minimum score to count as a match (default: 0.0)\n  -q, --quiet           don't show progress info (default: show)\n  --debug               some debug output (default: false)\n  --output-format {bibtex,biblatex,csl-json,ris}\n                        force output format (default: same as input)\n```\n\n#### Format\n\nAfter that, you can for example run\n\n```\nbetterbib format in.bib --sort-fields --align-values --journal-names short --abbrev-first-names\n```\n\nto get\n\n```bibtex\n@article{wiles,\n  author    = {Wiles, A.},\n  doi       = {10.2307/2118559},\n  issn      = {0003-486X},\n  journal   = {Ann. Math.},\n  month     = may,\n  number    = {3},\n  pages     = {443},\n  publisher = {JSTOR},\n  source    = {Crossref},\n  title     = {Modular Elliptic Curves and Fermat's Last Theorem},\n  url       = {https://doi.org/10.2307/2118559},\n  volume    = {141},\n  year      = {1995},\n}\n```\n\n```sh\nbetterbib format -h\n```\n\n\u003c!--pytest.mark.skipif(sys.version_info \u003c (3, 11), reason=\"Need Python 3.11+\")--\u003e\n\n```\nUsage: betterbib format [-h] [-i] [--drop DROP] [--journal-names {long,short,unchanged}] [--abbrev-first-names]\n                        [--sort-entries] [--sort-fields] [--doi-url-type {unchanged,old,new,short}]\n                        [--page-range-separator PAGE_RANGE_SEPARATOR] [--protect-title-capitalization]\n                        [--indent [INDENT]] [--align-values]\n                        infiles [infiles ...]\n\nPositional Arguments:\n  infiles               input BibTeX files\n\nOptions:\n  -h, --help            show this help message and exit\n  -i, --in-place        modify infile in place\n  --drop DROP           drop fields from entries (can be passed multiple times)\n  --journal-names {long,short,unchanged}\n                        force full or abbreviated journal names (default: unchanged)\n  --abbrev-first-names  abbreviate first names in author lists etc. (default: false)\n  --sort-entries        sort entries alphabetically by BibTeX key (default: false)\n  --sort-fields         sort fields alphabetically (default: false)\n  --doi-url-type {unchanged,old,new,short}\n                        DOI URL (new: https://doi.org/\u003cDOI\u003e, short: https://doi.org/abcde) (default: new)\n  --page-range-separator PAGE_RANGE_SEPARATOR\n                        page range separator (int or string, default: unchanged)\n  --protect-title-capitalization\n                        brace-protect names in titles (e.g., {Newton}; default: false)\n  --indent [INDENT]     indentation (int or string; default: 1)\n  --align-values        align field values (default: false)\n```\n\n#### Dereference DOIs\n\nGiven a DOI or a DOI URL, it's often useful to generate a bibliography entry for it. `betterbib doi-to` does just that.\n\n```sh\nbetterbib doi-to ris 10.1002/andp.19053221004\n```\n\n\u003c!--pytest-codeblocks: expected-output-ignore-whitespace--\u003e\n\n```ris\nTY  - JOUR\nIS  - 10\nDO  - 10.1002/andp.19053221004\nSP  - 891\nEP  - 921\nDS  - Crossref\nVL  - 322\nAU  - Einstein, A.\nDA  - 1905/01\nUR  - https://doi.org/10.1002/andp.19053221004\nSN  - 0003-3804\nSN  - 1521-3889\nJF  - Annalen der Physik\nJO  - Ann. Phys.\nPB  - Wiley\nTI  - Zur Elektrodynamik bewegter Körper\nER  -\n```\n","funding_links":[],"categories":["Others"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftexworld%2Fbetterbib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftexworld%2Fbetterbib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftexworld%2Fbetterbib/lists"}