Metadata-Version: 2.4
Name: citesleuth
Version: 0.1.1
Summary: Verify citations and spot hallucinations.
Author: CiteSleuth Contributors
License: MIT License
        
        Copyright (c) 2026 Ayodele Ifeoluwa Faleti
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: bibliography,citations,research,verification
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.10
Requires-Dist: bibtexparser>=1.4.0
Requires-Dist: httpx>=0.26.0
Requires-Dist: pdfminer-six>=20221105
Requires-Dist: python-docx>=1.1.0
Provides-Extra: test
Requires-Dist: pytest>=8.0.0; extra == 'test'
Requires-Dist: respx>=0.21.0; extra == 'test'
Description-Content-Type: text/markdown

# CiteSleuth

Verify citations, spot hallucinations.

CiteSleuth ingests BibTeX, DOCX, PDF, or plain text references and verifies them against public scholarly data providers. It produces machine-readable JSON and human-readable Markdown reports with suggested fixes.

## Install

```bash
pip install citesleuth
# or from source
python -m pip install -e .
```

## Usage

```bash
citesleuth verify refs.bib
citesleuth verify paper.pdf --format md
citesleuth verify paper.docx --out report.json
citesleuth verify refs.bib --write-bib refs.verified.bib --apply-fixes
```

Common flags:

- `--offline`: use cache only
- `--no-cache`: disable cache writes
- `--max-rps`: global request cap
- `--provider-delay semanticscholar=1.1,dblp=2.0,openlibrary=0.5`

## Tests

```bash
python -m pip install -e .[test]
pytest
cargo test -p citesleuth-core
```

## Rust + Node

Core matching logic lives in `crates/citesleuth-core`. Node bindings are in `crates/citesleuth-napi`.

```bash
cargo test -p citesleuth-core
cd crates/citesleuth-napi
npm install
npm run build
```

Quick Node usage:

```js
const citesleuth = require('citesleuth')
const result = citesleuth.normalizeTitle('Attention Is All You Need')
console.log(result)
```

## Notes

- Text-based PDFs only (no OCR in v1).
- Semantic Scholar uses an API key for best reliability. Set `SEMANTIC_SCHOLAR_API_KEY` or pass `--api-key-semanticscholar`.
- Open Library requests a descriptive User-Agent string; use `--user-agent` to override.
