Skip to main content

Bibverify: A Multi-Platform BibTeX Reference Verification Tool

Project description

Bibverify - BibTeX 文献检查工具

English README | 中文 README

🔍 English: A multi平台 BibTeX reference verification and update tool that automatically checks and improves reference information through multiple academic database APIs.
📚 中文: 一个支持多平台的 BibTeX 文献验证和更新工具,通过多个学术数据库 API 自动检查和完善文献信息。

License Python Stars DOI

🚀 支持的学术平台

平台 优先级 学科覆盖 API要求 特殊功能
CrossRef 1 全学科 无需API Polite Pool
OpenAlex 2 全学科 建议/需要 API key 引用关系
Semantic Scholar 3 全学科 推荐API AI 驱动
PubMed 4 生物医学 可选API 医学专业
Europe PMC 5 生物医学 无需API 欧洲医学
CORE 6 开放获取 推荐API 开放论文
Unpaywall 后处理 全学科 需要邮箱 开放版本补充
DBLP 8 计算机科学 无需API CS 专业
arXiv 9 预印本 无需API 预印本
bioRxiv 10 生物医学预印本 无需API 生物预印本

📦 安装依赖

pip install -r requirements.txt

从 PyPI 安装并直接使用

pip install bibverify

# 运行(可传入配置文件路径,默认读取当前目录下的 config.json)
bibverify config.json
# 或
bibverify

⚙️ 配置设置

1. 复制配置文件

cp config_template.json config.json

2. 基本配置

编辑 config.json 文件:

{
  "language": "CN",
  "bib_file": "references.bib",
  "user_info": {
    "email": "your_email@example.com",
    "app_name": "Bibverify"
  }
}

3. 平台配置

根据需要启用/禁用平台:

{
  "platforms": {
    "crossref": {
      "enabled": true,
      "priority": 1,
      "use_polite_pool": true
    },
    "semantic_scholar": {
      "enabled": true,
      "priority": 3,
      "requires_api_key": true,
      "api_key": "your_api_key_here"
    }
  }
}

4. 语言设置

  • "CN": 中文界面
  • "EN": 英文界面

🎯 使用方法

基本使用

python bib_check.py

指定配置文件

python bib_check.py config.json

通过 DOI 生成单条 BibTeX

bibverify --doi 10.1038/nature12373 --key example2013

该模式会直接调用 Crossref DOI 精确查询,并将结果打印为 BibTeX。

一键接入大模型 / MCP / Skill

为小白用户准备本地集成文件:

bibverify agent init --target codex --output .bibverify-agent --config config.json

生成内容:

  • .bibverify-agent/SKILL.md: 给大模型看的 Bibverify 调用说明
  • .bibverify-agent/mcp.json: MCP server 配置片段
  • .bibverify-agent/README.md: 本地接入说明

启动 MCP stdio server:

bibverify mcp --config config.json

单独导出 skill:

bibverify skill export --target codex --output .bibverify-agent/SKILL.md

检查本地环境:

bibverify agent doctor --config config.json

MCP 当前暴露四个工具:doi_to_bibtexrank_lookup_sourcesexplain_update_diffverify_bib_file。大模型接入 MCP 后,可以直接调用这些工具完成 DOI 转 BibTeX、检索源排序解释、条目差异解释和 .bib 文件检查。

📁 输出文件

程序会生成以下文件:

  1. 检查报告 (bib_check_report_YYYYMMDD_HHMMSS.txt)

    • 验证通过的文献列表
    • 需要更新的文献及其差异详情
    • 未找到的文献列表
  2. 备份文件 (references_backup_YYYYMMDD_HHMMSS.bib)

    • 原始 BibTeX 文件的完整备份
  3. 更新文件 (references_updated_YYYYMMDD_HHMMSS.bib)

    • 包含所有更新后的文献条目
  4. 问题文件 (references_wrong_YYYYMMDD_HHMMSS.bib)

    • 包含未找到或处理错误的文献

🔄 工作流程

开始
 ↓
加载 BibTeX 文件
 ↓
对每个条目:
 ├─ 提取标题
 ├─ 根据 DOI/PMID/arXiv 等标识符动态调整平台顺序
 ├─ 按调整后的优先级查询各平台
 ├─ 智能匹配文献信息
 ├─ 保持原有键值
 ├─ 比对字段差异
 └─ 记录结果
 ↓
生成检查报告
 ↓
生成更新文件
 ↓
完成

📝 BibTeX 格式标准

字段顺序

程序生成的 BibTeX 文件遵循标准字段顺序:

@article{key,
  title={...},
  author={...},
  journal={...},
  volume={...},
  number={...},
  pages={...},
  year={...},
  publisher={...},
  doi={...}
}

文献类型映射

平台类型 BibTeX 类型
journal-article article
book-chapter incollection
book book
proceedings-article inproceedings
posted-content unpublished

🎯 智能匹配规则

标题匹配策略

  1. 完全相同(忽略大小写、标点符号)
  2. 原标题包含在新标题中
  3. 严格不匹配:避免误匹配

标题规范化过程

"{{Detecting Influenza Epidemics}}"
↓ 移除大括号
"Detecting Influenza Epidemics"
↓ 转小写
"detecting influenza epidemics"
↓ 移除标点符号
"detecting influenza epidemics"
↓ 规范化空格
"detecting influenza epidemics"

🔧 高级配置

API 设置

部分平台需要 API key 以获得更高访问速度或稳定访问:

OpenAlex

"openalex": {
  "api_key": "your_api_key_here"
}

注册地址: https://docs.openalex.org/how-to-use-the-api/getting-started/authentication

Semantic Scholar

"semantic_scholar": {
  "api_key": "your_api_key_here"
}

注册地址: https://www.semanticscholar.org/product/api#api-key-form

PubMed

"pubmed": {
  "api_key": "your_api_key_here"
}

注册地址: https://www.ncbi.nlm.nih.gov/account/

CORE

"core": {
  "api_key": "your_api_key_here"
}

注册地址: https://core.ac.uk/services/api

Polite Pool 设置

为获得更高访问速度,建议设置邮箱:

"user_info": {
  "email": "your_email@example.com"
}

查询设置

"query_settings": {
  "delay_between_requests": 0.5,
  "timeout": 10,
  "max_retries": 3,
  "stop_on_first_match": true
}

检索顺序不是单纯静态表格顺序:如果条目已有 DOI,会优先走 Crossref DOI 精确查询;如果有 PMID/PMCID,会提升 PubMed 和 Europe PMC;如果有 arXiv 标识,会提升 arXiv。Unpaywall 当前只适合作为开放获取链接补充,不作为主文献元数据源。

📊 项目统计

GitHub stars GitHub forks GitHub issues GitHub pull requests

Star History Chart

📖 学术引用

如果您在学术研究或项目中使用 Bibverify,请您引用本项目:

BibTeX 格式

@software{bibverify2025,
  title={Bibverify: A Multi-Platform BibTeX Reference Verification Tool},
  author={Hong Liu},
  year={2025},
  url={https://github.com/Hylouis233/bibverify},
  note={DOI: 10.5281/zenodo.17338090}
}

文本格式

Hong Liu. (2025). Bibverify: A Multi-Platform BibTeX Reference Verification Tool. 
GitHub. https://github.com/Hylouis233/bibverify. DOI: 10.5281/zenodo.17338090

Bibverify - 让文献管理更简单、更准确!

如果这个工具对您有帮助,请给个 Star!

🤝 贡献

欢迎提交 GitHub IssuesPull Request

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

bibverify-0.2.0.tar.gz (30.6 kB view details)

Uploaded Source

Built Distribution

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

bibverify-0.2.0-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

Details for the file bibverify-0.2.0.tar.gz.

File metadata

  • Download URL: bibverify-0.2.0.tar.gz
  • Upload date:
  • Size: 30.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for bibverify-0.2.0.tar.gz
Algorithm Hash digest
SHA256 06bba5968e1882bba8f5ef1c82d11f016ac6eb2273595b3e770a1f866d2590fa
MD5 0345239cdcb7e905ca086cbfcc0c8a31
BLAKE2b-256 a62109e41025819a4b9f835460056f5b21747dff6019235f014569b842e73f02

See more details on using hashes here.

File details

Details for the file bibverify-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: bibverify-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 26.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for bibverify-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8801c591bd8314aa95fd1c5f89320d6643dd8d1bf6fa1c934768b6c08a713e3d
MD5 f20d0c7fa348282fd53e60ac822dbf88
BLAKE2b-256 878354a44b7471553639b0b972d7b5891d34509d762e8ece63f17c033fd65e10

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