itsallcode / openfasttrace

Open source requirement tracing suite
GNU General Public License v3.0
96 stars 21 forks source link

Support reading specification items from AsciiDoc files #410

Open sophokles73 opened 1 month ago

sophokles73 commented 1 month ago

The Eclipse uProtocol project would like to adopt OpenFastTrace. All of its requirements and design specifications are written in AsciiDoc.

It would be great, if we could keep these files and instead of moving all content to standard Markdown files, teach OpenFastTrace how to retrieve the information from the AsciiDoc content model.

I have already created a prototypical implementation of an AsciiDocImporter based on the asciidoctorj library, which recognizes some custom labels and tags on otherwise standard AsciiDoc blocks and creates SpecificationItems from them.

This approach is a little different from what I have seen in the other Importers which seem to be mostly based on RegEx matching. That is because the asciidoctorj library actually parses the content model of files and provides direct access to parts of the document.

Would you be interested in a PR for adding this functionality?

redcatbear commented 1 month ago

Hi @sophokles73. An AsciiDoc importer would be welcome of course. We are discussing loading that plugin at runtime, since we try to keep the core product free of external libraries (other than the JRE). The current plugin mechanism is not far away from being able to load plugins at startup, so that should be possible.

The reason for the current importer strategy was that this way we did not need to parse the whole file structure and did not need a Markdown library. For RST we did not even have a choice, since all RST libraries we found were not maintained properly.

sophokles73 commented 3 days ago

413 sounds interesting. Would this mean that the AsciiDoc Importer would/should not be contributed to OFT but instead live in a separate project/repo? Or would you rather have it in your code base but do not include it in the fat jar but maybe provide some extra or addon plugins as separate downloads/components?