Skip to content
This repository has been archived by the owner on Jul 28, 2020. It is now read-only.

Latest commit

 

History

History
23 lines (16 loc) · 1019 Bytes

README.md

File metadata and controls

23 lines (16 loc) · 1019 Bytes

Daily Photo

This application picks up a photo from a specified directory, sends it to a specified Telegram chat and then deletes that photo. Simple as that.

I use it to make a "Daily Photo" channel.

Usage

Dependencies are managed using pipenv.

You should set up your Telegram bot and invite it to your desired channel or group. Then you should pick up the chat id from https://api.telegram.org/YOUR_TOKEN/getUpdates

Define the following environment variables:

  • DAILY_PHOTO_DIRECTORY - The directory containing the photos
  • DAILY_PHOTO_BOT_TOKEN - The token of your bot
  • DAILY_PHOTO_CHAT_ID - The chat ID of the group, channel or chat
  • Optional DAILY_PHOTO_SENTRY_DSN - A DSN for Sentry

After the you can just run the app with pipenv run daily_photo. The app should send a single photo and then quit. You can use cron, systemd-timers or any other scheduler to run it periodically.