From af16d3f18d73703e1c386528501fde4191a64692 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Sat, 8 Feb 2025 00:33:53 -0600 Subject: [PATCH] bug fixes, version --- meta/__init__.py | 2 +- plugins/registry.py | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/meta/__init__.py b/meta/__init__.py index 49b2209..85784ac 100644 --- a/meta/__init__.py +++ b/meta/__init__.py @@ -1,5 +1,5 @@ __author__="steve l. nyemba" -__version__="0.1" +__version__="0.8" __app_name__="plugin-ix" __license__=""" Copyright 2025, Steve L. Nyemba diff --git a/plugins/registry.py b/plugins/registry.py index ad0ecd3..31c7952 100644 --- a/plugins/registry.py +++ b/plugins/registry.py @@ -7,12 +7,11 @@ import os import json import shutil import pandas as pd - +from . import loader # # we should have a way to register these functions using rudimentary means # -REGISTRY_PATH=None class Registry : def __init__(self,folder=None,reader = None) : @@ -24,6 +23,7 @@ class Registry : # self._context = self._folder.split(os.sep)[-1] self._reader = reader self._data = {} + self.make(self._folder) #-- making the folder just in case we need to # self.make(os.sep.join([self._folder,'code'])) self.load() @@ -88,7 +88,17 @@ class Registry : if _file in self._data : return _name in self._data[_file]['content'] return False - + def get(self,_key): + if '@' in _key : + _name,_file = _key.split('@') + else: + _name = _key + _file = None + if len(self._data.keys()) == 1 : + _file = list(self._data.keys())[0] + filename = self._data[_file]['path'] + _loader = loader.Loader(file=filename) + return _loader.get(_name) def write (self): # # will only write the main