๐ค๐ Telegram bot to convert and email PDFs, EPUBs or MOBIs to your Kindle
@bookbrokerbot: Start a chat with the 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
.
The chat_id
identifies you on Telegram. You can get it by /start
ing a chat with @RawDataBot or some other ways. It can be a positive or negative number.
- Clone this repo:
git clone https://github.com/plibither8/bookbroker
- Install dependencies:
pnpm install
- Create
config.ts
and.env
files from their examples:cp config.example.ts config.ts
,cp .env.example .env
- Edit the
config.ts
and.env
file with your values
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
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