zotero-arxiv-daily:基于 Zotero 与 GitHub Action 的科研论文推荐项目

Recommend new arxiv papers of your interest daily according to your Zotero libarary.

分支4Tags16
当前项目代码仓暂无内容

logo

Zotero-arXiv-Daily

Status Stars GitHub Issues GitHub Pull Requests License


根据您的 Zotero 图书馆,每日推荐您感兴趣的新 arXiv 论文。

Important

请关注此仓库,当上游有任何更新时,请及时合并您的分叉仓库,以便享受新功能并修复已发现的错误。

🧐 关于

只需分叉(并关注)此仓库,即可追踪您感兴趣的新科研成果!😊

Zotero-arXiv-Daily 会根据您 Zotero 图书馆的内容,找出您可能感兴趣的 arXiv 论文,然后将结果发送到您的邮箱📮。它可以部署为 Github Action 工作流,实现零成本无需安装,只需对 Github Action 环境变量进行少量配置,即可实现每日自动推送。

✨ 功能特点

  • 完全免费!所有计算都可在 Github Action 运行器本地完成,并在其配额范围内(适用于公共仓库)。
  • 人工智能生成的 TL;DR(简要摘要),助您快速筛选目标论文。
  • 解析并展示论文作者的机构信息。
  • 邮件中提供 PDF 链接和代码实现链接(如有)。
  • 按与您近期研究兴趣的相关性对论文列表进行排序。
  • 通过分叉此仓库并在 Github Action 页面设置环境变量,即可快速部署。
  • 支持 LLM API 生成论文的 TL;DR。
  • 使用 glob 模式列表忽略不需要的 Zotero 论文。
  • 支持多种论文来源检索:
    • arxiv
    • biorxiv
    • medrxiv

📷 截图

screenshot

🚀 使用方法

快速开始

  1. Fork(并点亮星标😘)本仓库。 fork

  2. 设置 Github Action 环境变量。 secrets

以下是您需要设置的所有密钥。出于安全考虑,设置后任何人(包括您自己)都无法查看这些密钥。

描述 示例
ZOTERO_ID 您的 Zotero 账户用户 ID。用户 ID 不是您的用户名,而是一串数字。可从这里获取您的 ID。您可以在这个截图所示的位置找到它。 12345678
ZOTERO_KEY 具有读取权限的 Zotero API 密钥。从这里获取密钥。 AB5tZ877P2j7Sm2Mragq041H
SENDER 发送邮件的 SMTP 服务器邮箱账户。 abc@qq.com
SENDER_PASSWORD 发送方账户的密码。请注意,这不一定是登录电子邮件客户端的密码,而是 SMTP 服务的授权码。请向您的电子邮件提供商咨询。 abcdefghijklmn
RECEIVER 接收论文列表的电子邮箱地址。 abc@outlook.com
OPENAI_API_KEY 使用 API 访问大语言模型(LLMs)时的 API 密钥。您可以在 SiliconFlow 获取免费 API 以使用高级开源大语言模型。 sk-xxx
OPENAI_API_BASE 使用 API 访问大语言模型(LLMs)时的 API URL。 https://api.siliconflow.cn/v1

然后,您还需要设置一个名为 CUSTOM_CONFIG 的公共变量来进行自定义配置。 vars custom_config 将以下内容粘贴到 CUSTOM_CONFIG 变量的值中:

zotero:
  user_id: ${oc.env:ZOTERO_ID}
  api_key: ${oc.env:ZOTERO_KEY}
  include_path: null # Or e.g. ["2026/survey/**", "2026/reading-group/**"]

email:
  sender: ${oc.env:SENDER}
  receiver: ${oc.env:RECEIVER}
  smtp_server: smtp.qq.com
  smtp_port: 465
  sender_password: ${oc.env:SENDER_PASSWORD}

llm:
  api:
    key: ${oc.env:OPENAI_API_KEY}
    base_url: ${oc.env:OPENAI_API_BASE}
  generation_kwargs:
    model: gpt-4o-mini

source:
  arxiv:
    category: ["cs.AI","cs.CV","cs.LG","cs.CL"]
    include_cross_list: false # Set to true to include arXiv cross-list papers in these categories.

executor:
  debug: ${oc.env:DEBUG,null}
  source: ['arxiv']

如果希望包含交叉列表论文,请将 source.arxiv.include_cross_list 设置为 true

Note

${oc.env:XXX,yyy} 表示环境变量 XXX 的值。如果未设置该变量,则将使用默认值 yyy

以下是完整配置,??? 表示必须填写的值:

zotero:
  user_id: ??? # User ID of your Zotero account.
  api_key: ??? # An Zotero API key with read access.
  include_path: null # A list of glob patterns marking the Zotero collections that should be included. Example: ["2026/survey/**", "2026/reading-group/**"]

source:
  arxiv:
    category: null # The categories of target arxiv papers. Find the abbr of your research area from [here](https://arxiv.org/category_taxonomy). Example: ["cs.AI","cs.CV","cs.LG","cs.CL"]
    include_cross_list: false # Whether to include arXiv cross-list papers in subscribed categories. Example: true
  biorxiv:
    category: null # The categories of target biorxiv papers. Find categories from [here](https://www.biorxiv.org/). Example: ["biochemistry","animal behavior and cognition"]
  medrxiv:
    category: null # The categories of target medrxiv papers. Find categories from [here](https://www.medrxiv.org/) Example: ["psychiatry and clinical psychology", "neurology"]

email:
  sender: ??? # The email account of the SMTP server that sends you email. Example: abc@qq.com
  receiver: ??? # The email account that receives the paper list. Example: abc@outlook.com
  smtp_server: ??? # The SMTP server that sends the email. Ask your email provider (Gmail, QQ, Outlook, ...) for its SMTP server. Example: smtp.qq.com
  smtp_port: ??? # The port of SMTP server. Example: 465
  sender_password: ??? # The password of the sender account. Note that it's not necessarily the password for logging in the e-mail client, but the authentication code for SMTP service. Ask your email provider for this. Example: abcdefghijklmn

llm:
  api:
    key: ??? # API Key of your LLM API. Example: sk-xxx
    base_url: ??? # API URL of your LLM API. Example: https://api.openai.com/v1
  generation_kwargs:
  # Arguments for the LLM API. See [here](https://platform.openai.com/docs/api-reference/chat/create) for more details.
    max_tokens: 16384
    model: ???
  language: English # Preferred language for the TL;DR. Example: English

reranker:
  local:
    model: jinaai/jina-embeddings-v5-text-nano # The Hugging Face model name of the local embedding model. Example: jinaai/jina-embeddings-v5-text-nano
    encode_kwargs:
    # The kwargs for the encode method of the local embedding model. Details see [here](https://www.sbert.net/docs/package_reference/SentenceTransformer.html#sentence_transformers.SentenceTransformer.encode)
      task: retrieval
      prompt_name: document
  api:
    key: null # API Key of your embedding model API. Example: sk-xxx
    base_url: null # API URL of your embedding model API. Example: https://api.openai.com/v1
    model: null # The model name of the embedding model. Example: text-embedding-3-large
    batch_size: null # The batch size for embedding API requests. Adjust to match your provider's limit. Example: 64

executor:
  debug: false # Whether to use debug mode. Example: true
  send_empty: false # Whether to send an empty email even if no new papers today. Example: true
  max_paper_num: 100 # The maximum number of the papers presented in the email. Example: 100
  source: ??? # The sources of papers to retrieve. Example: ['arxiv','biorxiv','medrxiv']
  reranker: local # The reranker to use. Example: 'local' or 'api'

就是这样!现在你可以通过手动触发来测试工作流: test

Note

Test-Workflow Action 是主工作流(Send-emails-daily)的调试版本,它总是获取 5 篇 arXiv 论文,不考虑日期。而主工作流将每天自动触发,并获取昨天发布的新论文。周末和节假日没有新的 arXiv 论文,在这种情况下,你可能会在主工作流的日志中看到“未找到新论文”。

工作流完成后,请检查日志和接收者邮箱。

默认情况下,主工作流每天在 UTC 时间 22:00 运行。你可以通过编辑工作流配置文件 .github/workflows/main.yml 来更改此时间。

本地运行

uv 的支持下,如果安装了 uv,此工作流可以轻松在你的本地设备上运行:

# set all the environment variables
# export ZOTERO_ID=xxxx
# ...
cd zotero-arxiv-daily
uv run main.py

🚀 同步至最新版本

本项目正处于积极开发阶段。您可以通过点击“Watch”来订阅此仓库,以便在我们发布新版本时收到通知。

Watch

📖 工作原理

Zotero-arXiv-Daily 首先通过相应的 API 获取您 Zotero 图书馆中的所有论文以及前一天发布的所有论文。然后,它通过嵌入模型计算每篇论文摘要的嵌入向量。一篇论文的得分是其与您 Zotero 中所有论文的加权平均相似度(较新添加到图书馆的论文权重更高)。每篇论文的 TLDR(太长不看版摘要)由 LLM 生成,其输入文本由 pymupdf4llm 提取。

📌 局限性

  • 推荐算法较为简单,可能无法准确反映您的兴趣。欢迎提出更好的算法改进思路!
  • 较高的 MAX_PAPER_NUM 可能导致执行时间超过 GitHub Action 运行器的限制(公共仓库每次执行 6 小时,私人仓库每月 2000 分钟)。通常,公共仓库提供的配额对于个人使用来说绝对足够。如果您有特殊需求,可以在自己的服务器上部署工作流,或使用自托管的 GitHub Action 运行器,或为超出的执行时间付费。

📃 许可证

本项目基于 AGPLv3 许可证分发。详情请参见 LICENSE 文件。

❤️ 致谢

☕ 请我喝杯咖啡

如果您觉得这个项目对您有帮助,欢迎通过微信或 ko-fi 赞助我。 wechat_qr

🌟 Star 历史

Star History Chart

项目介绍

每日根据您的Zotero图书馆推荐您感兴趣的arXiv新论文。【此简介由AI生成】

定制我的领域
445.91 K5.17 K访问 GitHub