Skip to content

Latest commit

 

History

History
92 lines (63 loc) · 3.18 KB

elton-gen-manpage.adoc

File metadata and controls

92 lines (63 loc) · 3.18 KB

elton-gen-manpage(1) Manual Page

Name

elton-gen-manpage - Generates man pages for all commands in the specified directory.

Synopsis

elton gen-manpage [-fhVv] [-d=<outdir>] [-t=<template-dir>] [@<filename>…​]

Description

Generates man pages for all commands in the specified directory.

Options

-d, --outdir=<outdir>

Output directory to write the generated AsciiDoc files to. If not specified, files are written to the current directory.

-t, --template-dir=<template-dir>

Optional directory to write customizable man page template files. If specified, an additional "template" file is created here for each generated manpage AsciiDoc file.

Each template file contains include directives that import content from the corresponding generated manpage AsciiDoc file in the --outdir directory. Text can be added after each include to customize the resulting man page. The resulting man page will be a mixture of generated and manually edited text.

These customizable templates are intended to be generated once, and afterwards be manually updated and maintained.

-v, --verbose

Specify multiple -v options to increase verbosity.

For example, -v -v -v or -vvv

-f, --[no-]force

Overwrite existing man page templates. The default is --no-force, meaning processing is aborted and the process exits with status code 4 if a man page template file already exists.

-h, --help

Show this help message and exit.

-V, --version

Print version information and exit.

Arguments

[@<filename>…​]

One or more argument files containing options.

Converting to Man Page Format

Use the asciidoctor tool to convert the generated AsciiDoc files to man pages in roff format:

asciidoctor --backend=manpage --source-dir=SOURCE_DIR --destination-dir=DESTINATION *.adoc

Point the SOURCE_DIR to either the --outdir directory or the --template-dir directory. Use some other directory as the DESTINATION.
See https://asciidoctor.org/docs/user-manual/#man-pages
See http://man7.org/linux/man-pages/man7/roff.7.html