Beispiel #1
0
def _print(data, index=""):
    if len(data) == 0:
        info("ToDo list is empty, add a new entry with 'todo add <name>'")
    for x, element in enumerate(data):
        px = index + "{}".format(x + 1)
        printItem(element, px)
        if 'items' in element:
            _print(element['items'], px + ".")
Beispiel #2
0
def handler_list(data):
    count = 0
    for index, en in enumerate(reminderList['items']):
        if not en['hidden']:
            print("<{0}> {2}: {1}".format(count + 1, en['time'], en['name']))
            count += 1
    if count == 0:
        info("Reminder list is empty. Add a new entry with 'remind add <time> <name>'")
Beispiel #3
0
def handlerRemove(data):
    skip, number = parseNumber(data)
    if skip:
        index = number - 1
    else:
        index, indexList = findReminder(data)
    if index >= 0 and index < len(reminderList['items']):
        info("Removed reminder: \"{0}\"".format(reminderList['items'][index]['name']))
        removeReminder(reminderList['items'][index]['uuid'])
    else:
        error("Could not find selected reminder")
Beispiel #4
0
def showAlarm(notification, name):
    info(name)
    notification.show()