Skip to content

Telegram Bot that retrieves NASA's Image of the Day with a single command.

License

Notifications You must be signed in to change notification settings

SumitAgr/PictureofTheDay-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bot logo

Picture of The Day Bot for Telegram

Language License CodeFactor


🤖 A Telegram bot that retrieve's NASA renowned picture of the day service (APOD) with a single command!
Use it live here: https://t.me/PictureofTheDayBot

📝 Table of Contents

🧐 About

A simple and convenient telegram bot that retrieves pictures from NASA's APOD Service after the user enters a simple command: '/picture'. It shows the title of the image, the photo and a simple description of the picture.

🎥 Demo / Working

Working

💭 How it works

The bot uses Telegram's API to communicate with the user to send messages to them. After the user successfully authenticates i.e starts the bot by clicking on the start button on the bot, it is ready to send the current picture of the day.

The user is provided with two GUI options, an on-screen button to easily get the image or an in-line suggestion as the user writes '/picture' in the message box.

Once the bot receives this request, it uses NASA APOD's API to retrieve the data in JSON format. The information is then converted into a message that is sent to the user within 5 seconds using Telegram's API.

The bot utilizes the NLTK python library to convert the giant wall of NASA text into a minimal summary.

The entire bot is written in Python 3.7

🎈 Usage

To use the bot, type:

/picture

You can either type the entire command - '/picture' or use the GUI interface instead. The bot will then quickly reply the current picture of the day.

Please note: The bot could be slow sometimes as it depends on NASA's API requests.

⛏️ Built Using

  • Python-Telegram-Bot - Unofficial Python wrapper for Telegram's API
  • Amazon AWS EC2 - Amazon AWS's cloud computing service
  • NLTK - The Natural Language Toolkit Python library for text summary and language processing
  • Requests - Requests library for HTTP Requests
  • Logging - Logging library for debugging
  • Time / DateTime - Time libraries

✍️ Authors

  • Sumit Agrawal

📗 License

This project is licensed under the MIT License - see the LICENSE file for more details.

🎉 Acknowledgements

  • Thank you to Python-telegram-bot for providing the python wrapper!

About

Telegram Bot that retrieves NASA's Image of the Day with a single command.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages