diff --git a/albero/plugin/backend/hier.py b/albero/plugin/backend/hier.py index 2239813..106356c 100644 --- a/albero/plugin/backend/hier.py +++ b/albero/plugin/backend/hier.py @@ -1,17 +1,9 @@ -import copy - -# from pathlib import Path -# from albero.utils import render_template -# from albero.plugin.common import PluginBackendClass -# from pprint import pprint -# -# import logging -# import anyconfig -# import textwrap from albero.plugin.common import PluginBackendClass +from albero.utils import path_assemble_hier from pprint import pprint import logging +import copy log = logging.getLogger(__name__) diff --git a/albero/plugin/common.py b/albero/plugin/common.py index aa34916..cb4747f 100644 --- a/albero/plugin/common.py +++ b/albero/plugin/common.py @@ -98,38 +98,11 @@ class PluginEngineClass(PluginClass): _plugin_type = "engine" _schema_props_default = { - "value": { + "engine": { "default": "UNSET", }, - #### SHOULD NOT BE HERE - "hier": { - "additionalProperties": True, - "optional": True, - "properties": { - "var": { - "type": "string", - "default": "item", - "optional": True, - }, - "data": { - "default": None, - "anyOf": [ - {"type": "null"}, - {"type": "string"}, - {"type": "array"}, - ], - }, - "separator": { - "type": "string", - "default": "/", - "optional": True, - }, - "reversed": { - "type": "boolean", - "default": False, - "optional": True, - }, - }, + "value": { + "default": "UNSET", }, } @@ -201,31 +174,3 @@ class PluginFileGlob: }, } } - - def _glob(self, item): - - # DIRECT CALL TO APP< TOFIX - app_config = self.app.conf2 - root = ( - app_config.get("default", {}) - .get("config", {}) - .get("root", f"{Path.cwd()}/tree") - ) - # root = self.app.conf2.config.app.root - # TOFIX print ("ITEM! %s" % type(root)) - # TOFIX print ("ITEM2 %s" % self.app.conf2.config.app.root) - - glob_config = self.config.get("glob", {}) - glob_file = glob_config["file"] - # glob_ext = glob_config['ext'] - - item = Path(root) / Path(item) / Path(glob_file) - item = f"{item}" - # file = f"{glob_file}.{glob_ext}" - - # print ("ITEM %s" % item) - files = glob.glob(item) - - log.debug(f"Matched file for glob '{item}': {files}") - - return files