def delete_command(database, user_input): # ex input: delete daily # ex input: delete all if dict_management.wrong_parameter_count(len(user_input), 2): return delete_mode_input = user_input[1] if delete_mode_input not in documentation.get_dictionary_names( ) and delete_mode_input != 'all': print( "Invalid delete mode. Expected a dictionary name (ie daily) or 'all'", end='\n\n') return if not dict_management.delete_dictionary(database, delete_mode_input): return file_management.update(database) console_display.print_display(database) print('Successfully deleted the specified', end='\n\n')
def cycles_command(database, user_input): if dict_management.wrong_parameter_count(len(user_input), 1): return console_display.print_dictionary(database, 'active_cycle') console_display.print_dictionary(database, 'inactive_cycle')
def dailies_command(database, user_input): if dict_management.wrong_parameter_count(len(user_input), 1): return console_display.print_dictionary(database, 'daily') console_display.print_dictionary(database, 'optional')
def reset_command(database, user_input): # ex input: reset if dict_management.wrong_parameter_count(len(user_input), 1): return dict_management.change_all_daily_dicts(database, 'reset')