Skip to content

Automation-Scripting/literature-alert-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 

Repository files navigation

arXiv → Discord

This repository contains a Python runner that fetches articles from arXiv based on a YAML file of topics/queries and publishes them daily to Discord via Webhook.


Index

  1. Setup
  2. Variable binding
  3. Query
  4. Topic
  5. Report

1) Setup

  1. Download/clone this repository with the full source code (including the files within the .github/workflows folder).
  2. Push the code to a new repository (GitHub) that you own.
image

2) Variable binding

Each topic in the YML file (e.g. topics/hep.yml) contains:

  • The query to be executed: arxiv_url
  • The environment variable name that holds the Discord webhook URL: webhook_env

This variable determines where the message will be sent on Discord. image


On Discord: how to obtain the value of this variable (post URL)

  1. Select the destination channel.
  2. Open Settings.
  3. Go to Integrations.
  4. Click New Webhook.
  5. Copy the value from Copy Webhook URL.

This URL is the value that must be stored as a GitHub secret.

>>:

image

>>:

image

>>:

image

>>:

image

On GitHub: create a secret with the destination post URL

  1. Go to your repository Settings.
  2. Open Secrets and variablesActions.
  3. Click New repository secret.
  4. Set the value of the secret with the Webhook URL.

>>:

image

>>:

image

>>:

image

Bind the secret in the workflow

In the workflow file:

.github/workflows/check_new_papers.yml

Make sure the secret is exposed as an environment variable.

>>:

image

Bind the variable to the topic

In your topic file (e.g. topics/topic.yml), set:

>>:

image

3) Query

Each topic defines its own arXiv query using the arxiv_url field.

This is a direct query to the arXiv Atom API and is consumed as-is by the runner.

No transformation or validation is performed by the system.

image

4) Topic

To add a new topic:

  1. Create a new step in the workflow.
  2. Use the same structure as the existing steps.
  3. Declare the required secrets.
  4. Pass the new topic as a parameter to runner.py.
image

5) Report

A detailed execution report can be found under:

GitHub → Actions → arXiv → Discord workflow

Each run prints:

  • Fetched articles
  • Filtered articles
  • Posted messages
  • Errors (if any)
image image

Rule of thumb:
If the query is wrong, the system is wrong.
If the variable binding is wrong, nothing will be posted.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages