Skip to content

Commit 677a0ff

Browse files
committed
Add README.md
1 parent 343bd50 commit 677a0ff

File tree

1 file changed

+136
-0
lines changed

1 file changed

+136
-0
lines changed

README.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Doxygen Plugin for DITA-OT [<img src="https://jason-fox.github.io/fox.jason.passthrough.doxygen/doxygen.png" align="right" width="300">](http://doxygendita-ot.rtfd.io/)
2+
3+
[![license](https://img.shields.io/github/license/jason-fox/fox.jason.passthrough.doxygen.svg)](http://www.apache.org/licenses/LICENSE-2.0)
4+
[![DITA-OT 3.5](https://img.shields.io/badge/DITA--OT-3.5-blue.svg)](http://www.dita-ot.org/3.5)
5+
[![Build Status](https://travis-ci.org/jason-fox/fox.jason.passthrough.doxygen.svg?branch=master)](https://travis-ci.org/jason-fox/fox.jason.passthrough.doxygen)
6+
[![Coverage Status](https://coveralls.io/repos/github/jason-fox/fox.jason.passthrough.doxygen/badge.svg?branch=master)](https://coveralls.io/github/jason-fox/fox.jason.passthrough.doxygen?branch=master)
7+
[![Documentation Status](https://readthedocs.org/projects/doxygendita-ot/badge/?version=latest)](https://doxygendita-ot.readthedocs.io/en/latest/?badge=latest)
8+
9+
This is a [DITA-OT Plug-in](https://www.dita-ot.org/plugins) used to auto-create valid DITA-based Doxygen documentation.
10+
The initial source of the documentation can be generated directly using the
11+
[Doxygen XML](http://www.doxygen.nl/manual/customize.html#xmlgenerator). The XML file can be added to the source and
12+
processed as if it had been written in DITA.
13+
14+
<details>
15+
<summary><strong>Table of Contents</strong></summary>
16+
17+
- [Background](#background)
18+
- [Install](#install)
19+
- [Installing DITA-OT](#installing-dita-ot)
20+
- [Installing the Plug-in](#installing-the-plug-in)
21+
- [Usage](#usage)
22+
- [License](#license)
23+
24+
</details>
25+
26+
## Background
27+
28+
[<img src="https://jason-fox.github.io/fox.jason.passthrough.doxygen/javalogo.png" align="right" height="55">](https://docs.oracle.com/javase/1.5.0/docs/guide/doxygen/index.html)
29+
30+
[Doxygen](http://www.doxygen.nl/manual/) is a tool that parses the declarations and
31+
documentation comments in a set of source files and produces a set of HTML pages describing the classes, interfaces,
32+
constructors, methods, and fields.
33+
34+
35+
#### Sample doxygen
36+
37+
```java
38+
/**
39+
* Effector is the interface for Casbin effectors.
40+
*/
41+
public interface Effector {
42+
/**
43+
* mergeEffects merges all matching results collected by the enforcer into a single decision.
44+
*
45+
* @param expr the expression of [policy_effect].
46+
* @param effects the effects of all matched rules.
47+
* @param results the matcher results of all matched rules.
48+
* @return the final effect.
49+
*/
50+
boolean mergeEffects(String expr, Effect[] effects, float[] results);
51+
}
52+
```
53+
54+
#### Sample DITA Output
55+
56+
> ![](https://jason-fox.github.io/fox.jason.passthrough.doxygen/doxygen-output.png)
57+
58+
## Install
59+
60+
The DITA-OT doxygen plug-in has been tested against [DITA-OT 3.x](http://www.dita-ot.org/download). The plugin requires
61+
the XSLT 3.0 support found in the [Saxon9.8HE](https://www.saxonica.com/html/download/java.html) library, so the mimimum
62+
DITA-OT version is therefore 3.3. It is recommended that you upgrade to the latest version.
63+
64+
### Installing DITA-OT
65+
66+
<a href="https://www.dita-ot.org"><img src="https://www.dita-ot.org/images/dita-ot-logo.svg" align="right" height="55"></a>
67+
68+
The DITA-OT doxygen plug-in is a file reader for the DITA Open Toolkit.
69+
70+
- Full installation instructions for downloading DITA-OT can be found
71+
[here](https://www.dita-ot.org/3.5/topics/installing-client.html).
72+
73+
1. Download the `dita-ot-3.5.zip` package from the project website at
74+
[dita-ot.org/download](https://www.dita-ot.org/download)
75+
2. Extract the contents of the package to the directory where you want to install DITA-OT.
76+
3. **Optional**: Add the absolute path for the `bin` directory to the _PATH_ system variable.
77+
78+
This defines the necessary environment variable to run the `dita` command from the command line.
79+
80+
```console
81+
curl -LO https://github.com/dita-ot/dita-ot/releases/download/3.5/dita-ot-3.5.zip
82+
unzip -q dita-ot-3.5.zip
83+
rm dita-ot-3.5.zip
84+
```
85+
86+
### Installing the Plug-in
87+
88+
- Run the plug-in installation commands:
89+
90+
```console
91+
dita install https://github.com/doctales/org.doctales.xmltask/archive/master.zip
92+
dita install https://github.com/jason-fox/fox.jason.passthrough/archive/master.zip
93+
dita install https://github.com/jason-fox/fox.jason.passthrough.doxygen/archive/master.zip
94+
```
95+
96+
The `dita` command line tool requires no additional configuration.
97+
98+
---
99+
100+
## Usage
101+
102+
To do generate Doxygen XML set `GENERATE_XML` to `YES`.
103+
104+
The XML output consists of an index file named `index.xml` which lists all items extracted by doxygen with references to the other XML files for details. The structure of the index is described by a schema file `index.xsd`. The Doxygen source should be concatenated into one single XML file using the instructions found in the XSLT file `combine.xslt`.
105+
106+
Once the source XML has been created, add it to the `*.ditamap` and mark it for **doxygen** processing, by labelling it
107+
with `format="doxygen"` within the `*.ditamap` as shown:
108+
109+
```xml
110+
<?xml version="1.0" encoding="UTF-8"?>
111+
<!DOCTYPE bookmap PUBLIC "-//OASIS//DTD DITA BookMap//EN" "bookmap.dtd">
112+
<bookmap>
113+
...etc
114+
<appendices toc="yes" print="yes">
115+
<topicmeta>
116+
<navtitle>Appendices</navtitle>
117+
</topicmeta>
118+
<appendix format="dita" href="topic.dita">
119+
<topicref format="doxygen" type="topic" href="doxygen.xml"/>
120+
</appendix>
121+
</appendices>
122+
</bookmap>
123+
```
124+
125+
The additional file will be converted to a `*.dita` file and will be added to the build job without further processing.
126+
Unless overridden, the `navtitle` of the included topic will be the same as root name of the file. Any underscores in
127+
the filename will be replaced by spaces in title.
128+
129+
## License
130+
131+
[Apache 2.0](LICENSE) © 2020 Jason Fox
132+
133+
The Program includes the following additional software components which were obtained under license:
134+
135+
- xmltask.jar - http://www.oopsconsultancy.com/software/xmltask/ - **Apache 1.1 license** (within
136+
`org.doctales.xmltask` plug-in)

0 commit comments

Comments
 (0)