Skip to main content

Universal citation management and academic reference toolkit

Project description

OneCite

Universal Citation Management & Academic Reference Toolkit

PyPI version Python License Status

Transform messy references into standardized citations

✨ Features🚀 Quick Start📖 Documentation🤝 Contributing


✨ Features

  • 🔍 Smart Recognition - Fuzzy matching with CrossRef & Google Scholar APIs
  • 📚 Multi-format Support - TXT, BibTeX input → BibTeX, APA, MLA output
  • 🎯 High Accuracy - 4-stage refinement pipeline ensures quality
  • 🤖 Auto-completion - Intelligently fills missing bibliographic data
  • 🎛️ Interactive Mode - User choice for ambiguous matches
  • ⚙️ Template System - Flexible output field configuration
  • 🎓 Conference Paper Support - Recognizes papers from NIPS, CVPR, ICML, etc.
  • 📄 arXiv Integration - Automatically fetches metadata for arXiv papers
  • 🌟 Famous Paper Database - Built-in recognition for landmark papers

🚀 Quick Start

Installation

Option 1: Install from PyPI (Recommended)

pip install onecite

Option 2: Install from Source

git clone https://github.com/HzaCode/OneCite.git
cd onecite
pip install -r requirements.txt
pip install -e .

Basic Usage

Input (references.txt):

10.1038/nature14539

Attention is all you need
Vaswani et al.
NIPS 2017

Command:

onecite process references.txt --output results.bib --quiet

Output:

Results saved to: results.bib

Processing Report:
  Total entries: 2
  Successfully processed: 2
  Failed entries: 0

Generated (results.bib):

@article{LeCun2015Deep,
  doi = "10.1038/nature14539",
  title = "Deep learning",
  author = "LeCun, Yann and Bengio, Yoshua and Hinton, Geoffrey",
  journal = "Nature",
  year = 2015,
  volume = 521,
  number = 7553,
  pages = "436-444",
  publisher = "Springer Science and Business Media LLC",
  url = "https://doi.org/10.1038/nature14539",
}

@inproceedings{Vaswani2017Attention,
  arxiv = "1706.03762",
  title = "Attention Is All You Need",
  author = "Vaswani, Ashish and Shazeer, Noam and Parmar, Niki and Uszkoreit, Jakob and Jones, Llion and Gomez, Aidan N. and Kaiser, Lukasz and Polosukhin, Illia",
  booktitle = "Advances in Neural Information Processing Systems",
  year = 2017,
  url = "https://arxiv.org/abs/1706.03762",
}

💡 Advanced Usage

🎨 Multiple Output Formats
# APA format
onecite process refs.txt --output-format apa
# → LeCun, Y., Bengio, Y., & Hinton, G. (2015). Deep learning. Nature, 521(7553), 436-444.
# → Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., ... & Polosukhin, I. (2017). 
#   Attention is all you need. In Advances in Neural Information Processing Systems (pp. 5998-6008).

# BibTeX format (default)
onecite process refs.txt --output-format bibtex

# MLA format  
onecite process refs.txt --output-format mla
# → LeCun, Yann, Yoshua Bengio, and Geoffrey Hinton. "Deep Learning." Nature 521.7553 (2015): 436-444.
# → Vaswani, Ashish, et al. "Attention Is All You Need." Advances in Neural Information Processing Systems. 2017.
🤖 Interactive Mode
onecite process ambiguous.txt --interactive

Example interaction:

Found multiple possible matches for "Deep learning Hinton":
1. Deep learning
   Authors: LeCun, Yann; Bengio, Yoshua; Hinton, Geoffrey
   Journal: Nature
   Year: 2015
   Match Score: 92.5
   DOI: 10.1038/nature14539

2. Deep belief networks
   Authors: Hinton, Geoffrey E.
   Journal: Scholarpedia
   Year: 2009
   Match Score: 78.3
   DOI: 10.4249/scholarpedia.5947

Please select (1-2, 0=skip): 1
✅ Selected: Deep learning
🐍 Python API
from onecite import process_references

def callback(candidates):
    return 0  # Select first candidate

result = process_references(
    input_content="Deep learning review\nLeCun, Bengio, Hinton\nNature 2015",
    input_type="txt",
    template_name="journal_article_full", 
    output_format="bibtex",
    interactive_callback=callback
)

print(f"Processed: {result['report']['succeeded']} entries")
📑 Supported Paper Types

OneCite now supports various types of academic papers:

Journal Articles with DOI:

10.1038/nature14539

→ Automatically fetches complete metadata from CrossRef

Conference Papers:

Attention is all you need
Vaswani et al.
NIPS 2017

→ Recognizes conference venues (NIPS/NeurIPS, CVPR, ICML, etc.) → Generates @inproceedings BibTeX entries

arXiv Papers:

1706.03762

→ Fetches metadata from arXiv API → Includes abstract and all authors

Papers with URLs:

https://arxiv.org/abs/1706.03762

→ Extracts identifiers from URLs → Supports arXiv, DOI, and conference paper URLs

⚙️ Configuration

📋 Command Line Options
Option Description Default
--input-type Input format (txt, bib) txt
--output-format Output format (bibtex, apa, mla) bibtex
--template Template to use journal_article_full
--interactive Enable interactive mode False
--quiet Suppress verbose logging False
--output, -o Output file path stdout

Examples:

# Basic processing
onecite process input.txt

# With custom options  
onecite process input.bib --input-type bib --template conference_paper --output results.bib

# Interactive mode with APA output
onecite process mixed.txt --interactive --output-format apa
🎨 Template System

Create custom template my_template.yaml:

name: my_template
entry_type: "@article"
fields:
  - name: author
    required: true
  - name: title  
    required: true
  - name: journal
    required: true
  - name: year
    required: true
  - name: doi
    required: false
    source_priority: [crossref_api]

Usage:

onecite process refs.txt --template my_template

🤝 Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

📄 License

This project is licensed under the MIT License.


OneCite - Making citation management simple and accurate ✨

⭐ Star📖 Docs🐛 Issues💬 Discussions

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

onecite-0.0.1.tar.gz (24.2 kB view details)

Uploaded Source

Built Distribution

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

onecite-0.0.1-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file onecite-0.0.1.tar.gz.

File metadata

  • Download URL: onecite-0.0.1.tar.gz
  • Upload date:
  • Size: 24.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.1

File hashes

Hashes for onecite-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1c86d1dfdb068ee5fb12d8c0ca17321ae1d960e2128f1bef6b461d45973d42d7
MD5 0a96b7a6cddb2a46b01a1ae385e4deb7
BLAKE2b-256 f4eeaea3aa83acbaabddbb4f3a372213a29ebac9f05e238393980d014e6822ab

See more details on using hashes here.

File details

Details for the file onecite-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: onecite-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.1

File hashes

Hashes for onecite-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0cfd1aeade59dff6e254b9fc205fffef8455d2ae6c2934a94657442fb058f6cc
MD5 b62d8a43b276f68a4c3f27bbb1577009
BLAKE2b-256 d3c86a780f9f0933978a2abf8a2578391b94a6d7f1b44c353a0a7b8115f33223

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