ref: e7a4c2ad94e43016218838efd3bae7739dadc5fa apodnasabot/README.md -rw-r--r-- 2.4 KiB
e7a4c2adJosé Alberto Orejuela García Download and save image 2 years ago


This is a bot that will be able to handle different requests regarding Astronomy Picture Of the Day in https://apod.nasa.gov/. It's still work in progress, not even in an alpha stage.

#Deprecated Telegram version

This bot used to be only a Telegram bot. I have that version running on a server. You can find it in https://t.me/ApodNasaBot, and the code in deprecated-* branches. Besides, the bot cannot interact, it only sends the picture everyday to the ones already subscribed. If you are interested in subscribing, just let me know. Beware of bugs.

#New version

The aim of this new version is to make a new bot compatible with many platforms released under AGPL and with help of as many contributors as possible. I want to make real free software, with a community behind, even a little one. ;)

#Expected features

The bot should be able to:

  1. Download automatically the APOD from NASA, including description and links inside it.
  2. Send last picture.
  3. Manage subscriptions, including:
    • Subscribe.
    • Unsubscribe.
    • Send automatically the picture to subscribed users at the time they choose.
  4. Send the picture of a given date.
  5. Ping.
  6. Log all messages received and sent.
  7. Manage admins: add, remove, send admin list.
  8. Send log lines to an admin, when asked.
  9. Redownload APOD when an admin asks to, keeping a backup of the old one.
  10. Send subscriber list to an admin, when asked.


Did you find a bug? Feel free to report it to the mailing list ~josealberto4444/apodnasabot@lists.sr.ht if it's not reported yet (take a look at the etiquette).

Do you want to contribute to the code? Glad to hear it, that's the purpose of putting it here! Simply send a patch to ~josealberto4444/apodnasabot@lists.sr.ht. Take a look at https://git-send-email.io/ if you need help. =)


For running this bot, you will need

  • Python 3
  • Python pipenv

Execute the initialization script:

$ ./init.sh

This will do the following steps:

  1. Create the configuration file config.cfg if it does not exist.
  2. Create the directory for storing data called data.
  3. Create the python virtual environment if it's not created yet and install all the dependencies.