Import papers from external reference managers (Endnote XML/RIS, Zotero via zotero-cli or local SQLite). Handles PDF matching, MinerU conversion, metadata enrichment, and index updates. Use when the user wants to import their existing library from Zotero, Endnote, or attach a PDF to an existing paper.
支持 Endnote 导出的 XML 和 RIS 格式文件。
# 完整导入:元数据 + PDF 匹配 + MinerU 批量转换 + enrich (toc/l3/abstract) + embed + index
scholaraio import-endnote <file.xml>
# 多文件导入
scholaraio import-endnote file1.xml file2.ris
# 仅导入元数据和 PDF,跳过 MinerU 转换和 enrich
scholaraio import-endnote <file.xml> --no-convert
# 预览模式
scholaraio import-endnote <file.xml> --dry-run
# 离线模式
scholaraio import-endnote <file.xml> --no-api
对 Endnote XML 文件,自动解析 internal-pdf:// 链接,从 <library>.Data/PDF/ 目录匹配 PDF:
默认行为(不带 --no-convert)下,导入完成后自动执行完整 pipeline:
convert_pdfs_cloud_batch() 批量转换(批次大小由 config.yaml ingest.mineru_batch_size 控制,默认 20)使用 --no-convert 跳过以上全部后处理(仅导入元数据 + PDF 复制 + embed + index)。
支持 zotero-cli 和本地 SQLite 两种模式。
先安装并初始化:
pip install zotero-cli
zotcli configure
# 列出 collections
scholaraio import-zotero --list-collections
# 完整导入
scholaraio import-zotero
# 仅导入指定 collection
scholaraio import-zotero --collection COLLECTION_KEY
# 导入后将 collections 创建为工作区
scholaraio import-zotero --import-collections
scholaraio import-zotero --local /path/to/zotero.sqlite
可在 config.local.yaml 中补充 library 类型: