Last active
June 7, 2020 01:15
-
-
Save notpushkin/86cbe7eaf1d8654872fffad005b5478e to your computer and use it in GitHub Desktop.
Enhanced manpage generator for Docker (WIP prototype)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#: Takes data from https://github.com/docker/docker.github.io/blob/master/_data/engine-cli/ | |
#: and produces markdown suitable for conversion to a manpage (e. g. using pandoc). | |
template = lambda cmd: f""" | |
%docker-{cmd["command"].replace(" ", "-")}(1) | |
# NAME | |
docker {cmd["command"]} - {cmd["short"]} | |
# SYNOPSIS | |
{cmd["usage"]} | |
# DESCRIPTION | |
{cmd["long"]} | |
# OPTIONS | |
{format_options(cmd["options"])} | |
# EXAMPLES | |
{cmd["examples"]} | |
# SEE ALSO | |
**{cmd["pname"].replace(" ", "-")}**(1) | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment