Metadata-Version: 2.4
Name: url2bib
Version: 0.4.1
Summary: Convert URLs to BibTeX entries, with support for DOI and ISBN extraction
Home-page: https://github.com/notpaulmartin/url2bib
Author: Paul Martin
Author-email: p@ulmartin.com
License: GNU General Public License v3 (GPLv3)
Keywords: bibtex,science,scientific-journals,crossref,doi,isbn
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Text Processing :: Markup :: LaTeX
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.0
Requires-Dist: bibtexparser>=1.2.0
Requires-Dist: urllib3>=1.26.0
Requires-Dist: beautifulsoup4>=4.9.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 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.

![screenshot.png](screenshot.png)

## 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`!
