From c19cb1ec29359a2f63f32753c54b837cb6998187 Mon Sep 17 00:00:00 2001
From: Maxim Thomas <maxim.thomas@gmail.com>
Date: Tue, 01 Oct 2024 09:20:54 +0000
Subject: [PATCH] Generate man pages in the AsciiDoc format (#418)

---
 opendj-cli/src/main/resources/templates/refSect2.ftl |   71 +++++++++++++++--------------------
 1 files changed, 30 insertions(+), 41 deletions(-)

diff --git a/opendj-cli/src/main/resources/templates/refSect2.ftl b/opendj-cli/src/main/resources/templates/refSect2.ftl
index 4dcba4e..fd1973a 100644
--- a/opendj-cli/src/main/resources/templates/refSect2.ftl
+++ b/opendj-cli/src/main/resources/templates/refSect2.ftl
@@ -12,54 +12,43 @@
  # information: "Portions Copyright [year] [name of copyright owner]".
  #
  # Copyright 2015 ForgeRock AS.
+ # Portions Copyright 2024 3A Systems LLC.
  #-->
-<refsect2 xml:id="${id}">
-  <title>${name}</title>
 
-  <para>
-   ${description?ensure_ends_with(".")}
-  </para>
+[#${id}]
+=== ${name}
 
-  <#if info??>${info}</#if>
+${description?ensure_ends_with(".")}
 
-  <#if options??>
-    <refsect3 xml:id="${id}-options">
-      <title>${optionsTitle}</title>
+<#if info??>${info}</#if>
 
-      <variablelist>
-        <para>
-         ${optionsIntro}
-        </para>
+<#if options??>
+[#${id}-options]
+==== ${optionsTitle}
 
-        <#list options as option>
+--
 
-          <varlistentry>
-            <term><option>${option.synopsis?xml}</option></term>
-            <listitem>
-             <para>
-               ${option.description?ensure_ends_with(".")}
-             </para>
+<#list options as option>
+`${option.synopsis?xml}`::
+${option.description?ensure_ends_with(".")}
+<#if option.info??>
++
+<#if option.info.usage??>${option.info.usage}</#if>
+<#if option.info.default??>
++
+${option.info.default}
+</#if>
+<#if option.info.doc??>
++
+${option.info.doc}
+</#if>
+</#if>
+</#list>
 
-             <#if option.info??>
-               <#if option.info.usage??>${option.info.usage}</#if>
+--
 
-               <#if option.info.default??>
-                  <para>
-                    ${option.info.default}
-                  </para>
-               </#if>
+</#if>
 
-               <#if option.info.doc??>${option.info.doc}</#if>
-             </#if>
-            </listitem>
-          </varlistentry>
-
-        </#list>
-      </variablelist>
-    </refsect3>
-  </#if>
-
-  <#if propertiesInfo??>
-    ${propertiesInfo}
-  </#if>
-</refsect2>
+<#if propertiesInfo??>
+${propertiesInfo}
+</#if>

--
Gitblit v1.10.0