zeshuaro / telegram-pdf-bot

A Telegram bot that can do a lot of things related to PDF files
https://t.me/pdfbot
GNU Affero General Public License v3.0
195 stars 97 forks source link
bot pdf-manipulation python python-telegram-bot telegram telegram-bot telegram-pdf-bot

Telegram PDF Bot

Telegram Bot MIT License GitHub Actions codecov Codacy Badge Ruff Crowdin Telegram Channel Mentioned in Awesome Telegram

Github-sponsors BuyMeACoffee Ko-Fi LiberaPay Patreon PayPal

A Telegram bot that can:

DigitalOcean Referral Badge

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes

Setup Database

The bot uses Datastore on Google Cloud Platform (GCP). Create a new project on GCP and enabble Datastore in the project. Install the gcloud CLI and run gcloud init to initialise it with your project.

OS Requirements

Ubuntu

apt-get install poppler-utils libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev shared-mime-info

macOS

brew install libxml2 libxslt poppler cairo pango gdk-pixbuf libffi

Install dependencies

This project uses Poetry as the dependency manager, run the following command to install the dependencies:

poetry install --no-root

Compile the translation files

Run the following command to compile all the translation files:

pybabel compile -D pdf_bot -d locale/

Setup Your Environment Variables

Copy the .env example file and edit the variables within the file:

cp .env.example .env

Running The Bot

You can then start the bot with the following command:

python -m pdf_bot