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.
β‘οΈ 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.
βββ 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
- Apscheduler
- Tweepy
- Rake-nltk
- Urllib3
- Pillow
- Python==3.6
- Quotable API, Unsplash API, Favq's API
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.