diff --git a/misc.py b/misc.py index dde3df1..f34bf55 100644 --- a/misc.py +++ b/misc.py @@ -5,10 +5,15 @@ import click from Crypto.PublicKey import RSA from demo import config +from demo.boxes import send_note + +@click.group() +def misc(): + pass @click.command() -def gen_key(): +def gen_key(self): """Generate key.""" if config.KEY_PATH.exists(): print("Key is existing!") @@ -20,5 +25,14 @@ def gen_key(): print("Done!") +@click.command() +@click.option("--content", prompt="Note content") +def creat_note(content): + send_note(content) + + +misc.add_command(gen_key) +misc.add_command(creat_note) + if __name__ == "__main__": - gen_key() + misc()