{"id":19031436,"url":"https://github.com/plandes/bibstract","last_synced_at":"2026-06-13T20:05:49.839Z","repository":{"id":57478135,"uuid":"232969140","full_name":"plandes/bibstract","owner":"plandes","description":"BibTex Composition Based on (La)Tex References","archived":false,"fork":false,"pushed_at":"2023-12-24T19:43:56.000Z","size":235,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-26T13:43:46.534Z","etag":null,"topics":["bibtex","latex","tex"],"latest_commit_sha":null,"homepage":"https://plandes.github.io/bibstract/","language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plandes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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":"2020-01-10T05:01:11.000Z","updated_at":"2024-06-21T20:56:09.525Z","dependencies_parsed_at":"2023-12-24T20:48:15.046Z","dependency_job_id":null,"html_url":"https://github.com/plandes/bibstract","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plandes%2Fbibstract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plandes%2Fbibstract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plandes%2Fbibstract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plandes%2Fbibstract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plandes","download_url":"https://codeload.github.com/plandes/bibstract/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240080751,"owners_count":19744920,"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","tex"],"created_at":"2024-11-08T21:23:27.573Z","updated_at":"2026-06-13T20:05:49.826Z","avatar_url":"https://github.com/plandes.png","language":"TeX","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BibTeX Extract and Populate\n\n[![PyPI][pypi-badge]][pypi-link]\n[![Python 3.13][python313-badge]][python313-link]\n[![Build Status][build-badge]][build-link]\n\nThis utility extracts [BibTeX] references (a.k.a *markers*) from a [(La)TeX]\nfile and copies entries from a source, which the *master BibTeX file*.  It also\nprovides easy customization to massage the entries of the BibTeX files (see\n[features](#features)).  The use case is exporting all [BetterBibtex] entries\nto a file on your file system, usually one that is updated as you add, remove\nand modify papers in [Zotero].  While the use case was intended for use with\nZoter and BetterBibtex, it will work on any BibTeX system.\n\nThe program does the following:\n1. Parses some large master source BibTeX file.\n1. Parses a file or recursively all `.tex`, `.sty`, and `.cls` files\n   recursively in a directory.\n1. Copies the matching entries from the master source BibTeX to standard out.\n\nThe program makes the assumption that the BibTeX entry IDs are unique as the\nmatches are very loose when parsing the (La)TeX file.\n\n\n## Features\n\nMany features relate to modifying older entries to accommodate newer systems\n(i.e. [BibLATEX]) or modifying newer entries to accommodate older systems\n(i.e. [BibTex]).\n\nFeatures:\n* Replace or edit Unicode characters, which is useful when\n  `\\usepackage[utf8]{inputenc}` has no effect.\n* Massage date strings.\n* Remove certain entries that cause bibliography systems issues (useful for\n  [BibLATEX]).\n* Modify entries to normalize [arXiv] entries.\n\n\n\n## Obtaining\n\nThe easiest way to install the command line program is via the `pip` installer:\n```bash\npip3 install zensols.bibstract\n```\n\nBinaries are also available on [pypi].\n\n\n## Usage\n\nThis is a command line program written that has the following usage (also use\n`--help`):\n\n* Print IDs in a master source file BibTeX file: `bibstract showbib`.\n* Print cite references in a (La)TeX file: `bibstract showtex \u003cfile|directory\u003e`\n* Print IDs that will be exported from the BibTeX file: `bibstract showexport \u003cfile|directory\u003e`\n* Export the matching entries to standard out: `bibstract export \u003cfile|directory\u003e`\n\n\n## Converters\n\nA set of *converters* can be specified in the [configuration file], which\nmodify each parsed BibTeX entry in succession.  Currently there the following:\n* **date_year**: Converts the year part of a date field to a year.  This is\n  useful when using Zotero's Better Biblatex extension that produces BibLatex\n  formats, but you need BibTeX entries.\n* **copy**: Copy or move one or more fields in the entry.  This is useful when\n  your bibliography style expects one key, but the output (i.e.BibLatex)\n  outputs a different named field). When `destructive` is set to ``True``, this\n  copy operation becomes a move.\n\nConverters can be set be set and configured in the [configuration file].  See\nthe [test cases](tests) for more examples.\n\n\n## Configuration\n\nA [configuration file] must be given, whose location is either given with a\n`-c` command line argument, or set in the environment variable `BIBSTRACTRC`.\n\nAn example [configuration file] is available, which has only one INI section\n`default` with option `master_bib` with the master BibTeX file.\n\n\n### Example Configuration File\n\nThe following example configuration file points to the a home directory file\nwhere you tell where [BetterBibtex] to export.  It then specifies to convert\ndates with years (deleting the `date` field after)when creating the output.\n\nIn addition, it copies the `journaltitle` (exported by [BetterBibtex]) to\n`journal`, which is used by BibTeX.  This converter, called *replace* is\nconfigured the `replace_converter` entry.\n\n```ini\n[default]\nmaster_bib = ${env:home}/.zotero-betterbib.bib\nconverters = date_year_destructive, replace\n\n[replace_converter]\nclass_name = zensols.bibstract.CopyOrMoveConverter\nfields = dict: {'journaltitle': 'journal'}\ndestructive = False\n```\n\n\n## Documentation\n\nSee the [full documentation](https://plandes.github.io/bibstract/index.html).\nThe [API reference](https://plandes.github.io/bibstract/api.html) is also\navailable.\n\n\n## Changelog\n\nAn extensive changelog is available [here](CHANGELOG.md).\n\n\n## Community\n\nPlease star this repository and let me know how and where you use this API.\n[Contributions](CONTRIBUTING.md) as pull requests, feedback, and any input is\nwelcome.\n\n\n## License\n\n[MIT License](LICENSE.md)\n\nCopyright (c) 2020 - 2026 Paul Landes\n\n\n\u003c!-- links --\u003e\n[pypi]: https://pypi.org/project/zensols.bibstract/\n[pypi-link]: https://pypi.python.org/pypi/zensols.bibstract\n[pypi-badge]: https://img.shields.io/pypi/v/zensols.bibstract.svg\n[python313-badge]: https://img.shields.io/badge/python-3.13-blue.svg\n[python313-link]: https://www.python.org/downloads/release/python-3130\n[build-badge]: https://github.com/plandes/bibstract/workflows/CI/badge.svg\n[build-link]: https://github.com/plandes/bibstract/actions\n\n[configuration file]: #example-configuration-file\n[BetterBibtex]: https://github.com/retorquere/zotero-better-bibtex\n[Zotero]: https://www.zotero.org\n[BibTeX]: http://www.bibtex.org\n[BibLATEX]: https://ctan.org/pkg/biblatex?lang=en\n[(La)TeX]: http://www.bibtex.org\n[arXiv]: https://arxiv.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplandes%2Fbibstract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplandes%2Fbibstract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplandes%2Fbibstract/lists"}