parser
Base module ofr parsing extensions.
Attributes
mlogger = get_logger(__name__)
module-attribute
Functions
parse_comp_dir(comp_path, comp_class)
get_parsed_extension(extension)
Creates and adds the extensions components to the package.
Each package object is the root to a tree of components that exists under that package. (e.g. tabs, buttons, ...) sub components of package can be accessed by iterating the _get_component. See _basecomponents for types.
Source code in pyrevitlib/pyrevit/extensions/parser.py
parse_dir_for_ext_type(root_dir, parent_cmp_type)
Return the objects of type parent_cmp_type of the extensions in root_dir.
The package objects won't be parsed at this level. This is useful for collecting basic info on an extension type for cache cheching or updating extensions using their directory paths.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
root_dir |
str
|
directory to parse |
required |
parent_cmp_type |
type
|
type of objects to return |
required |