Yacent/ReactTutorialInPDF

convert the tutorial on html in PDF

★ 0Forks 0CSSGitHub ↗Compare

README

React doc in PDF

Introduction

This is a project that transfer the tutorial doc to pdf

Since I usually use the mobile phone to read or learn the tutorial of React. I should load the page each time but I am lack of network flow. So I want to change it to the local pdf and I can read or learn everywhere.

Requirements

Platforms

  • Ubuntu(better)

Python version

  • 2.7.*

Doc

  • http://cuiqingcai.com/1052.html (转载自 静觅: Python爬虫学习系列教程) Before you start this project, Please confirm that you have the basic knowleage of Internet worm.

Solution Step

  1. Fetch the tutorial page of React
  2. get the nav-side ul list into an array
  3. send request according to the array, fetch the page and write into a page
  4. convert the page.html with weasyprint into PDF

Dependencies

  • Requests
    • send http request
  • beautifulsoup4
    • build the node tree of page
  • lxml
    • HTML parsing engine
  • phantomjs
    • a headless Webkit scriptable with a JavaScript API
    • fast and native
  • selenium
    • webdriver
  • weasyprint
    • convert html/css documents to PDF

License

MIT

Contributors

Yacent

Issues