LFL_PaperBot is an automated tool for monitoring academic publications. It searches RSS feeds for specified keywords and authors, then pushes matching articles in a readable format to a designated Slack channel. This automation is fully handled via GitHub Actions.
- A GitHub account
- A Slack workspace with a bot user
- Create an app in your Slack workspace by visiting Slack API.
- Enable the Slack bot user.
- Install the app to your workspace and copy the bot user token from the 'OAuth & Permissions' tab.
- Add the bot user token as a secret in your GitHub repository (named
SLACK_TOKEN).
- Fork the LFL_PaperBot repository to your GitHub account.
- Clone the forked repository to your local machine for configuration.
authors.txt: List authors to track. Include variations of names with/without middle initials.feeds.txt: URLs of RSS feeds to monitor.keywords.txt: Keywords to search within the articles.channel.txt: Slack channel ID where the articles will be posted.
- Modify
authors.txt,feeds.txt,keywords.txt, andchannel.txtas needed in your forked repository. - Commit and push the changes to your GitHub repository.
- The workflow is set up in
.github/workflows/schedule.yml. - The action is scheduled to run at a specified time every day.
- On execution, the script
distributor.pyprocesses the RSS feeds and sends the relevant articles to the specified Slack channel.
Updates needed for the GitHub Actions workflow:
- Ensure that "Read and write permissions" are enabled in Settings -> Actions -> General -> Workflow permissions
- Update the schedule in
schedule.ymlto the desired time. - Update the
SLACK_TOKENsecret in the repository settings if the bot user token changes. - Create a repository secrets variable (
GH_PAT) with value that is yourPAT_NAMEthat has at least thereposcope enabled.- If you don't have a PAT: Go to your GitHub settings, then to Developer settings > Personal access tokens > Generate new token. Make sure the token has the
reposcope.
- If you don't have a PAT: Go to your GitHub settings, then to Developer settings > Personal access tokens > Generate new token. Make sure the token has the
- Update the
GIT_HTTPS_USERNAMEto your username
To add more keywords, feeds, or authors:
- Fork the repository.
- Modify
keywords.txt,feeds.txt, orauthors.txtas needed. - Commit and push your changes to your forked repository.
- Create a pull request for your changes to be reviewed and merged into the main repository.
- Avoid overwhelming your Slack channel with repeated messages during initial setup and testing. Consider using a private channel for testing.
- Follow best practices when making contributions to the project via pull requests.