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/dscfgSubcommand.ftl | 108 ++++++++++++++++++++----------------------------------
1 files changed, 40 insertions(+), 68 deletions(-)
diff --git a/opendj-cli/src/main/resources/templates/dscfgSubcommand.ftl b/opendj-cli/src/main/resources/templates/dscfgSubcommand.ftl
index cfdd01d..5c134c7 100644
--- a/opendj-cli/src/main/resources/templates/dscfgSubcommand.ftl
+++ b/opendj-cli/src/main/resources/templates/dscfgSubcommand.ftl
@@ -1,6 +1,5 @@
${marker}
-<?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.
@@ -13,85 +12,58 @@
Header, with the fields enclosed by brackets [] replaced by your own identifying
information: "Portions Copyright [year] [name of copyright owner]".
- Copyright 2011-${year} ForgeRock AS.
--->
-<refentry xml:id="${id}"
- 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">
+ Copyright 2011-2017 ForgeRock AS.
+ Portions Copyright ${year} 3A Systems LLC.
+////
- <info>
- <copyright>
- <year>${year}</year>
- <holder>2011-2017 ForgeRock AS. 2017-${year} Open Identity Platform Community</holder>
- </copyright>
- </info>
+[#${id}]
+= ${name}(1)
+:doctype: manpage
+:manmanual: Directory Server Tools
+:mansource: OpenDJ
- <refmeta>
- <refentrytitle>${name}</refentrytitle><manvolnum>1</manvolnum>
- <refmiscinfo class="software">OpenDJ</refmiscinfo>
- <refmiscinfo class="version">${r"${project.version}"}</refmiscinfo>
- </refmeta>
+== Name
+${name} - ${purpose}
- <refnamediv>
- <refname>${name}</refname>
- <refpurpose>${purpose}</refpurpose>
- </refnamediv>
+== Synopsis
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>${name}</command>
- <arg choice="plain">${args}</arg>
- </cmdsynopsis>
- </refsynopsisdiv>
+`${name}` ${args}
- <refsect1 xml:id="${id}-description">
- <title>${descTitle}</title>
+[#${id}-description]
+== ${descTitle}
- <para>
- ${description?ensure_ends_with(".")}
- </para>
+${description?ensure_ends_with(".")}
- <#if info??>${info}</#if>
- </refsect1>
+<#if info??>${info}</#if>
- <#if options??>
- <refsect1 xml:id="${id}-options">
- <title>${optionsTitle}</title>
+<#if options??>
+[#${id}-options]
+== ${optionsTitle}
- <variablelist>
- <para>
- ${optionsIntro}
- </para>
+${optionsIntro}
+--
<#list options as option>
- <varlistentry>
- <term><option>${option.synopsis?xml}</option></term>
- <listitem>
- <para>
- ${option.description?ensure_ends_with(".")}
- </para>
+`${option.synopsis?xml}`::
+${option.description?ensure_ends_with(".")}
<#if option.info??>
- <#if option.info.usage??>${option.info.usage}</#if>
-
- <#if option.info.default??>
- <para>
- ${option.info.default}
- </para>
+ <#if option.info.usage??>
++
+${option.info.usage}
</#if>
-
- <#if option.info.doc??>${option.info.doc}</#if>
+ <#if option.info.default??>
++
+${option.info.default}
+ </#if>
+ <#if option.info.doc??>
++
+${option.info.doc}
+ </#if>
</#if>
- </listitem>
- </varlistentry>
</#list>
- </variablelist>
- </refsect1>
- </#if>
-
- <#if propertiesInfo??>${propertiesInfo}</#if>
-</refentry>
+--
+</#if>
+<#if propertiesInfo??>
+${propertiesInfo}
+</#if>
--
Gitblit v1.10.0