mirror of
https://github.com/dtomlinson91/tembo.git
synced 2025-12-22 10:35:43 +00:00
adding initial scaffolding
This commit is contained in:
@@ -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", {})
|
||||
|
||||
BIN
tembo/__pycache__/__init__.cpython-38.pyc
Normal file
BIN
tembo/__pycache__/__init__.cpython-38.pyc
Normal file
Binary file not shown.
BIN
tembo/__pycache__/cli.cpython-38.pyc
Normal file
BIN
tembo/__pycache__/cli.cpython-38.pyc
Normal file
Binary file not shown.
27
tembo/cli.py
Normal file
27
tembo/cli.py
Normal 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)
|
||||
Reference in New Issue
Block a user