mrt-gen

Code Templates

mrt-gen is a tool used to create common project components. By default it creates plain .h/.c files

mrt-gen src/test

This creates src/test.h and src/test.c. Adding ‘-t cpp’ will create src/test.h and src/test.cpp

Creating Sphinx documentation

If a --type is not specified, and the path ends with docs, it will create a docs folder with a sphinx template.

mrt-gen ./docs
docs
├── Makefile
├── assets
│   └── diagrams
│       └── samplediagram.dio.png
├── conf.py
├── index.rst
└── pages
    └── samplepage.rst

This can be used to generate an html or pdf version of the documentation

cd docs
make latexpdf
make html

MrT Module Template

using the -m flag will create an MrT submodule with the required items.

mrt-gen -m mymodule
└── mymodule
    ├── README.rst
    ├── mrt.yml
    ├── mymodule.c
    ├── mymodule.h
    └── mymodule_UT.cpp