Skip to main content

智能文献搜索与批量下载工具,支持高级检索和并发下载

Project description

PDFGet - 高效文献下载工具

智能文献搜索与批量下载工具,支持高级检索和并发下载。

1. 项目概述

PDFGet是一个专为科研工作者设计的智能文献搜索与批量下载工具,集成了Europe PMC等权威学术数据库,提供高效的文献获取和管理功能。

1.1 主要特性

  • 🔍 高级搜索:支持布尔运算符、字段检索、短语检索
  • 🚀 并发下载:多线程并行下载,3-5倍速度提升
  • 📊 丰富元数据:包含作者、单位、期刊、摘要、引用等完整信息
  • 💾 智能缓存:24小时缓存,避免重复下载
  • 📄 批量处理:支持CSV/TXT文件批量下载

2. 安装与配置

2.1 系统要求

详细的系统要求和依赖信息请查看 pyproject.toml 文件。

2.2 安装方法

# 使用pip安装
pip install pdfget

# 使用uv安装
uv add pdfget

# 或从源码安装
git clone https://github.com/gqy20/pdfget.git
cd pdfget
pip install -e .

2.3 快速开始

安装完成后,您可以直接使用 pdfget 命令:

# 搜索文献
pdfget -s "machine learning" -l 20

# 搜索并下载
pdfget -s "cancer immunotherapy" -d

# 并发下载(5线程)
pdfget -s "deep learning" -l 50 -d -t 5

# 单篇文献下载
pdfget --doi 10.1016/j.cell.2020.01.021

# 批量下载
pdfget -i dois.csv -d -t 3

如果您使用 uv 作为包管理器,也可以:

# 使用uv运行
uv run pdfget -s "machine learning" -l 20

3. 高级检索语法

3.1 布尔运算符

# AND: 同时包含多个关键词
pdfget -s "cancer AND immunotherapy" -l 30

# OR: 包含任意关键词
pdfget -s "machine OR deep learning" -l 20

# NOT: 排除特定词汇
pdfget -s "cancer AND immunotherapy NOT review" -l 30

# 复杂组合
pdfget -s "(cancer OR tumor) AND immunotherapy NOT mice" -l 25

3.2 字段检索

# 标题检索
pdfget -s 'title:"deep learning"' -l 15

# 作者检索
pdfget -s 'author:hinton AND title:"neural networks"' -l 10

# 期刊检索
pdfget -s 'journal:nature AND cancer' -l 20

# 年份检索
pdfget -s 'cancer AND year:2023' -l 15

3.3 短语和精确匹配

# 短语检索(用双引号)
pdfget -s '"quantum computing"' -l 10

# 混合使用
pdfget -s '"gene expression" AND (cancer OR tumor) NOT review' -l 20

3.4 实用检索技巧

  • 使用括号分组复杂的布尔逻辑
  • 短语用双引号确保精确匹配
  • 可以组合多个字段进行精确检索
  • 使用 NOT 过滤掉不相关的结果(如综述、评论等)

4. 性能优势

4.1 并发下载效率对比

文献数量 单线程耗时 并发耗时 性能提升
5篇 ~25秒 ~8秒 3x
20篇 ~100秒 ~25秒 4x
50篇 ~250秒 ~60秒 4x

5. 命令行参数详解

5.1 核心参数

  • -s QUERY : 搜索文献
  • --doi DOI : 下载单个文献
  • -i FILE : 批量输入文件
  • -d : 下载PDF

5.2 优化参数

  • -l NUM : 搜索结果数量(默认50)
  • -t NUM : 并发线程数(默认3)
  • -v : 详细输出

6. 输出格式与文件结构

6.1 搜索结果格式

{
  "query": "关键词",
  "total": 10,
  "results": [
    {
      "title": "文献标题",
      "authors": ["作者1", "作者2"],
      "journal": "期刊名称",
      "year": "2025",
      "doi": "10.1016/xxx",
      "affiliation": "作者单位",
      "citedBy": 0,
      "keywords": ["关键词1", "关键词2"]
    }
  ]
}

6.2 文件目录结构

data/
├── pdfs/           # 下载的PDF文件
├── cache/          # 缓存文件
└── download_results.json  # 下载结果记录

7. 许可证

本项目采用 MIT License,允许自由使用和修改。

📚 更新日志

📋 查看版本更新历史
  • 🔗 完整更新日志: CHANGELOG.md
  • 最新版本 (v0.1.0): 高级文献搜索 + 并发下载 + 智能缓存

🔗 相关链接

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

pdfget-0.1.0.tar.gz (26.7 MB view details)

Uploaded Source

Built Distribution

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

pdfget-0.1.0-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file pdfget-0.1.0.tar.gz.

File metadata

  • Download URL: pdfget-0.1.0.tar.gz
  • Upload date:
  • Size: 26.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pdfget-0.1.0.tar.gz
Algorithm Hash digest
SHA256 46d22945035fe3fd86effe53dce228d39fdf85bfa9ed6ac97bc40281dea53e85
MD5 fa4a1a42c59257a98e995d4da95741b6
BLAKE2b-256 90521e3043a03ce1e687350a043daea4355166f29f2394e18b1b7bd8cd150299

See more details on using hashes here.

File details

Details for the file pdfget-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pdfget-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pdfget-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 331471273ab6ae37bf4693acccc7a6b28455df5ba4bb17ad5105201a0f544fdc
MD5 04b88bac73f7e9d3712ea8a749807c72
BLAKE2b-256 c2c9203b303c2a0b52304fab0c892e7a2a18f67c866849277e949d1e91132b1e

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