View on GitHub

cpp-docs-printer

Generates PDF documents from the C++ documentation

Download this project as a .zip file Download this project as a tar.gz file

cpp-docs-printer

. license

Generates PDF documents from the HTML C++ documentation

Setup

Linux:

Cloning the repository:

#clone the repo
$git clone https://github.com/animesh-chouhan/cpp-docs-printer.git
$cd cpp-docs-printer

Installing the dependencies:

#install python3-pip
$sudo apt-get install python3-pip

#requests
$sudo pip3 install requests 

#beautifulsoup4
$sudo pip3 install beautifulsoup4

#weasy-print
$sudo apt-get install build-essential python3-dev python3-pip python3-setuptools python3-wheel python3-cffi libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev shared-mime-info
$sudo pip3 install WeasyPrint

Running the python script:

$python3 cplusplus.py http://www.cplusplus.com/reference/cstdio/

Usage example

Sample C++ documentation http://www.cplusplus.com/reference/cstdio/:

Sample pdf generated pdf:

The generated .html and .pdf files are located in the html and pdf folders respectively.

For more examples and usage, please refer to the Wiki.

Built with

Contributing

  1. Fork the repo (https://github.com/animesh-chouhan/cpp-docs-printer/)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

License

MIT License copyright (c) 2020 Animesh Singh Chouhan. Please have a look at the license for more details.