Skip to main content

Convert URLs to BibTeX entries, with support for DOI and ISBN extraction

Project description

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

Installation

pip install url2bib

Using as a Commandline Tool

url2bib https://arxiv.org/abs/2006.11477

Using as a Library

You can also use url2bib as a Python library with several key functions:

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 via DBLP and, for relevant arXiv topics, OpenReview.
  • 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 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, dblp.org, and openreview.net 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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

url2bib-0.5.0.tar.gz (25.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

url2bib-0.5.0-py3-none-any.whl (29.9 kB view details)

Uploaded Python 3

File details

Details for the file url2bib-0.5.0.tar.gz.

File metadata

  • Download URL: url2bib-0.5.0.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for url2bib-0.5.0.tar.gz
Algorithm Hash digest
SHA256 022c0a46463ce46f70baeeef09fbb222b50512ebae20c5af49c9cce9285f0bc9
MD5 a37a197360c64a4352cc2e28498a937e
BLAKE2b-256 1a8b60a0c849bc37a35e9c63b65ee69456950e02bc1c21a5581d023b0b54e830

See more details on using hashes here.

File details

Details for the file url2bib-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: url2bib-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 29.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for url2bib-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8fbdb7702e37c153a01e93d72cb9ad133f79a54f2bc2ac756c355243db06496f
MD5 e035917410d841b399447740116859ea
BLAKE2b-256 1b08967bc4bb8bc4f84f29f6685725efde05024df9e9a6b9c2b47b9bb7e7925f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page