[perf] misc script
Some checks failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/test Pipeline failed

This commit is contained in:
SouthFox 2023-07-28 01:22:08 +08:00
parent cb2d3fd580
commit 76f9191b1b

18
misc.py
View file

@ -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()