Command line interface
The Doctools bundles a command line interface called adoc meant to ease both
continuous integration and local builds of the documentation.
Below, it is briefly described each command, and it is worth noting that every
command supports the --help option for quick look up.
Custom Doc
Generates custom documents with filtered content from all documentations of the watched repositories (see adi_doctools/lut.py).
For PDF output, WeasyPrint is used (ensure to install it).
To quick start, run the tool twice in an empty directly.
~$
cd /tmp
/tmp$
adoc custom-doc --directory my_doc --builder pdf
Configuration file doc.yaml not found, created template at:
/tmp/my_doc/doc.yaml
Update it with the desired sources and rerun the tool.
/tmp$
adoc custom-doc --directory my_doc --builder pdf
[ build output ]
The doc.yaml file is a concise human readable markup file to set the desired content and some other options. Running the tool in a directory without the doc.yaml will instantiate a template and return. If the necessary repositories are not found, the tool will clone for you.
In general, you can first clone and checkout your current work and then run the tool, to build the doc with your own changes.
Some documentations depend on auto generated sections and extra features, use
the --extra option to enable those; it considers that the environment has all
the tools needed, for example, vivado is accessible for the HDL documentation.
See adi_doctools/cli/custom-doc.py to understand how the extra steps are
included, but in summary, they are just a sequence of bash commands wrapped on python.
For all options, do:
~$
adoc custom-doc --help
Aggregate
Tip
This feature is useful to batch build/test all tracked documentations.
Generates all documentations of the watched repositories (see adi_doctools/lut.py).
Two generation strategies are available:
monolithic: patches all docs together into a single monolithic output (default).
symbolic: generate each doc independently, just save them together (
--symbolic).
For the monolithic output, do:
~$
adoc aggregate --directory output
Some documentations depend on auto generated sections and extra features, use
the --extra option to enable those; it considers that the environment has all
the tools needed, for example, vivado is accessible for the HDL documentation.
See adi_doctools/cli/aggregate.py to understand how the extra steps are
included, but in summary, they are just a sequence of bash commands wrapped on python.
For all options, do:
~$
adoc aggregate --help
HDL Render
Exposes the HDL component diagram generator as a CLI. It converts IP-XACT files into SVGs.
To generate and open the diagram, provide the path containing the IP-XACT and use
the --open option:
~$
adoc hdl-render --input PATH --open
For example:
~$
adoc hdl-render --input hdl/library/axi_dmac --open
For all options, do:
~$
adoc hdl-render --help