Skip to content

πŸ€–πŸ“š Telegram bot to convert and email PDFs, EPUBs or MOBIs to your Kindle

License

Notifications You must be signed in to change notification settings

plibither8/bookbroker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

91eb847 Β· Sep 16, 2022

History

26 Commits
Jan 22, 2022
Jul 19, 2021
Sep 16, 2022
Jan 22, 2022
Jul 14, 2021
Jan 22, 2022
Jul 14, 2021
Jan 22, 2022
Jan 22, 2022
Jan 22, 2022
Jun 28, 2022
Jun 28, 2022
Jan 22, 2022

Repository files navigation

bookbroker

πŸ€–πŸ“š Telegram bot to convert and email PDFs, EPUBs or MOBIs to your Kindle

@bookbrokerbot: Start a chat with the bot!

Self-host

Create a Telegram Bot

You would first need to create a Telegram bot and get the bot's access token. Fortunately, it's pretty simple and easy: you can create one with @BotFather.

Make sure to take note of the token received! It should look like this: 3141592653:KAS_JFD04YEGFxbQV4FTPetQpZefUhr37HC.

Get your Telegram Chat ID

The chat_id identifies you on Telegram. You can get it by /starting a chat with @RawDataBot or some other ways. It can be a positive or negative number.

Setup the Server

  1. Clone this repo: git clone https://github.com/plibither8/bookbroker
  2. Install dependencies: pnpm install
  3. Create config.ts and .env files from their examples: cp config.example.ts config.ts, cp .env.example .env
  4. Edit the config.ts and .env file with your values

Development

Install ngrok: ngrok.com.

The project uses ngrok, nodemon and ts-node for local development. Do make sure to have ENVIRONMENT="dev" in your local .env file.

The domain used in development is provided by ngrok, thus the local config can leave the domain key empty.

$ pnpm dev

Production

The project uses tsc to build the files. On production, the webhook domain is determined by the the domain key in the config.ts file.

$ pnpm build
$ pnpm run

License

MIT

About

πŸ€–πŸ“š Telegram bot to convert and email PDFs, EPUBs or MOBIs to your Kindle

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published