From 706cb22c7689153613a5b0528db6db6b8e74e3e2 Mon Sep 17 00:00:00 2001 From: elburg Date: Mon, 6 Mar 2023 13:09:11 -0800 Subject: [PATCH] shit i forgot to delete! --- res/jinja/text/output.help.commands.jinja | 4 -- res/jinja/text/output.help.full.jinja | 3 -- res/jinja/text/output.help.usage.jinja | 1 - res/yaml/defaults/config.yaml | 2 - res/yaml/locale/en_US/locales.yaml | 3 -- res/yaml/locale/en_US/msg.yaml | 6 --- src/__init__.py | 23 ---------- src/__main__.py | 9 ---- src/config.py | 6 --- src/datafiles/__init__.py | 55 ----------------------- src/format.py | 31 ------------- src/output/OutputObject.py | 24 ---------- src/output/__init__.py | 1 - src/source/__init__.py | 0 src/source/network/DownloadJob.py | 10 ----- 15 files changed, 178 deletions(-) delete mode 100644 res/jinja/text/output.help.commands.jinja delete mode 100644 res/jinja/text/output.help.full.jinja delete mode 100644 res/jinja/text/output.help.usage.jinja delete mode 100644 res/yaml/defaults/config.yaml delete mode 100644 res/yaml/locale/en_US/locales.yaml delete mode 100644 res/yaml/locale/en_US/msg.yaml delete mode 100644 src/__init__.py delete mode 100644 src/__main__.py delete mode 100644 src/config.py delete mode 100644 src/datafiles/__init__.py delete mode 100644 src/format.py delete mode 100644 src/output/OutputObject.py delete mode 100644 src/output/__init__.py delete mode 100644 src/source/__init__.py delete mode 100644 src/source/network/DownloadJob.py diff --git a/res/jinja/text/output.help.commands.jinja b/res/jinja/text/output.help.commands.jinja deleted file mode 100644 index 6471a57..0000000 --- a/res/jinja/text/output.help.commands.jinja +++ /dev/null @@ -1,4 +0,0 @@ -{{ strings.msg.help.cmds.header }}: -{% for item in owo.misc.cmds %} - {% if item.argNames.short[0] %} - \ No newline at end of file diff --git a/res/jinja/text/output.help.full.jinja b/res/jinja/text/output.help.full.jinja deleted file mode 100644 index 7725630..0000000 --- a/res/jinja/text/output.help.full.jinja +++ /dev/null @@ -1,3 +0,0 @@ -{% include 'output.help.usage.jinja' %} - -{% include 'output.help.commands.jinja' %} \ No newline at end of file diff --git a/res/jinja/text/output.help.usage.jinja b/res/jinja/text/output.help.usage.jinja deleted file mode 100644 index 7f1210f..0000000 --- a/res/jinja/text/output.help.usage.jinja +++ /dev/null @@ -1 +0,0 @@ -{{ strings.msg.help.usage.start }}: {{ owo.cliName }} [ options ] [ file | url ] \ No newline at end of file diff --git a/res/yaml/defaults/config.yaml b/res/yaml/defaults/config.yaml deleted file mode 100644 index 4be93ce..0000000 --- a/res/yaml/defaults/config.yaml +++ /dev/null @@ -1,2 +0,0 @@ -output: - - logLevel: DEBUG' \ No newline at end of file diff --git a/res/yaml/locale/en_US/locales.yaml b/res/yaml/locale/en_US/locales.yaml deleted file mode 100644 index a7a58f4..0000000 --- a/res/yaml/locale/en_US/locales.yaml +++ /dev/null @@ -1,3 +0,0 @@ -lang: - en: "English" - \ No newline at end of file diff --git a/res/yaml/locale/en_US/msg.yaml b/res/yaml/locale/en_US/msg.yaml deleted file mode 100644 index 2f040e1..0000000 --- a/res/yaml/locale/en_US/msg.yaml +++ /dev/null @@ -1,6 +0,0 @@ -help: - usage: - start: "usage" - cmds: - header: "COMMANDS" - \ No newline at end of file diff --git a/src/__init__.py b/src/__init__.py deleted file mode 100644 index d3b10bd..0000000 --- a/src/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- - -from . import config -from . import output -import logging -import sys - -__author__ = "arris kathery" -__copyright__ = "copyright 2023 brendan berger" -__license__ = "" -__maintainer__ = "arris kathery" -__email__ = "whotookelburg@hotmail.com" -__version__ = "0.0.0-alpha0" - - -def main() -> dict: - out=output.OutputObject() - - try: - # do shit - except KeyboardInterrupt: - return {'_kbi':True} - diff --git a/src/__main__.py b/src/__main__.py deleted file mode 100644 index 06c3fed..0000000 --- a/src/__main__.py +++ /dev/null @@ -1,9 +0,0 @@ -import owo, sys - -if __name__ == "__main__": - output=owo.main() - del owo - if output._kb: - sys.exit() - else: - # output results diff --git a/src/config.py b/src/config.py deleted file mode 100644 index a340abe..0000000 --- a/src/config.py +++ /dev/null @@ -1,6 +0,0 @@ -confDict = {} - -def loadConfig(confLocation = "$HOME/.config/owo.yaml"): - from os import path - if not path.exists(confLocation): - diff --git a/src/datafiles/__init__.py b/src/datafiles/__init__.py deleted file mode 100644 index 8ae5842..0000000 --- a/src/datafiles/__init__.py +++ /dev/null @@ -1,55 +0,0 @@ -from pathlib import Path -from sys import platform -from yaml import load, dump -import os -from re import search, IGNORECASE -import collections.abc - -_config={} -_files=[] -_configloaded = False - -_LOCATIONS = { - '_YAMLCONFPATH':{ - '_DIR':[ - "{}/owo/".format(os.environ["XDG_CONFIG_HOME"]) if "XDG_CONFIG_HOME" in os.environ else str(Path.home())+"/.config/owo/", - "{}/".format(os.environ["XDG_CONFIG_HOME"]) if "XDG_CONFIG_HOME" in os.environ else str(Path.home())+"/.config/", - str(Path('~').resolve()), - str(Path().resolve()) if str(Path.cwd()) not in self._DIRS else None - ], - '_FNAME_RE': - r"([ou^>]w[ou^<]|config)\.(ya?ml|c(on)?fi?g?)$" - } - -} - -def _updateConf(toAdd: dict): - for key, value in toAdd.items(): - if isinstance(value, collections.abc.Mapping): - -def _loadYAMLConf(path: str): - try: - conf = yaml.load(file.read_text()) - except Exception as exc: - # do an err - else: - if not _config: - _config = conf - else: - - - -def initConfig(path: str) -> bool: - if _configloaded: - return True# If config already loaded, do not reload. - else: - try: - file = Path(path) - - if file.exists() and not file.is_dir(): - try: - conf = yaml.load(file.read_text()) - except Exception as exc: - # do an err - else: - if not _config diff --git a/src/format.py b/src/format.py deleted file mode 100644 index 46ac9d7..0000000 --- a/src/format.py +++ /dev/null @@ -1,31 +0,0 @@ -_DEFAULT = { - '_DATETEMP':'%a, %d %b %Y %H:%M:%S %Z%z', - '_INCLUDE':[ - 'env', - ] -} - -def dateFormat(input: str = _DEFAULT._DATETEMP,use_local:bool=True) -> str: - from time import strftime - if use_local: - from time import localtime - return strftime(input,localtime()) - else: - from time import gmtime - return strftime(input,gmtime()) - -def stringformat( - input: str, - include: list = _DEFAULT._INCLUDE - ) -> str: - - imap = { - 'time': dateFormat() - } - - if 'env' in include: - import os - imap['env'] = os.environ - del os - - return input.format_map(imap) diff --git a/src/output/OutputObject.py b/src/output/OutputObject.py deleted file mode 100644 index 3f36075..0000000 --- a/src/output/OutputObject.py +++ /dev/null @@ -1,24 +0,0 @@ -import logging - -# outputDict={ -# 'status': 1, -# 'input': { -# 'argsRaw': sys.argv, -# 'streamObjects': [] -# }, -# 'output': [], -# 'errors': [] -# } - -class OutputObject: - - def __init__(self): - self.status = 1 - import sys - self.input = { - 'argsRaw': sys.argv, - 'streamObjects': [] - } - del sys - self.output = [] - self.errors = [] diff --git a/src/output/__init__.py b/src/output/__init__.py deleted file mode 100644 index c9e1e71..0000000 --- a/src/output/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import OutputObject diff --git a/src/source/__init__.py b/src/source/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/source/network/DownloadJob.py b/src/source/network/DownloadJob.py deleted file mode 100644 index ba35d50..0000000 --- a/src/source/network/DownloadJob.py +++ /dev/null @@ -1,10 +0,0 @@ -from .NetworkPath import NetworkPath -from ...config.datafiles.owoDataFile import owoDataFile -from ...config import moduleConfig - -class DownloadJob: - - def __init__(self, - url: NetworkPath, - engine: string = moduleConfig.source.network.engine, - engineConfig: dict = moduleConfig.source.network.engineConfig