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/refEntry.ftl |   89 +++++++++++++-------------------------------
 1 files changed, 26 insertions(+), 63 deletions(-)

diff --git a/opendj-cli/src/main/resources/templates/refEntry.ftl b/opendj-cli/src/main/resources/templates/refEntry.ftl
index e44a803..a387603 100644
--- a/opendj-cli/src/main/resources/templates/refEntry.ftl
+++ b/opendj-cli/src/main/resources/templates/refEntry.ftl
@@ -1,4 +1,4 @@
-<#--
+////
  # The contents of this file are subject to the terms of the Common Development and
  # Distribution License (the License). You may not use this file except in compliance with the
  # License.
@@ -12,75 +12,38 @@
  # information: "Portions Copyright [year] [name of copyright owner]".
  #
  # Copyright 2015 ForgeRock AS.
- #-->
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  The contents of this file are subject to the terms of the Common Development and
-  Distribution License (the License). You may not use this file except in compliance with the
-  License.
+ # Portions ${year} 3A Systems LLC.
+ #
+////
 
-  You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
-  specific language governing permission and limitations under the License.
+[#${name}-1]
+= ${name}(1)
 
-  When distributing Covered Software, include this CDDL Header Notice in each file and include
-  the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
-  Header, with the fields enclosed by brackets [] replaced by your own identifying
-  information: "Portions Copyright [year] [name of copyright owner]".
+:doctype: manpage
+:manmanual: Directory Server Tools
+:mansource: OpenDJ
 
-  Copyright 2011-${year} ForgeRock AS.
--->
-<refentry xml:id="${name}-1"
-          xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="${locale}"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://docbook.org/ns/docbook
-                              http://docbook.org/xml/5.0/xsd/docbook.xsd"
-          xmlns:xlink="http://www.w3.org/1999/xlink"
-          xmlns:xinclude="http://www.w3.org/2001/XInclude">
+== Name
+${name} - ${shortDesc}
 
- <info>
-  <copyright>
-   <year>${year}</year>
-   <holder>2011-2017 ForgeRock AS. 2017-${year} Open Identity Platform Community</holder>
-  </copyright>
- </info>
+== Synopsis
+`${name}` <#if args??>`${args}`</#if>
 
- <refmeta>
-  <refentrytitle>${name}</refentrytitle><manvolnum>1</manvolnum>
-  <refmiscinfo class="software">OpenDJ</refmiscinfo>
-  <refmiscinfo class="version">${r"${project.version}"}</refmiscinfo>
- </refmeta>
+[#${name}-description]
+== ${descTitle}
 
- <refnamediv>
-  <refname>${name}</refname>
-  <refpurpose>${shortDesc}</refpurpose>
- </refnamediv>
+${description?ensure_ends_with(".")}
 
- <refsynopsisdiv>
-  <cmdsynopsis>
-   <command>${name}</command>
-   <#if args??><arg choice="plain">${args}</arg></#if>
-  </cmdsynopsis>
- </refsynopsisdiv>
+<#if info??>${info}</#if>
 
- <refsect1 xml:id="${name}-description">
-   <title>${descTitle}</title>
+<#if optionSection??>
+${optionSection}
+</#if>
 
-   <para>
-     ${description?ensure_ends_with(".")}
-   </para>
+<#if subcommands??>
+${subcommands}
+</#if>
 
-   <#if info??>${info}</#if>
- </refsect1>
-
- <#if optionSection??>
-   ${optionSection}
- </#if>
-
- <#if subcommands??>
-   ${subcommands}
- </#if>
-
- <#if trailingSectionString??>
-   ${trailingSectionString}
- </#if>
-</refentry>
+<#if trailingSectionString??>
+${trailingSectionString}
+</#if>

--
Gitblit v1.10.0