コード例 #1
0
ファイル: Libraries.py プロジェクト: BadgerAAV/Deviot
    def saveLibraryData(self, data, file_name):
        """
        Stores the data of the libraries in a json file

        Arguments:
            data {json}
                json data with the libraries
            file_name {string}
                name of the json file
        """
        libraries_path = Paths.getLibraryPath()
        library_path = os.path.join(libraries_path, file_name)
        libraries = JSONFile(library_path)
        libraries.setData(data)
        libraries.saveData()
コード例 #2
0
ファイル: Libraries.py プロジェクト: margyle/Deviot
    def saveLibraryData(self, data, file_name):
        """
        Stores the data of the libraries in a json file

        Arguments:
            data {json}
                json data with the libraries
            file_name {string}
                name of the json file
        """
        libraries_path = Paths.getLibraryPath()
        library_path = os.path.join(libraries_path, file_name)
        libraries = JSONFile(library_path)
        libraries.setData(data)
        libraries.saveData()
コード例 #3
0
ファイル: Libraries.py プロジェクト: BadgerAAV/Deviot
    def getLibrary(self, file_name):
        """
        Get a specific json file and return the data

        Arguments:
            file_name {string}
                Json file name where is stored the library data

        Returns:
            [dict] -- Dictionary with the library data
        """
        plugin_path = Paths.getLibraryPath()
        library_path = os.path.join(plugin_path, file_name)
        libraries = JSONFile(library_path).getData()

        return libraries
コード例 #4
0
ファイル: Libraries.py プロジェクト: margyle/Deviot
    def getLibrary(self, file_name):
        """
        Get a specific json file and return the data

        Arguments:
            file_name {string}
                Json file name where is stored the library data

        Returns:
            [dict] -- Dictionary with the library data
        """
        plugin_path = Paths.getLibraryPath()
        library_path = os.path.join(plugin_path, file_name)
        libraries = JSONFile(library_path).getData()

        return libraries