INNER CODE UNIT · Python

docgen

pluralsh/plural · bin/docgen.py:57

def docgen(repo):
    client = gql_client()
    recipes = client.execute(query=recipes_q, variables={'repoName': repo})
    recipes = [r['node'] for r in recipes['data']['recipes']['edges']]
    recipe = client.execute(query=recipe_q, variables={'id': recipes[0]['id']})['data']['recipe']
    tabs = " ".join(tab_content(repo, r) for r in recipes)
    repo_name = repo.capitalize()
    setup = "\n\n".join(setup_vals(section) for section in recipe['recipeSections'])
    click.echo(f"""
# {repo_name}

## Description
Plural will install {repo_name} in a dependency-aware manner onto a Plural-managed Kubernetes cluster with one CLI command.

## Installation
We currently support {repo_name} for the following providers:

{'{% tabs %}'}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…