def create_filter(): global filters,filter_actions add_filter() while True: print choice_num,choice_str = prompt(filter_actions,2,message="Please select a filter action to perform:") perform_filter_action(choice_str)
def main(): output_dir,iPod_drive,music_dir,song_db_loc = get_input() print "output directory: {0}".format(output_dir) print "iPod: {0}".format(iPod_drive) print "music directory: {0}".format(music_dir) tag_list,attrib_key_dict,attrib_dict = load_database(iPod_drive,music_dir,song_db_loc) print print "Now that setup has been taken care of, welcome! This application was designed to assist you in copying songs from your iPod to your computer. While this application allows for filtering by different attributes, the central feature is the ability to rename your files based on their metadata. Enjoy!" print "For help, simply type the word \"help\"." while True: choice_num,choice_str = prompt(actions,2,message="Please select an action",hidden_options={"help":False}) perform_action(choice_str,iPod_drive,output_dir,tag_list)
def edit_filter(): choice_num,choice_str = prompt(filters,1,message="Please select a filter to edit") print print "The filter you have chosen to edit is:" print choice_str filters[choice_num-1] = get_expr()