# MARTe Auto Documentation Tool

This tool create a simple yet effective documentation of a MARTe configuration.
It generates graph for state machines and real time applications, with different level of details. 
Additionally create a markdown file with all the information condensed.

It automatically generate a standalone `html` and a `pdf` using `pandoc` (markdown to pdf/html) and `dot` (for generate the images for the graph).

It has only standard dependency and the only non standard are the ones needed for parsing the MARTe configurations file and are:
 - `pyjson` for `json` configuration files
 - `MARTe` for standard MARTe configuration files

In order to generate the `pdf` and `html` you will also need:
 - `dot`
 - `pandoc`

## Usage


```
ausage: autodoc [-h] [--type {json,marte}] [--loglevel {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [--build BUILD] [--version] [-d DESTINATION] filename

MARTe configuration auto documentation tool

positional arguments:
  filename              Configuration file to document

options:
  -h, --help            show this help message and exit
  --type {json,marte}   Configuration file type (default: `marte`)
  --loglevel {DEBUG,INFO,WARNING,ERROR,CRITICAL}
                        Logging level (default: `ERROR`)
  --build BUILD         build output flag
  --version             show program's version number and exit
  -d DESTINATION, --destination DESTINATION
                        Destination folderutodoc -
```

## Output Example

### HTML Output 

Html generate page:

![HTML output example](doc/images/html_example.png)

### Simplified State Graph

From the html page:

![Simplified example](doc/images/simplified_state.png)

### Full State Graph

Full details state graph `dot` file opened using **xdot**:

![Detaield state graph](doc/images/xdot_full.png)
