Giter Club home page Giter Club logo

gitbook2pdf's Introduction

Welcome to Gitbook2pdf 👋

Twitter: fuergaosi

Simple but powerful tools for converting gitbook pages to pdf.

🏠 Homepage

Python 3.6 English 中文

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

KubernetesHandbook.pdf

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

🤝 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

gitbook2pdf's People

Contributors

dependabot[bot] avatar feeeei avatar fuergaosi233 avatar imzhi avatar liaochangjiang 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.