# -*- coding: utf-8 -*-
"""
    prestans3.tools.cli
    ~~~~~~~~~~~~~~~~~~~

    Command line interface definitions using click.

    :copyright: (c) 2017 by Anomaly Software.
    :license: Apache 2.0, see LICENSE for more details.
"""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

__all__ = []

import os
import click

from . import __version__

class Project(object):
    """
    """

    def __init__(self, path):
        self._path = path

pass_project = click.make_pass_decorator(Project)

# cli root

@click.group()
@click.option('--verbose', '-v', is_flag=True,
              help='Enables verbose mode.')
@click.version_option(__version__)
@click.pass_context
def dispatch(ctx, verbose):
    """prestans3 is a Python WSGI compliant REST micro-framework.

    It provides these command line tools to assist in the development
    of client side applications.

    prestans is distributed under the terms defined by New BSD License
    <http://github.com/anomaly/prestans3.git>
    """
    ctx.obj = Project(path="")

# stubs

@dispatch.command()
@pass_project
def stubs(project):
    """Generate model parser stubs for client"""
    pass

# docs

@dispatch.command()
@pass_project
def docs(project):
    """Build API docs via blueprint"""
    pass


# Meta information for API

@dispatch.group()
@pass_project
def meta(project):
    """Generate model meta information for clients"""
    pass