Get tweets of particular users into your gmail inbox without using twitter app.
So you can follow people you admire and read inspiring ideas without being annoyed with push notifications.
Using the power of email, you can read tweets whenever you want and have all the tweets history in your inbox.
- Clone or download the repo using the green button above
- Create an application in twitter with the help of their guide: https://developer.twitter.com/en/docs/basics/authentication/guides/access-tokens
keyconf.jsonin the same folder, say in
keyconf.jsonand replace values with your actual keys retrieved in step 2
smtpconf.jsonand replace values with your actual login and pass from your gmail account
userconf.jsonand replace or add twitter users you wish to follow. You should replace id value by
""(empty value) at first, then python script will manage it by itself
- Install dependencies if it is necessary https://github.com/bear/python-twitter
pip install python-twitter
- Create an executable python3 script (say,
# import the class from tweetsender import TwSender # create an instance, load configurations, collect tweets tws = TwSender() # send tweets and update userconf.json tws.send(toaddr_list = ['email@example.com', 'firstname.lastname@example.org']) # clean up after yourself tws.cleanup()
and save it in the same directory (
- Check if script works (open your terminal and type):
- Schedule the script via crontab (check every day in my case):
- Open your terminal and type:
This will run the script every day at 6:00 am
- Add the following line (you can change the freequency as you like it):
0 6 * * * python3 /path/to/your/home/tweetsender/tsservice.py