oc-man-plugin

command module
v0.0.0-...-f98025a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

README

oc man plugin

This is an experimental plugin for the OpenShift command line tool to provide a man page like experience.

How to

Use

Type oc man help to see the detailed help page.

Type oc man topics to see a list of topics

Type oc man <topic>, replacing <topic> with the search term, to see the man page for that topic.

Build

Prerequisites

  • Go lang 1.16+
  • Python 3
  • PyYaml

Type make all to gather the man pages and compile the oc-man binary. The output will be in the bin directory.

A containerized build is available for environments where the prerequisites are not met. Type ./hack/container-run.sh make to build the binary.

Type make clean to remove the binary and downloaded content files.

Install

As with kubectl plugin extensions, place the binary oc-man file into the path of yourt host.

Add a new man page

The topics.yaml file contains the list of man page that will be downloaded and compiled into the binary. They are organized as a list of title and location pairs, where the title is a contiguous string and the location is a url. During the build process the page titles will be matched with the content downloaded from the location stored within the binary.

Add a new entry in the form

- title: my-new-topic
  location: https://my-cdn.io/my-new-topic.md

To get started writing a man page, please see the oc-man-page-template.md file for further instructions.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL