Skip to content

A script that converts an API documentation written in HTML into a JSON document

License

Notifications You must be signed in to change notification settings

hephaestus-compiler-project/doc2json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

doc2json

doc2json is a utility Python script that allows us you to convert API documentation pages (as those generated by automated tools, such as javadoc) into JSON document files. doc2json currently handles API docs generated by the following tools:

Installation

pip install .

Usage

doc2json --help
usage: doc2json [-h] [--language {java,kotlin,scala}] -o OUTPUT -i INPUT [--jdk-docs]

optional arguments:
  -h, --help            show this help message and exit
  --language {java,kotlin,scala}
                        Language associated with the given API docs
  -o OUTPUT, --output OUTPUT
                        Directory to output JSON files
  -i INPUT, --input INPUT
                        Input directory of API docs
  --jdk-docs            Indicate whether the documentation is related to JDK

Example

Parse documentation pages of the java.util Java package:

doc2json --language java -i examples/java/html-docs/java/util \
  -o json-docs --jdk-docs

The script above creates a directory named java-docs that contains all generated JSON documentents.

About

A script that converts an API documentation written in HTML into a JSON document

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages