adding initial scaffolding

This commit is contained in:
2021-10-20 02:20:40 +01:00
parent 8884a942c5
commit 3a709547de
13 changed files with 995 additions and 8 deletions

View File

@@ -1 +1,12 @@
__version__ = '0.1.0'
import os
import panaetius
if config_path := os.environ.get("TEMBO_CONFIG") is not None:
CONFIG = panaetius.Config("tembo", config_path)
else:
CONFIG = panaetius.Config("tembo")
panaetius.set_config(CONFIG, "base_path", "~/tembo")
panaetius.set_config(CONFIG, "scopes", {})

Binary file not shown.

Binary file not shown.

27
tembo/cli.py Normal file
View File

@@ -0,0 +1,27 @@
import click
import tembo
@click.group(options_metavar="<options>")
def run():
"""
Tembo - an organiser for work notes.
"""
print(tembo.CONFIG.base_path)
# print(tembo.CONFIG.scopes)
@run.command(options_metavar="<options>")
@click.argument("scope")
def new(scope):
"""
Create a new note.
SCOPE refers to the name of the scope in the Tembo config.yml.
"""
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)