Skip to content

InspiQuote 🎯 - A daily motivational Twitter bot πŸ€– which combines the power of images and quotes in one.

License

Notifications You must be signed in to change notification settings

RutvikJ77/Inspiquote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

71 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

InspiQuote

GitHub issues GitHub license GitHub stars

About

InspiQuote is a Twitter bot which helps to motivate you on a daily basis. The bot was build with an aim to bring mental peace through the combination of amazing photographs linked with a keyword from the quote.

Go ahead and tag @QuoteInspi on Twitter for a motivational day.

Twitter

How it works and what it does?

➑️ It uses the REST API architecture and fetches quotes from the Quotable and favq's.

➑️ On fetching the quote it is parsed through Rapid Automatic Keyword Extraction algorithm (Rake-nltk) which gives a keyword from the quote. The extracted keyword is then passed to unsplash api for searching that relevant picture for the quote.

➑️ After receiveing all the metrics and image, using Pillow library the image is edited with the quote and a watermark. As the editing process is complete it saves the image and is then posted on twitter using tweepy package. The bot is deployed via Heroku and scheduled to run at intervals using apscheduler.

➑️ Additionally it retweets messages from users with various motivation hashtags every 8 hours. Users who start following it receive a wonderful direct message for supporting it.

➑️ If tagged, it will send a reply with an additional quote.

Architecture

β”œβ”€β”€ License.txt
β”œβ”€β”€ Procfile
β”œβ”€β”€ README.md
β”œβ”€β”€ Resources
β”‚   β”œβ”€β”€ Image_edit.py
β”‚   β”œβ”€β”€ Image_fetch.py
β”‚   β”œβ”€β”€ __init__.py
β”‚   └── quotes_fetch.py
β”œβ”€β”€ assets
β”‚   └── cover-git.png
β”œβ”€β”€ bg\ images
β”‚   └── random.txt
β”œβ”€β”€ bots
β”‚   β”œβ”€β”€ config.py
β”‚   β”œβ”€β”€ direct_message.py
β”‚   β”œβ”€β”€ retweet_fav.py
β”‚   └── tags.py
β”œβ”€β”€ clock.py
β”œβ”€β”€ main.py
β”œβ”€β”€ post.py
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ server.py

Requirements

  • Apscheduler
  • Tweepy
  • Rake-nltk
  • Urllib3
  • Pillow
  • Python==3.6
  • Quotable API, Unsplash API, Favq's API

Contributions

Always open for new features just create an issue. If want to add a new feature via pull request please make a separate branch for it.

If you want to run it locally, add credentials.py with all the Twitter, Unsplash and FavQ's Keys πŸ”‘. Import it to relevant files in Resources module with config.py in bots. Additional individual test file functions are provided as well.

Wishing you a productive day 🎯 😁. If you got motivated considering giving it a 🌟.

About

InspiQuote 🎯 - A daily motivational Twitter bot πŸ€– which combines the power of images and quotes in one.

Resources

License

Stars

Watchers

Forks

Languages