TimoLin / tgBotLiterature

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tgBotLiterature

Your Telegram literature tracking bot.

How does it work?

This bot combines Google Scholar Alert (sent to Gmail) and Telegram bot to let you track and orgonize literatures without leaving Telegram.
It converts your Google Scholar Alert emails to Telegram messages: one literature to one message. If you don't like this one, just delete it in the chat.
img

What do we need?

  1. Gmail API
  2. Telegram bot
  3. python3

How to run?

Install

Prerequisites for Pi

sudo apt install gcc libffi-dev libssl-dev python3-dev

Pip packages

pip3 install requirements.txt

Config.ini

Change token info to your own Telegram bot's token.
If you are using proxy to connect Telegram, change it to your own.
Also,you need create a label in Gmail to filter the Google Scholar Alert emails. Once you have done that, change the label name to your own.

[token_info]
token = 123456789:ABCDEFGH_ijklmnopqrstuvwxyzabcdefgh

[proxy_info]
#proxy = socks5://127.0.0.1:1080/
proxy = 

[label_name]
label = LITER

On a computer, a Raspberry Pi or a VPS

python3 tgbot.py

In your telegram

Command Description
/start Show welcome message
/latest Get the latest email's literatures
/all Get all the literatures
/get <number> Get the given number emails' literatures

Literature message

The message has been formatted using Markdown. Like follows:

Title
Author1, Author2... - Journal of Sth, Year
Abstract: blah blah

The title has a hyper link pointing the paper's website.
The authors, journal and year are bold.
The abstract is plain text.

Example message:
A Computational Study on Laminar Flame Propagation in Mixtures with Non-Zero Reaction Progress
H Lin, P Zhao, H Ge - SAE Technical Paper, 2019
… turbulent premixed flames. Experimentally, laminar flame speed can be measured using different apparatus, including the coun- terflow twin flame, spherical combustion bomb, Bunsen flame, and flat flame, etc. 1, 2, 3, 4. A …

About


Languages

Language:Python 100.0%