Go to main content

手册页部分 1:用户命令

退出打印视图

更新时间: 2022年7月27日 星期三
 
 

odoctool(1)

名称

odoctool - Manage WebUI Online Documentation bundles

用法概要

odoctool [-D|--debug] [-V|--version] [-h|--help] [--log <FILE>]

odoctool create-bundle [-d <DIR>|--destdir <DIR>] [--keep] \
    [--overwrite] /path/to/bundlespec

odoctool list-targets [-d <NUMBER>|--depth <NUMBER>] <bundle_id>

odoctool <subcommand> -h|--help

描述

The odoctool command is a multi-purpose utility for working with Online Documentation bundles, most notably for generating bundles according to the given odoc-bundle bundlespec file. For more information, see the odoc-bundle(5) man page.

Using the odoctool command, you can perform the following tasks:

  • Generate a new bundle.

  • List available link targets for document authors.

Subcommands

The odoctool command has the subcommands and their options listed below.

odoctool [–D|–-debug] [–V|–-version] [–h|–-help] [–-log <FILE>]

Displays available general options and their meanings, as well as list of available subcommands.

Following options might be used in combination with subcommand:

–D, –-debug

Outputs verbose "debug" messages.

–V, –-version

Prints program version and exit.

–-log=FILE

Logs output messages into given file instead of STDOUT/STDERR.

–h, –-help

Prints short usage help and exit.

odoctool create-bundle [–d <DIR>|–-destdir <DIR>] [–-keep] \ [–-overwrite] /path/to/bundlespec

Reads given bundlespec file and converts contained sources into a bundle in current working directory or optionally given –-destdir. If bundlespec file is not valid or sources cannot be converted cleanly, errors are reported on STDERR.

–d <DIR>|–-destdir <DIR>

Directory to put bundle in to (default is current $PWD).

–-keep

Keeps temporary files after failure.

–-overwrite

Overwrites existing bundle directory.

odoctool list-targets [–d <NUMBER>|–-depth <NUMBER>] <bundle_id>

Lists link targets which can be printed from the olink XML Docbook element. Lists elements in an installed bundle if bundle_id is specified, otherwise list IDs of all installed bundles. If depth option is specified, lists the number of target levels. Otherwise lists the top level only.

示例

示例 1 Creating a Bundle

The following command creates a bundle in the current working directory using the bundlespec my.bundlespec:

example% odoctool create-bundle -d . my.bundlespec
示例 2 Creating a Bundle, Overwrite Existing

The following command creates a bundle in the current working directory using the bundlespec my.bundlespec. If such bundle already exists, it is overwritten:

example% odoctool create-bundle --overwrite -d . my.bundlespec
示例 3 Listing Installed Bundles

The following command lists bundles that are installed on the system and links can therefore point to targets in them:

example% odoctool list-targets
示例 4 Listing Targets in a Bundle

The following command lists link targets in the bundle mybundle that is installed on the system:

example% odoctool list-targets mybundle
示例 5 Listing Three Levels of Targets in a Bundle

The following command lists three levels of link targets in the bundle mybundle that is installed on the system:

example% odoctool list-targets -d 3 mybundle

退出状态

0

Success.

>0

Failure. Errors reported on STDERR.

属性

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Consolidation Private
Availability
text/odoc

另请参见

odoc-bundle(5)