-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpySecteograph.py
51 lines (40 loc) · 1.99 KB
/
pySecteograph.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import click
from datetime import datetime
from lib.classes.secteograph import Secteograph
@click.group()
def main():
pass
@click.command()
@click.option('--user', type=click.STRING, help='Who you insert related to-dos')
@click.option('--start', required=True, type=click.STRING, help='When do you start your to-dos')
@click.option('--end', required=True, type=click.STRING, help='When do you end your to-dos')
@click.argument('desc', nargs=1, required=True, type=click.STRING)
def add(start, end, desc, user):
# TODO :: add a to-do to file
# Examples :: desc from to user
Secteograph.addTodo(start, end, desc, user)
@click.command()
@click.option('--user', required=True, type=click.STRING, help='When do you start your to-dos')
@click.option('--start', type=click.STRING, help='When do you start your to-dos')
@click.option('--end', type=click.STRING, help='When do you start your to-dos')
@click.option('-f', is_flag=True, required=False, type=click.STRING, help='When do you start your to-dos')
@click.argument('desc', nargs=1, required=True, type=click.STRING)
def delete(user, start, end, desc, f):
# TODO :: delete a todo by specific user, start date or end date
# Examples :: desc from to user
Secteograph.deleteTodo(start, end, desc, user)
@click.command()
@click.option('--user', type=click.STRING, default='*', help='When do you start your to-dos')
@click.option('--start', type=click.STRING, help='When do you start your to-dos')
@click.option('--end', type=click.STRING, help='When do you start your to-dos')
@click.option('-a', '--all', is_flag=True, default=False, type=click.STRING, help='Get all to-dos')
@click.argument('desc', nargs=1, required=True, type=click.STRING)
def get(start, end, desc, user, all):
# TODO :: get to-do list by specific user, start date or end date
# Examples :: desc from to user
Secteograph.getTodo(start, end, desc, user)
main.add_command(add)
main.add_command(delete)
main.add_command(get)
if __name__ == "__main__":
main()