diff --git a/tembo/cli.py b/tembo/cli.py index 46aa3cc..11e55ae 100644 --- a/tembo/cli.py +++ b/tembo/cli.py @@ -2,8 +2,10 @@ import click import tembo +CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"]) -@click.group(options_metavar="") + +@click.group(context_settings=CONTEXT_SETTINGS, options_metavar="") def run(): """ Tembo - an organiser for work notes. @@ -12,16 +14,40 @@ def run(): # print(tembo.CONFIG.scopes) -@run.command(options_metavar="") -@click.argument("scope") -def new(scope): +@click.command(options_metavar="") +@click.argument("scope", metavar="") +@click.argument( + "inputs", + nargs=-1, + metavar="", +) +def new(scope, inputs): """ Create a new note. - SCOPE refers to the name of the scope in the Tembo config.yml. + The name of the scope in the Tembo config.yml. + + Any input tokens needed in the Tembo config.yml. + + Example: tembo new meeting my_presentation """ + for user_scope in tembo.CONFIG.scopes: print(f"passed in scope: {scope}") print(f'config scope: {user_scope["name"]}') if user_scope["name"] == scope: print(True) + + click.echo(inputs) + + +# TODO: decide on a date format to pass in +@click.command(options_metavar="") +@click.option("--scope", "-s", help="The name of the scope in the Tembo config.yml.") +@click.option("--date", "-d", help="") +def archive(scope, date): + print(f"{scope}, {date}") + + +run.add_command(new) +run.add_command(archive)