Arxiv crawling slack bot runnnig on AWS Lambda
日本語のREADME -> https://qiita.com/kamata1729/items/eb7b8a30749138a66788
- Get new arxiv cs.CV papers publiched in the last day
(If you want to change this category, please change
search_query
argument ofarxiv_crawl.get_new_arxiv_papers
) - Translate its abstract into Japanese
- Post message to slack workspace like below:
Open https://api.slack.com/apps?new_app=1 to create slack app
Then, go to Bot users
tab and create bot user of the app
Open OAuth & Permissions
and select permission scope like below image.
Your bot needs chat:write:bot
permission.
install bot to your workspace.
after installing, do not forget to memo the access tokens in below image.
Go to https://cloud.google.com/ and enable Google Translation API
After that, you have to get API key.
This API costs some money, so I recommend you to register free trial
run below to create arxiv_crawler.zip
bash make_zip.sh
Create your lambda function and upload arxiv_crawler.zip
The function handler should be specified as arxiv_crawl.lambda_handler
Like below image, set parameters.
CHANNEL_ID
is the id of the slack channel which this bot will post messages
Add CloudWatch Events
trigger from the left-side list
Define trigger role of the CloudWatch Events
like below:
Under cron(0 6 * * ? *)
, bot will post message once a day at 15:00 PM (JST)