Esempio n. 1
0
def delete_folder(path):
    global library    
    library.delete_folder(path)

    library = LibraryManager()
    tree = library.get_tree()
    emit('set_library_tree', tree)
Esempio n. 2
0
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)
Esempio n. 3
0
def refresh_library():
    global library
    library = LibraryManager()
    tree, calcs_list = library.get_tree()

    data={
        'tree': tree,
        'calcs': calcs_list
    }

    emit('set_library_tree', data)
Esempio n. 4
0
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)