Coder Social home page Coder Social logo

sumitagr / pictureoftheday-bot Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 2.0 93 KB

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

License: MIT License

Python 100.00%
telegram-bot telegram telegram-api telegram-bot-api nasa nasa-apod nasa-api

pictureoftheday-bot's Introduction

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!

pictureoftheday-bot's People

Contributors

sumitagr avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.