gitbook2pdf:一个轻量级gitbook网页转pdf的小工具
gitbook2pdf:一个轻量级gitbook网页转pdf的小工具
Python 其它杂项
共525Star
详细介绍
👋
Welcome to Gitbook2pdf
Simple but powerful tools for converting gitbook pages to pdf.
🏠
Homepage
Feature
-
Asynchronous grab Use
aiohttp
to grab Can be in a few seconds the data capture. -
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
- Twitter: @fuergaosi
👤 LiaoChangjiang
🤝
Contributing
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Show your support
Give a
⚠️
warning
Using weasyprint
to generate pdf files will compare eating memory Please pay attention to whether your own memory is enough
-
44 Star
-
0 Star
-
164 Star
-
0 Star
-
8 Star
-
1745 Star
-
0 Star
-
4716 Star
-
141 Star
-
581 Star