Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/SumitAgr/PictureofTheDay-Bot

Telegram Bot that retrieves NASA's Image of the Day with a single command.
https://github.com/SumitAgr/PictureofTheDay-Bot

nasa nasa-api nasa-apod telegram telegram-api telegram-bot telegram-bot-api

Last synced: 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        



Bot logo

Picture of The Day Bot for Telegram

![Language](https://img.shields.io/badge/Python-3.7-blue.svg)
![License](https://img.shields.io/badge/license-MIT-blue.svg)
[![CodeFactor](https://www.codefactor.io/repository/github/sumitagr/pictureoftheday-bot/badge)](https://www.codefactor.io/repository/github/sumitagr/pictureoftheday-bot)

---

🤖 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](#about)
+ [Demo / Working](#demo)
+ [How it works](#working)
+ [Usage](#usage)
+ [Built Using](#built_using)
+ [Authors](#authors)
+ [License](#license)
+ [Acknowledgments](#acknowledgement)

## 🧐 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](https://i.imgur.com/nVF8viS.gif)

## 💭 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](https://python-telegram-bot.org/) - Unofficial Python wrapper for Telegram's API
+ [Amazon AWS EC2](https://aws.amazon.com/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!