A Python tool for fetching citations from multiple sources.
- Multiple data sources (CrossRef, DBLP, Google Scholar)
- Smart workflow and fallback mechanism
- Batch processing
- Detailed error handling and logging
pip install get-bibtexfrom apiModels import CrossRefBibTeX
# Using CrossRef
fetcher = CrossRefBibTeX(email="your.email@example.com")
bibtex = fetcher.get_bibtex("10.3390/s22197244") # FedMSA paper
print(bibtex)from apiModels import WorkflowBuilder, CrossRefBibTeX, DBLPBibTeX
# Create workflow
workflow = WorkflowBuilder()
workflow.add_fetcher(CrossRefBibTeX(email="your.email@example.com"))
workflow.add_fetcher(DBLPBibTeX())
# Batch processing
queries = [
"ECA-Net: Efficient Channel Attention for Deep Convolutional Neural Networks",
"CBAM: Convolutional Block Attention Module"
]
results = workflow.get_multiple_bibtex(queries)- Visit SerpAPI and sign up
- Get API key from Dashboard
- Initialize Google Scholar fetcher with API key
from apiModels import GoogleScholarBibTeX
fetcher = GoogleScholarBibTeX(api_key="your-serpapi-key")
bibtex = fetcher.get_bibtex("Attention Is All You Need")
print(bibtex)- Free plan limited to 100 searches per month
- Use environment variables for API key
- Prefer CrossRef and DBLP when possible
from apiModels import CrossRefBibTeX
fetcher = CrossRefBibTeX(email="your.email@example.com")
# Get ECA-Net paper citation
bibtex = fetcher.get_bibtex("10.1109/cvpr42600.2020.01155")
print(bibtex)from apiModels import WorkflowBuilder
workflow = WorkflowBuilder()
workflow.add_fetcher(CrossRefBibTeX(email="your.email@example.com"))
workflow.add_fetcher(DBLPBibTeX())
# Read queries from file and save results
workflow.process_file("papers.txt", "references.bib")For detailed documentation, see blog_cn.md
Pull requests and issues are welcome!
MIT