A Telegram bot that can:
- Compress, crop, decrypt, encrypt, merge, preview, rename, rotate, scale and split PDF files
- Compare text differences between two PDF files
- Create PDF files from text messages
- Add watermark to PDF files
- Add text layers to PDF files to make them searchable with text
- Extract images and text from PDF files
- Convert PDF files into images
- Beautify handwritten notes images into PDF files
- Convert webpages and images into PDF files
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes
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.
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
Create a virtual environment with the following command:
virtualenv venv
source venv/bin/activate
Run the following command to install the required packages:
pip install -r requirements.txt
Run the following command to compile all the translation files:
pybabel compile -D pdf_bot -d locale/
Copy the .env
example file and edit the variables within the file:
cp .env.example .env
You can then start the bot with the following command:
python bot.py