Skip to content

Commit 0144651

Browse files
committed
Add detailed example code and improve warnings
Fix #1
1 parent dc824ad commit 0144651

40 files changed

+3441
-46
lines changed

README.md

+23-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Moxygen
22

3-
Moxygen is a doxygen XML to markdown converter for developers who want a beautiful and minimal documentation solution for their C++ projects.
3+
Moxygen is a Doxygen XML to Markdown converter for C++ developers who want a minimal beautiful and documentation solution for their projects.
44

5-
The code is based on `doxygen2md` with extra options for generating output files, custom templates, and generating multipage documentation.
5+
The code is based on `doxygen2md` with extra options for generating output files, custom templates, and generating multi page documentation.
66

77
Moxygen is currently used in conjunction with GitBook to generate the API documentation for LibSourcey, which can be viewed [here](http://sourcey.com/libsourcey/).
88

@@ -21,20 +21,35 @@ Moxygen is currently used in conjunction with GitBook to generate the API docume
2121
-V, --version output the version number
2222
-v, --verbose verbose mode
2323
-a, --anchors add anchors to internal links
24-
-g, --modules output doxygen modules into separate files
24+
-g, --groups output doxygen modules into separate files
2525
-l, --language <lang> programming language
2626
-t, --templates <dir> custom templates directory
2727
-o, --output <file> output file (must contain %s when using modules)
2828
```
2929

30-
## Multipage Output
30+
## Multi Page Output
3131

32-
Moxygen supports the doxygen [modules](http://www.stack.nl/~dimitri/doxygen/manual/grouping.html#modules) syntax for generating multipage documentation.
33-
34-
Every [\defgroup](http://www.stack.nl/~dimitri/doxygen/manual/commands.html#cmddefgroup) in your source code will be parsed and output into a separate markdown file, with internal reference updated accordingly.
32+
Moxygen supports the doxygen [modules](http://www.stack.nl/~dimitri/doxygen/manual/grouping.html#modules) syntax for generating multi page documentation. iEvery [\defgroup](http://www.stack.nl/~dimitri/doxygen/manual/commands.html#cmddefgroup) in your source code will be parsed and output into a separate markdown file, with internal reference updated accordingly.
3533

3634
Example:
3735

3836
```
39-
moxygen --anchors --modules --output api-%s.md /path/to/doxygen/xml
37+
moxygen --verbose --anchors --modules --output api-%s.md /path/to/doxygen/xml
38+
```
39+
40+
## Example
41+
42+
To get a feel for how Moxygen works you can play with the example which is located in the `example` folder. The example contains:
43+
44+
* Documented C++ example code
45+
* A `Doxyfile` file (for doxygen 1.8.13)
46+
* Pre-generated XML output in `example/xml`
47+
* Pre-generated output Markdown files in `example/doc`.
48+
49+
The rebuild the example XML you can run `doxygen` from within the example folder.
50+
51+
Now you can build the example documentation with the following command from within the example folder:
52+
53+
```
54+
moxygen --verbose --groups --output=doc/api-%s.md xml
4055
```

bin/moxygen.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ program.version(pjson.version)
1111
.usage('[options] <doxygen directory>')
1212
.option('-v, --verbose', 'verbose mode', false)
1313
.option('-a, --anchors', 'add anchors to internal links', false)
14-
.option('-g, --modules', 'output doxygen modules into separate files', false)
14+
.option('-g, --groups', 'output doxygen modules into separate files', false)
1515
.option('-l, --language <lang>', 'programming language', String, 'cpp')
1616
.option('-t, --templates <dir>', 'custom templates directory', String, 'templates')
1717
.option('-o, --output <file>', 'output file (must contain %s when using modules)', String, 'api.md')
@@ -25,7 +25,7 @@ if (program.args.length) {
2525
app.run(assign({}, app.defaultOptions, {
2626
directory: program.args[0],
2727
anchors: program.anchors,
28-
modules: program.modules,
28+
groups: program.groups,
2929
language: program.language,
3030
templates: program.templates,
3131
output: program.output

0 commit comments

Comments
 (0)