def delete_folder(path): global library library.delete_folder(path) library = LibraryManager() tree = library.get_tree() emit('set_library_tree', tree)
def rename_folder(folder_data): global library folder_path = folder_data['path'] folder_name = folder_data['name'] library.rename_folder(folder_path, folder_name) library = LibraryManager() tree = library.get_tree() emit('set_library_tree', tree)
def refresh_library(): global library library = LibraryManager() tree, calcs_list = library.get_tree() data={ 'tree': tree, 'calcs': calcs_list } emit('set_library_tree', data)
def save_to_library(data): global library path = data['path'] node_data = data['node_data'] overwrite = data['overwrite'] library.save(path, node_data, overwrite) library = LibraryManager() tree = library.get_tree() emit('set_library_tree', tree)