# URL to BibTeX Converter (url2bib)
`url2bib` is a commandline tool for converting URLs of papers into into BibTeX citations. It tries to use the publication information rather than the arXiv url.

## Installation
```bash
pip install url2bib
```
## Using as a Commandline Tool
```bash
url2bib https://arxiv.org/abs/2006.11477
```
## Using as a Library
You can also use `url2bib` as a Python library with several key functions:
```python
from url2bib import url2bibtex, doi2bibtex, isbn2bibtex, parse_bibtex
# Convert a URL to BibTeX
bibtex: str = url2bibtex('https://arxiv.org/abs/2006.11477')
# Convert a DOI to BibTeX
bibtex: str = doi2bibtex('10.1145/3447548.3467160')
# Convert an ISBN to BibTeX
bibtex: str = isbn2bibtex('9780123456789')
# Parse a BibTeX string into a dictionary
bib_dict: dict = parse_bibtex(bibtex)
```
### Additional Library Features
- `set_verbosity(True)`: Enable verbose logging
- `get_dblp_bibtexs(paper_title)`: Search for publications on DBLP
## Features
- Extracts DOIs from URLs and retrieves BibTeX citations for those DOIs.
- Searches for publications of the paper.
- Generates a BibTeX entry with a unified ID in the format `{firstAuthorSurname}_{year}_{titleFirstWord}`.
## Contributing
Contributions to this project are welcome. If you have any suggestions or want to report issues, please open an issue or submit a pull request.
## License
This project is under the [GNU GPLv3](https://choosealicense.com/licenses/gpl-3.0) license.
## Acknowledgments
This script uses the `bibtexparser` library for parsing and generating BibTeX entries.
It also relies on external data sources such as doi.org and dblp.org to fetch BibTeX entries.
## Disclaimer
This script is provided as-is, and the accuracy of the generated BibTeX entries depends on the availability and quality of external data sources. Always double-check and edit citations as needed for your research papers and publications.
Happy citing with `url2bib`!
Raw data
{
"_id": null,
"home_page": "https://github.com/notpaulmartin/url2bib",
"name": "url2bib",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "bibtex, science, scientific-journals, crossref, doi, isbn",
"author": "Paul Martin",
"author_email": "p@ulmartin.com",
"download_url": "https://files.pythonhosted.org/packages/10/b6/ff7777dd7ca61e50c522d33ac5cba0ed60fef134a63275ec062e8bb9f7a4/url2bib-0.4.4.tar.gz",
"platform": null,
"description": "# URL to BibTeX Converter (url2bib)\n\n`url2bib` is a commandline tool for converting URLs of papers into into BibTeX citations. It tries to use the publication information rather than the arXiv url.\n\n\n\n## Installation\n```bash\npip install url2bib\n```\n\n## Using as a Commandline Tool\n```bash\nurl2bib https://arxiv.org/abs/2006.11477\n```\n\n## Using as a Library\nYou can also use `url2bib` as a Python library with several key functions:\n\n```python\nfrom url2bib import url2bibtex, doi2bibtex, isbn2bibtex, parse_bibtex\n\n# Convert a URL to BibTeX\nbibtex: str = url2bibtex('https://arxiv.org/abs/2006.11477')\n\n# Convert a DOI to BibTeX\nbibtex: str = doi2bibtex('10.1145/3447548.3467160')\n\n# Convert an ISBN to BibTeX\nbibtex: str = isbn2bibtex('9780123456789')\n\n# Parse a BibTeX string into a dictionary\nbib_dict: dict = parse_bibtex(bibtex)\n```\n\n### Additional Library Features\n- `set_verbosity(True)`: Enable verbose logging\n- `get_dblp_bibtexs(paper_title)`: Search for publications on DBLP\n\n## Features\n- Extracts DOIs from URLs and retrieves BibTeX citations for those DOIs.\n- Searches for publications of the paper.\n- Generates a BibTeX entry with a unified ID in the format `{firstAuthorSurname}_{year}_{titleFirstWord}`.\n\n## Contributing\nContributions to this project are welcome. If you have any suggestions or want to report issues, please open an issue or submit a pull request.\n\n## License\nThis project is under the [GNU GPLv3](https://choosealicense.com/licenses/gpl-3.0) license.\n\n## Acknowledgments\nThis script uses the `bibtexparser` library for parsing and generating BibTeX entries.\nIt also relies on external data sources such as doi.org and dblp.org to fetch BibTeX entries.\n\n## Disclaimer\nThis script is provided as-is, and the accuracy of the generated BibTeX entries depends on the availability and quality of external data sources. Always double-check and edit citations as needed for your research papers and publications.\n\nHappy citing with `url2bib`!\n",
"bugtrack_url": null,
"license": "GNU General Public License v3 (GPLv3)",
"summary": "Convert URLs to BibTeX entries, with support for DOI and ISBN extraction",
"version": "0.4.4",
"project_urls": {
"Homepage": "https://github.com/notpaulmartin/url2bib"
},
"split_keywords": [
"bibtex",
" science",
" scientific-journals",
" crossref",
" doi",
" isbn"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "75b899b366635f540eac50f12bf09e995a63011d75f95ec2a1736e28f3a877e5",
"md5": "8056f82613c28104f8aa8796f5db76c4",
"sha256": "d87347973a67180d250e0abf583a720b963b4bf83d1db0a70bc2ac5f704dc187"
},
"downloads": -1,
"filename": "url2bib-0.4.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8056f82613c28104f8aa8796f5db76c4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 21085,
"upload_time": "2025-08-31T16:35:56",
"upload_time_iso_8601": "2025-08-31T16:35:56.608870Z",
"url": "https://files.pythonhosted.org/packages/75/b8/99b366635f540eac50f12bf09e995a63011d75f95ec2a1736e28f3a877e5/url2bib-0.4.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "10b6ff7777dd7ca61e50c522d33ac5cba0ed60fef134a63275ec062e8bb9f7a4",
"md5": "16593eee94cc4059ca2501e9d41d7edb",
"sha256": "7c93a7b20410fd10880d3390b1ef1d34a44bcb2595f0149e6b2f9dd14b497232"
},
"downloads": -1,
"filename": "url2bib-0.4.4.tar.gz",
"has_sig": false,
"md5_digest": "16593eee94cc4059ca2501e9d41d7edb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 20326,
"upload_time": "2025-08-31T16:35:57",
"upload_time_iso_8601": "2025-08-31T16:35:57.589240Z",
"url": "https://files.pythonhosted.org/packages/10/b6/ff7777dd7ca61e50c522d33ac5cba0ed60fef134a63275ec062e8bb9f7a4/url2bib-0.4.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-31 16:35:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "notpaulmartin",
"github_project": "url2bib",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "bibtexparser",
"specs": []
},
{
"name": "urllib3",
"specs": []
},
{
"name": "beautifulsoup4",
"specs": []
}
],
"lcname": "url2bib"
}