Exemple #1
0
def main():
    (option, query) = alfred.args2()
    if option == "-c":
        itemlist.clear_todos()
    elif option == "-a":
        actionize(query)
    elif option == "-q":
        process_todo_query(query)
    elif option == "-r":
        itemlist.remove_item(query)
    elif option == "-v":
        itemlist.retrieve_and_store_tag(query)
    elif option == '-p':
        if helpers.is_todo(query):
            itemlist.toggle_pinned(helpers.extract_todo_id(query))
Exemple #2
0
def main():
	(option, query) = alfred.args2()
	if option == "-c":
		itemlist.clear_todos()
	elif option == "-a":
		actionize(query)
	elif option == "-q":
		process_todo_query(query)
	elif option == "-r":
		itemlist.remove_item(query)
	elif option == "-v":
		itemlist.retrieve_and_store_tag(query)
	elif option == '-p':
		if helpers.is_todo(query):
			itemlist.toggle_pinned(helpers.extract_todo_id(query))
Exemple #3
0
def toggle_pin(query):
    if helpers.is_todo(query):
        itemlist.toggle_pinned(helpers.extract_todo_id(query))