Skip to content

A telegram bot which offers you all features of ilovepdf.com

License

Notifications You must be signed in to change notification settings

brivadeneira/ilovepdfbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Bot License: MIT Open Source Love svg1

forthebadge made-with-python ForTheBadge built-with-love

ilovepdfbot

A telegram bot which offers you all features of ilovepdf!

Table of contents

Features

  • /compress to compress a PDF file
  • /imgtopdf to convert one or more images to a PDF file
  • /officetopdf to convert an office file to a PDF file
  • /addpagenumbers to add numbers to the pages of a PDF file
  • /pdfa to convert a PDF file to PDF/A standard
  • /pdftojpg to convert each page of a PDF file to jpg images
  • /protectpdf to protect a PDF file using a password
  • /rotatepdf to rotate (90, 180 degrees) a PDF file
  • /splitpdf to split a PDF file according to a range
  • /unlockpdf to unlock a protected PDF file
  • /watermark to apply a watermark to a PDF file

Installation

1. Clone the repository

$ git clone https://github.com/brivadeneira/ilovepdfbot
$ cd ilovepdfbot

2. Install the requirements using pip

pip install -r requirements.txt

3. Copy and edit the .env file:

$ cp .env.example .env

3.1 Get the Telegram bot token

Alright, a new bot. How are we going to call it? Please choose a name for your bot.

  • Enter your bot name

Done! Congratulations on your new bot. You will find it at t.me/<your_bot_name>. You can now add a description, about section and profile picture for your bot, see /help for a list of commands. By the way, when you've finished creating your cool bot, ping our Bot Support if you want a better username for it. Just make sure the bot is fully operational before you do this.

Use this token to access the HTTP API: 1234567890:ABCDeFGhij1k2lMNoPpQ3rstUVWwxYZ4ABB Keep your token secure and store it safely, it can be used by anyone to control your bot.

For a description of the Bot API, see this page: https://core.telegram.org/bots/api

  • Copy the bot API into the .env file

3.2 Get the ilovepdf API key

  • Go to ilovepdf.com and sing up.
  • Go to developer.ilovepdf.com (in the rigth pannel click in products and click in API Rest)
  • Go to developer.ilovepdf.com/user/projects (or click in get started, click in Projects - My projects)
  • Create a new project
  • Copy the API key
    • project_public_1a234567b890c12ab3c4de56f7g8h9i0_-Jkl- 12m34no5678p9q01rs23t45u678v9wx0
  • Edit .env file and add the keys

$ nano .env

BOT_TOKEN=1234567890:ABCDeFGhij1k2lMNoPpQ3rstUVWwxYZ4ABB
PUBLIC_KEY=project_public_1a234567b890c12ab3c4de56f7g8h9i0_-Jkl-
12m34no5678p9q01rs23t45u678v9wx0

4. Create a tmp directory

To temporary storage user files
$ mkdir tmp

Usage

$ python bot.py

2021-01-15 12:12:28,184 - apscheduler.scheduler - INFO - Scheduler started

TODO

  • Add a spanish version.
  • Fix unlock feature.
  • Add sign feature (probably inside watermark feature)

License

License: MIT

Credits

ilovepdfbot is alive thanks to:

Who has made pylovepdf

About

A telegram bot which offers you all features of ilovepdf.com

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published