Giter Site home page Giter Site logo

jovengeek / cppreference2mshelp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from myfreeer/cppreference2mshelp

0.0 0.0 0.0 60.08 MB

cppreference.com html archive converter to microsoft help (for Visual Studio 2012+) and chm help (for Windows)

Home Page: https://zh.cppreference.com

License: MIT License

Batchfile 0.56% PowerShell 0.50% PHP 20.38% CSS 73.84% Shell 4.72%

cppreference2mshelp's Introduction

cppreference2mshelp

cppreference.com html archive converter to microsoft help (for Windows Visual Studio 2012+) and good old .chm help (for any Windows and even some other platforms)

Badges

Downloads Latest Release Latest Release GitHub license

Prerequires:

  1. Windows x64 (LOL, I'm mad). Actually any system will be ok, you should use another tools in this case to make cab file, zip file and digitally sign cab (for Visual Studio Help). However there is no alternative for HTML Help Workshop from Microsoft (for chm based help).
  2. php at least 5.6.1
  3. cppreference.com offline archive (Html book) downloaded from this link: http://en.cppreference.com/w/Cppreference:Archives
  4. HTML Help Workshop from Microsoft to build .chm help file.
  5. Tidy (html fixer), signtool.exe and makecab.exe from Microsoft SDK to build Visual Studio help files.
  6. digital certificate to sign cabs for Visual Studio Help (because unsigned cabs will not be installed) CHM help does not require certificate
  7. msys2 latest with pacman -S p7zip mingw-w64-x86_64-python3-pip mingw-w64-x86_64-python3-lxml
  8. GNU libiconv 1.15 or later (pacman -S mingw-w64-x86_64-iconv)
  9. pip3 install premailer and pacman -S mingw-w64-x86_64-python3-qt for qch help

Ok, what's inside?

compile_c.cmd and compile_cpp.cmd - main command files that do the all job. Use compile_c.cmd for c documentation and compile_cpp.cmd for c++ documentation.

compile_c_zip.ps1 and compile_cpp_zip.ps1 - uses powershell to make zip files.

config.txt - config for a great tool tidy: http://www.html-tidy.org/ ( we need it to convert htmls to xhtmls and fix errors ).

cppreference.msha and creference.msha - config files for Microsoft Help System. Actually a headers for Help system, Microsoft Help will get the info from them to install the help packs.

make_xhtmls.php - ugly php preprocessor script that fixes and converts thousands of htmls from cppreference to xhtml and Microsoft Help format.

make_chm.php - another ugly script that makes chm help files: cppreference.hhc - table of contents, cppreference.hhk - keywords index and Html Help project file - cppreference.hhp (for both c and c++). Launch this script directly to make chm help file.

makecab.exe - tool to make a cab file for Microsoft Help System. Can be found in Microsoft SDK.

signtool.exe - tool to sign cab files. Can be found in Microsoft SDK.

tidy.exe and tidy.dll - tool to convert html to xhtml and fix many other problems. Can be downloaded here: http://www.html-tidy.org/

Step-by-step instructions for Microsoft Help Files for Visual Studio:

  1. download cppreference.com offline archive and unpack it. Only Html book format is acceptable.
  2. download this repo and unpack it to the reference folder inside unpacked archive (from cppreference.com).
  3. folders structure should be like this one:

screenshot

Folders common and en is from archive from cppreference, all other folders is owned by script.

  1. now you can start the scripts and build the documentation (200+ seconds for c++ documentation 4000 files and a lot less for c documentation).

  2. In result you should have two new files in this folder: cppreference.cab and creference.cab - use them with appropriate cppreference.msha and creference.msha files to install created help files.

Note: This repo contains pre-build and signed files that are ready to install into Visual Studio 2012, Visual Studio 2013 (maybe 2015 and 2017 too - I can't test it right now - let me know if you'll do ).

Note: If you want to build chm help file, launch make_chm.php. Pre-built cppreference.chm file is also included into this repo.*

Note: HTML Help Workshop will not work correctly if you will not associate .hhp files with it (a project file of HHW), you'll receive a lot Errors "HHC5003"

Enjoy!

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.