python课件 gitbook_gitbook2pdf:一个轻量级gitbook网页转pdf的小工具

Welcome to Gitbook2pdf

👋

Simple but powerful tools for converting gitbook pages to pdf.

Feature

Asynchronous grab Use aiohttp to grab Can be in a few seconds the data capture.

Grab the text can be replicated

Save the original directory structure

Retain the original hyperlinks

Completely retained the original format(Use js rendered unable to retain

🤷‍♂️

Smaller storage space, 800 pages of PDF file is only 4.6 MB

Sample files

Install

Notice!

Because it need to use weasyprint for pdf generation but pip can't complete weasyprint installation, so you need to install it manually. it's weasyprint install tutorial If you don't want install install dependencies you can use made of su Yang docker image

pip install -r requirements.txt

Usage

python gitbook.py {url}

Run tests

python gitbook.py http://self-publishing.ebookchain.org

Custom

Results generated by the CSS to define if you want to add other styles can modify gitbook.css.

Author

👤 fuergaosi233

Twitter: @fuergaosi

👤 LiaoChangjiang

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page.

Show your support

Give a

⭐️ if this project helped you!

warning

⚠️

Using weasyprint to generate pdf files will compare eating memory Please pay attention to whether your own memory is enough

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值