Coder Social home page Coder Social logo

lbs125 / ebook-sender-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from qcgzxw/ebook-sender-bot

0.0 0.0 0.0 129 KB

Send ebook to kindle with Telegram Bot

Home Page: https://t.me/e_book_send_bot

License: GNU General Public License v3.0

Shell 0.92% Python 96.58% Dockerfile 2.50%

ebook-sender-bot's Introduction

English | 简体中文

ebook-sender-bot

Send E-Book to kindle with Telegram Bot.

Try it: https://t.me/e_book_send_bot

We wanted to let you know that starting August 2022, you’ll no longer be able to send MOBI (.mobi, .azw) files to your Kindle library. Any MOBI files already in your library will not be affected by this change. MOBI is an older file format and won’t support the newest Kindle features for documents. Any existing MOBI files you want to read with our most up-to-date features for documents will need to be re-sent in a compatible format.

Compatible formats now include EPUB (.epub), which you can send to your library using your Send to Kindle email address. We’ll also be adding EPUB support to the free Kindle app for iOS and Android devices and the Send to Kindle desktop app for PC and Mac.

Usage

  1. Open bot link:https://t.me/e_book_send_bot
  2. Send /email [email protected] to set your kindle email address.
  3. Add bot email to your Approved Personal Document E-mail.
  4. Send a supported document to this bot and check your Kindle.

Support document format

send directly

  • doc
  • docx
  • rtf
  • html
  • htm
  • pdf
  • epub

convert to epub and send

  • azw
  • azw1
  • azw3
  • azw4
  • fb2
  • lrf
  • kfx
  • pdb
  • lit
  • txt
  • mobi

Setup

[recommended] docker-compose install

docker-compose.yml

docker-compose up -d

[recommended] docker install

docker run -d \
    --restart unless-stopped \
    --name ebook-sender-bot \
    -e TZ=Asia/Shanghai \
    -e APP_MODE=prod \
    -e MAX_SEND_LIMIT=10 \
    -e FORMAT=epub \
    -e EMAIL_PROVIDER=config \
    -e SMTP_HOST={YOUR_SMTP_HOST} \
    -e SMTP_PORT={YOUR_SMTP_PORT} \
    -e SMTP_USERNAME={YOUR_SMTP_USERNAME} \
    -e SMTP_PASSWORD={YOUR_SMTP_PASSWORD} \
    -e BOT_TOKEN={YOUR_BOT_TOKEN} \
    -e DEVELOPER_CHAT_ID={YOUR_TELEGRAM_CHAT_ID} \
    -v `./ebooks/`:`/app/storage/` \
    -v `./default.log`:`/app/default.log` \
    qcgzxw/ebook-sender-bot

source install

  1. copy config.ini.example to config.ini
  2. install requirements
pip3 install -r requirments.txt
  1. install calibre
  2. run main.py
python3 main.py

config.ini

[default]
# mode: [dev] printf runtime log to console 
mode=dev
# Set a daily limit of e-mailing per user
email_send_limit=10
# database: sqlite,mysql,postgresql
database=sqlite
# email_provider: config,mailcow,mailcow_alias
email_provider=config

# when database is sqlite
[sqlite]
name=ebook-sender-bot

# when database is mysql
[mysql]
name=ebook-sender-bot
host=192.168.1.1
port=3306
user=root
password=root

# when database is postgresql
[postgresql]
name=ebook-sender-bot
host=192.168.1.1
port=5432
user=root
password=root

[smtp]
host=smtp.gmail.com
port=465
username=your_email_address
password=your_email_account_password

# when email_provider is mailcow or mailcow_alias
[provider]
mailcow_url=your_mailcow_url
mailcow_api_key=mailcow_admin_api_key
mailcow_mailbox_domain=mailcow_mailbox_domain

[telegram]
# telegram tg_bot token
bot_token=your_telegram_bot_token
# your telegram chat id
developer_chat_id=your_telegram_chat_id

Preview

telegram-bot kindle

Donate

👉Buy me a beer

👉Buy me a vps

👉Buy me a keyboard

Todo

  • docker
  • Send document to kindle email
  • mysql
  • document information
  • covert books with calibre
  • use configParse instead of os.getenv()
  • i18n
  • telegram MessageReply class
  • admin command
  • unique email
  • queue
  • test case

ebook-sender-bot's People

Contributors

qcgzxw avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.