Ejemplo n.º 1
0
========

Planemo is a set of utilities for developing Galaxy tools. Each utility is
implemented as a subcommand of the ``planemo`` executable. This section of the
documentation describes these commands.

"""

command_doc_dir = os.path.join("docs", "commands")
commands = COMMANDS_TEMPLATE

for command in list_cmds():
    if command in INTERNAL_COMMANDS:
        continue

    command_obj = cli.name_to_command(command)
    function = command_obj.callback
    raw_rst = function.__doc__

    def clean_rst_line(line):
        if line.startswith("    "):
            return line[4:]
        else:
            return line

    clean_rst = "\n".join(map(clean_rst_line, raw_rst.split("\n")))

    result = runner.invoke(planemo_cli, [command, "--help"])
    output = result.output
    lines = output.split("\n")
    new_lines = []
Ejemplo n.º 2
0
========

Planemo is a set of utilities for developing Galaxy tools. Each utility is
implemented as a subcommand of the ``planemo`` executable. This section of the
documentation describes these commands.

"""

command_doc_dir = os.path.join("docs", "commands")
commands = COMMANDS_TEMPLATE

for command in list_cmds():
    if command in INTERNAL_COMMANDS:
        continue

    command_obj = cli.name_to_command(command)
    function = command_obj.callback
    raw_rst = function.__doc__

    def clean_rst_line(line):
        # Check for that click \b.
        if line.startswith('    \x08'):
            return "::\n"
        if line.startswith("    "):
            return line[4:]
        else:
            return line
    all_lines = raw_rst.split("\n")
    all_lines[0] = all_lines[0].lstrip()  # """ Fix docs like this.
    clean_rst = "\n".join(map(clean_rst_line, all_lines))