def main(): (option, query) = alfred.args2() option_actions = { '-view': lambda q: generate_view(q) } option_actions[option](query) config.commit()
def main(): (command, data) = alfred.args2() if command == "-set-folder": update_todo_db_path(data) elif command == "-reset": reset() config.commit()
def main(): (option, query) = alfred.args2() option_actions = { '-view' : lambda x: generate_view(), '-set': lambda x: set_format(x) } option_actions[option](query) config.commit()
def main(): (option, query) = alfred.args2() option_actions = { '-file': lambda x: import_from_file(query), '-clipboard': lambda x: import_from_clipboard() } option_actions[option](query) todo_config.commit()
def main(): (option, query) = alfred.args2() option_actions = { # Features '-view': lambda q: generate_view(), '-toggle': lambda q: toggle_feature(q) } option_actions[option](query) config.commit()
def main(): (option, query) = alfred.args2() option_actions = { # Editing '-view': lambda q: editview.generate_view(q), '-action': lambda q: process_query(q) } option_actions[option](query) config.commit()
def main(): (option, query) = alfred.args2() option_actions = { # Lists '-view': lambda q: generate_view(q), '-action': lambda q: action(q), '-delete': lambda q: delete_list(q) } option_actions[option](query) config.commit()
def main(): if len(sys.argv) == 1: generate_export_view() else: format = sys.argv[1] tag = None if len(sys.argv) == 3: tag = sys.argv[2] if format == "txt": export_txt(_tag=tag) config.commit()
def main(): (option, arg) = alfred.args2() if option == "-view": config.put('todo.db.destination_path', arg) generate_view(arg) elif option == "-migrate": migrate_todo_list( os.path.dirname(config.get(ck.KEY_TODO)), config.get('todo.db.destination_path'), arg ) config.commit()
def main(): (option, query) = alfred.args2() option_actions = { # Clearing items '-c': lambda q: itemlist.clear_all_todos(), '-ct': lambda q: itemlist.clear_todos(done=False), '-cd': lambda q: itemlist.clear_todos(done=True), # Processing query input '-a': lambda q: actionize(q), '-q': lambda q: process_todo_query(q), '-r': lambda q: itemlist.remove_item(q), # Item toggles '-p': lambda q: toggle_pin(q), '-d': lambda q: toggle_done(q) } option_actions[option](query) config.commit()
def process_commit(self): config.commit()