sphinx-traceability-extension
sphinx-traceability-extension copied to clipboard
Item matrix templates
As in #9, apply templates also to the item-matrix
nodes, so that the whole table format can be customized, even not being presented as a table.
One of the consequences of using templates for item-matrix
is that the item-list
directive would be no longer necessary, as a particular template could be defined to show only one part of a traceability matrix as a list. This would also allow more complex lists, such as lists with sublists.
Template would not only have as input the related items, but also the implied relationships, so that relationships could be also shown in the output.
Example template: item matrix as is generated now:
.. list-table:: {{ title }}
:header-rows: 1
* - Source
- Target
{% for line in table %}
* - {{ line.source }}
- {{ line.target }}
{% endfor %}
Another benefit is that this way, table generation code would be much, much simpler.
I would also be greatly interested in this feature. Let me know, if I can give you some assistance.