From 1aea8d8bafc73ff1832c12004d730ebadf05d2fa Mon Sep 17 00:00:00 2001 From: Richard Mwewa <74001397+rly0nheart@users.noreply.github.com> Date: Wed, 16 Aug 2023 21:22:22 +0200 Subject: [PATCH 1/4] Update main.py --- glyphoji/main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/glyphoji/main.py b/glyphoji/main.py index e98ccbb..778c39c 100644 --- a/glyphoji/main.py +++ b/glyphoji/main.py @@ -17,7 +17,7 @@ def __init__(self): """ Initialises the Glyphoji class by loading the glyphs from settings. """ - self._glyph_dictionary = self.settings()["glyphs"] + self._glyph_dictionary = self.__settings()["glyphs"] def __getattr__(self, name: str) -> str: """ @@ -39,7 +39,7 @@ def glyphs(self) -> str: :return: String containing all glyphs """ - return self._get_glyphs(dict_object=self._glyph_dictionary) + return self.__get_glyphs(dict_object=self._glyph_dictionary) def search(self, query: str) -> str: """ @@ -63,10 +63,10 @@ def search(self, query: str) -> str: suggestions = difflib.get_close_matches(query, all_aliases) return f"(did you mean {', '.join(suggestions)}?)" - return f"Close matches to `{query}`:\n{self._get_glyphs(dict_object=result)}" + return f"Close matches to `{query}`:\n{self.__get_glyphs(dict_object=result)}" @staticmethod - def _get_glyphs(dict_object: dict) -> str: + def __get_glyphs(dict_object: dict) -> str: """ Formats the dictionary of glyphs into a string. @@ -76,7 +76,7 @@ def _get_glyphs(dict_object: dict) -> str: return "\n".join([f"{key}: {value}" for key, value in dict_object.items()]) @staticmethod - def settings() -> dict: + def __settings() -> dict: """ Loads the program's settings from /data/settings.json. From 11b2e8a49a2ded88b00d2fd2d319f3a840fa1d87 Mon Sep 17 00:00:00 2001 From: Richard Mwewa <74001397+rly0nheart@users.noreply.github.com> Date: Wed, 16 Aug 2023 21:24:30 +0200 Subject: [PATCH 2/4] Update __init__.py --- glyphoji/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/glyphoji/__init__.py b/glyphoji/__init__.py index 55bd40a..c097579 100644 --- a/glyphoji/__init__.py +++ b/glyphoji/__init__.py @@ -13,7 +13,7 @@ def __init_glyph(): glyph = __init_glyph() -__author__ = glyph.settings()["program"]["author"]["name"] -__email__ = glyph.settings()["program"]["author"]["email"] -__version__ = glyph.settings()["program"]["version"] -__description__ = glyph.settings()["program"]["about"] +__author__ = glyph.__settings()["program"]["author"]["name"] +__email__ = glyph.__settings()["program"]["author"]["email"] +__version__ = glyph.__settings()["program"]["version"] +__description__ = glyph.__settings()["program"]["about"] From d064fc1fc73073ffeb5e6cb89751618648465fbc Mon Sep 17 00:00:00 2001 From: Richard Mwewa <74001397+rly0nheart@users.noreply.github.com> Date: Wed, 16 Aug 2023 21:29:15 +0200 Subject: [PATCH 3/4] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f0c8958..d2c57b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "glyphoji" -version = "0.2.4" +version = "0.2.5" description = "Modern hieroglyphs in the terminal." authors = ["Richard Mwewa "] readme = "README.md" From 782162e3922e500f32e86cca74c87cb721eddc60 Mon Sep 17 00:00:00 2001 From: Richard Mwewa <74001397+rly0nheart@users.noreply.github.com> Date: Wed, 16 Aug 2023 21:30:22 +0200 Subject: [PATCH 4/4] Update settings.json --- glyphoji/data/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glyphoji/data/settings.json b/glyphoji/data/settings.json index 00c130e..4464b74 100644 --- a/glyphoji/data/settings.json +++ b/glyphoji/data/settings.json @@ -2,7 +2,7 @@ "program": { "name": "Glyphoji", "about": "Modern hieroglyphs in the terminal.", - "version": "0.2.4", + "version": "0.2.5", "author": { "name": "Richard Mwewa", "email": "rly0nheart@duck.com"