예제 #1
0
def build_gitbook(certification, certification_dir, output_dir):
    """ Interface for the certifications_to_gitbook renderer, which creates
    certification documentation in gitbook form """
    return certifications_to_gitbook.create_gitbook_documentation(
        certification=certification,
        certification_dir=certification_dir,
        output_path=output_dir
    )
예제 #2
0
def docs(export_format, certification, certs_dir, output_dir):
    """ Create certification documentation """
    if export_format == 'gitbook':
        output_path = certifications_to_gitbook.create_gitbook_documentation(
            certification, certs_dir, output_dir
        )
        click.echo('Gitbook Files Created in `{0}`'.format(output_path))
    else:
        click.echo('{0} format is not supported yet...'.format(export_format))
예제 #3
0
def docs(export_format, certification, exports_dir, data_dir, output_dir):
    """ Create certification documentation """
    certs_dir = os.path.join(exports_dir, 'certifications')
    cert_path = verify_certification_path(certification, certs_dir)
    markdown_dir = os.path.join(data_dir, 'markdowns')
    if cert_path:
        if export_format == 'gitbook':
            gitbook_output_dir = os.path.join(output_dir, 'gitbook')
            gitbook_markdown_dir = os.path.join(markdown_dir, 'gitbook')
            utils.create_dir(os.path.join(gitbook_output_dir, 'content'))
            output_path = certifications_to_gitbook.create_gitbook_documentation(
                cert_path, gitbook_output_dir, gitbook_markdown_dir
            )
            click.echo('Gitbook Files Created in `{0}`'.format(output_path))
        else:
            click.echo('{0} format is not supported yet...'.format(export_format))