Code Monkey home page Code Monkey logo

jd2chm's Introduction

jd2chm (Javadoc to CHM)

jd2chm is a Python application that creates a set of Microsoft Compiled HTML (CHM) project files from an existing Javadoc API documentation.

After generating the project files, it invokes the HTML Help compiler. The HTML Help Compiler is a prerequisite to generate the final CHM file.

j2dchm was tested with Python 3.5.2.

Note: jd2chm was initially created in 2001 and ended up targeting Python 2.2 and 2.3 in 2004. I decided to "brush" it again in order to make it compatible with Python 3 and to generate CHM files from recent Javadocs (i.e. Java 8 API).

HTML Help Compiler

The HTML Help Compiler might already be installed on your Windows System. The presence of the HTML Help compiler can be tested with jd2chm with option -c.

The HTML Help Compiler is available at: https://msdn.microsoft.com/en-us/library/windows/desktop/ms669985(v=vs.85).aspx

CHM Project Files

jd2chm creates the following HTML Help project files:

  • HHP: HTML Help Project file
  • HHC: HTML Help Contents file
  • HHK: HTML Help Keywords file

CHM File

A CHM generated with jd2chm will look similar to the following one (Groovy 2.5.0):

jd2chm

Usage of jd2chm

  • Clone jd2chm:
> git clone https://github.com/andreburgaud/jd2chm.git
  • In the newly created jd2chm directory, create a Python virtual environment:
> py -m venv ENV
  • Activate the virtual environment:
> ENV\Scripts\activate
(ENV) >
  • Install 3rd party libraries
(ENV) > pip install -r requirements.txt
  • Execute jd2chm with -h option to ensure it works:
(ENV) > python jd2chm.py -h

                         jd2chm version 1.0.0b1
                 Copyright (c) 2001-2016 Andre Burgaud
                        http://www.burgaud.com/

Usage:

  jd2chm.py [ -h | -c | -l | [-p path] [-o output] [-t title] [-v] ]

  -h: Displays usage.
  -c: Checks if the HHC compiler is installed.
  -l: Displays license.
  -v: Verbose (displays debug information)
  -p path:   'path' is the directory containing a Javadoc
             documentation (default: current directory).
  -o output: base name of the CHM output file
             Ex.: -o 'product' will result in a CHM file named 'product.chm'.
  -t title:  Assign 'title' as the title of the project.

Notes:
- The user is prompted if the project name and document title are not
  provided at the command line. The default values are extracted from
  the Javadoc index.html (see examples below).
- The Javadoc directory is the directory containing the file index.html.

Examples:
jd2chm.py -p C:\beanshell\javadoc
  The user is prompted to possibly modify the default values for the
  project name and document title.

jd2chm.py -p C:\beanshell\javadoc -o bsh20b4 -t "Beanshell 2.0b4" -v

jd2chm.py -p C:\j2se\docs\api -o j2se142_02 -t "Java(TM) 2 SDK 1.4.2"

jd2chm.py -o jython21 -t "Jython 2.1"
  The Javadoc is assumed to be in the current directory.

jd2chm.py -o SWT30M7 -t "Standard Widget toolkit 3.0M7"
  The Javadoc is assumed to be in the current directory.

Operating Systems

jd2chm is intended to run on Windows, nevertheless, the generated CHM files can be viewed on other OS (i.e. Linux and Mac OSX).

jd2chm's People

Contributors

andreburgaud avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

cvogt qlw caiyuchao

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.