A class used to describe a manifest.json file.
Example Code
jsonpack.Manifest(name, description, uuid)
Arguments
| Argument |
Description |
| name |
Name of the pack. |
| description |
Description of the pack. |
| uuid |
UUID of this pack. |
| scripts |
A list of scripts. |
| version |
The packs version. |
| path |
This packs path. |
| modules |
This of modules this pack uses. |
| dependencies |
List of pack dependencies. |
__file__ |
File path to the loaded manifest.json |
Methods
- .enable_scripts(value)
Whether or not this pack can load scripts.
- .set_version(version)
Sets the version for the pack.
- .set_path(path)
Sets the path for the pack.
- .set_icon(fp)
Sets the icon for the pack.
- .add_module(version, type, uuid, path=None)
Adds a module to the manifest.
- .remove_module(index)
Removes a module at a specified index.
- .clear_modules()
Removes all modules from this manifest.
- .add_dependency(uuid, version=None, min_version=None, description=None)
Adds a dependency to the manifest.
- .remove_dependency(index)
Removes a dependency at a specified index.
- .clear_dependencies()
Removes all dependencies from this manifest.
- .from_dict()
Converts a :class:dict to a :class:Manifest
- .to_dict()
Converts a :class:Manifest to a :class:dict
- .schema()
This classes JSON schema used for validation when loading the file.
- .join()
Joins all paths realitive to this packs path.