From ee96fbb85dbab0ff11e2c63d6f95cfac091b956b Mon Sep 17 00:00:00 2001 From: Raelon Masters Date: Wed, 25 Dec 2019 22:37:20 -0500 Subject: [PATCH] Added basics comments --- __init__.py | 4 ---- install | 23 +++++++++++++++-------- requirements.txt | 1 + 3 files changed, 16 insertions(+), 12 deletions(-) delete mode 100644 __init__.py diff --git a/__init__.py b/__init__.py deleted file mode 100644 index 21575c2..0000000 --- a/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -import sys - -# sys.path.insert(1, "app/") -# sys.path.insert(2, "frontend/") diff --git a/install b/install index f469338..0af5a89 100755 --- a/install +++ b/install @@ -1,21 +1,22 @@ -#!/usr/bin/python +#!/usr/bin/python3.8 import json import pathlib - -from src.backend.lib.config import Config +from pprint import pprint +# from src.backend.lib.config import Config # Use ptShelfs configuration class or stay independant for portability? from src.backend.lib.display import TerminalDisplay -PRG_PATH = pathlib.Path.cwd() -LIB_PATH = pathlib.Path.joinpath(PRG_PATH, "src", "backend", "lib") +# PRG_PATH = pathlib.Path.cwd() +# LIB_PATH = pathlib.Path.joinpath(PRG_PATH, "src", "backend", "lib") # sys.path.insert(0, PRG_PATH) -TerminalDisplay().installer() +# Call for the ui and installer questions. +install_answers = TerminalDisplay().installer() class Configuration: def __init__(self): - _cp = pathlib.Path("config.json") - _data = self.open_file() + self._cp = pathlib.Path("config.json") + self._data = self.open_file() def open_file(self): with open(str(self._cp), "r") as read_file: @@ -26,3 +27,9 @@ class Configuration: with open(str(self._cp), "rw") as write_file: json.dumps(write_file) return True + + +config = Configuration().open_file() +# Print a comparison between config.json and user inputs. +pprint(install_answers) +pprint(config) diff --git a/requirements.txt b/requirements.txt index b2f93d8..968cc3d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,3 +15,4 @@ toml uwsgi django-debug-toolbar psycopg2-binary +prompt_toolkit