v2.4 extended analysis render update

This commit is contained in:
2026-06-16 18:32:11 +02:00
parent ac05513b6c
commit a9d40aaf8c
15 changed files with 1661 additions and 39 deletions

View File

@@ -35,6 +35,9 @@ public class HtmlExporterCommand implements Callable<Integer> {
@Option(names = {"-i", "--input"}, description = "Input directory containing the Spring Boot project source code.")
private Path inputDir;
@Option(names = {"-j", "--json"}, description = "Input JSON file containing the state machine definition.")
private Path jsonFile;
@Option(names = {"-o", "--output"}, description = "Output directory for the generated portal.", defaultValue = "./out_html")
private Path outputDir;
@@ -58,29 +61,29 @@ public class HtmlExporterCommand implements Callable<Integer> {
var out = spec.commandLine().getOut();
var err = spec.commandLine().getErr();
if (inputDir == null) {
if (inputDir == null && jsonFile == null) {
inputDir = Path.of(".");
}
out.println(CommandLine.Help.Ansi.AUTO.string("@|bold,red Initializing Interactive Portal Generation...|@"));
out.println(CommandLine.Help.Ansi.AUTO.string("@|yellow Input Directory:|@ " + inputDir.toAbsolutePath()));
if (jsonFile != null) {
out.println(CommandLine.Help.Ansi.AUTO.string("@|yellow Input JSON File:|@ " + jsonFile.toAbsolutePath()));
} else {
out.println(CommandLine.Help.Ansi.AUTO.string("@|yellow Input Directory:|@ " + inputDir.toAbsolutePath()));
}
out.println(CommandLine.Help.Ansi.AUTO.string("@|yellow Output Directory:|@ " + outputDir.toAbsolutePath()));
if (flowsFile != null) {
out.println(CommandLine.Help.Ansi.AUTO.string("@|yellow Custom Flows:|@ " + flowsFile.toAbsolutePath()));
}
if (machineFilter != null) {
out.println(CommandLine.Help.Ansi.AUTO.string("@|yellow Machine Filter:|@ " + machineFilter));
}
try {
// Force HTML and JSON formats for the interactive portal
List<String> formats = List.of("html", "json");
List<String> profiles = activeProfiles != null ? activeProfiles : java.util.Collections.emptyList();
boolean renderChoicesAsDiamonds = !noDiamonds;
exportService.runExporter(inputDir, outputDir, formats, renderChoicesAsDiamonds,
activeProfiles != null ? activeProfiles : java.util.Collections.emptyList(),
flowsFile, machineFilter);
if (jsonFile != null) {
exportService.runJsonExporter(jsonFile, outputDir, formats, profiles);
} else {
boolean renderChoicesAsDiamonds = !noDiamonds;
exportService.runExporter(inputDir, outputDir, formats, renderChoicesAsDiamonds, profiles, flowsFile, machineFilter);
}
out.println(CommandLine.Help.Ansi.AUTO.string("%n@|bold,green SUCCESS:|@ Interactive documentation generated successfully."));