From 9a7be149d07fa1202e54182c052970aad3efb8a7 Mon Sep 17 00:00:00 2001 From: Valentin Date: Wed, 29 Mar 2023 17:41:28 +0300 Subject: [PATCH] Update prepared --- CHANGELOG.md | 26 ++++++++++++++++++++++++-- qt_colored_logger/__init__.py | 6 ++++-- qt_colored_logger/src/ansi_format.py | 1 + setup.py | 4 ++-- 4 files changed, 31 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 770b806..c98d5f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,11 +34,33 @@ limitations under the License. --- --> +## v0.2.0 (29.03.2023) + +#### Documentation: +- Documented all new functionality; +- Fixed typos and outdated information in old documentation. + +#### Enhancements: +- Added a large dictionary of all ANSI escape codes and the GetAnsi() function to get it; +- CodColor() function renamed to AnsiForegroundColor(); +- Fully implemented AnsiColorSetInit and Logger classes based on HtmlColorSetInitQ and LoggerQ; +- Singleton pattern used by HtmlColorSetInitQ, LoggerQ, AnsiColorSetInit and Logger moved to a separate class; +- A base class has been created for LoggerQ and Logger, which includes initialization, setting up loggers and generating record strings (*at the moment, inherited classes are used to simplify interaction with the base class and use ready-made functionality, but in the future their own functionality will be expanded*); +- Optimized HexColor() and AnsiForegroundColor() functions; +- **The project structure has been completely changed** (*however, this only affects the development of the library and support for programs written with the version of the library v0.1.0 will remain, since the external attributes of communication with the library have not changed*); +- Added the DefaultColorScheme list, which stores a list of all colors that are used in the color schemes of the loggers and the GetDefaultColorScheme() function to get this list; +- Now the ColorPicker dictionary stores only color values in RGB, and other formats are obtained by converting RGB; +- Added functions Dec2Hex(), Dec2Ansi(), Hex2Dec(), Hex2Ansi(), Ansi2Dec(), Ansi2Hex(), which are used to convert one color value format to another; +- *The logic of assembling strings logging entry's has been completely changed*; +- The work of the HtmlColorSetInitQ and LoggerQ classes is adjusted to the new best functionality that is used in the new classes AnsiColorSetInit and Logger. + +--- + ## v0.1.0 (26.03.2023) #### Bug Fixes: - Fixed a bug that occurs when passing arguments to the LoggerQ constructor; -- Fixed a bug due to which the color value was not correctly saved in the journal's color table when changing the color manually. +- Fixed a bug due to which the color value was not correctly saved in the logger's color table when changing the color manually. #### Documenting: - Completed documentation of the library; @@ -50,7 +72,7 @@ limitations under the License. --- -## v0.0.8 (25.03.2023) +## v0.0.8 (25.03.2023) #### Bug Fixes: - Found and fixed several minor bugs. diff --git a/qt_colored_logger/__init__.py b/qt_colored_logger/__init__.py index 3444ad0..74ea050 100644 --- a/qt_colored_logger/__init__.py +++ b/qt_colored_logger/__init__.py @@ -18,9 +18,11 @@ # ---------------------------------------------------------------------------- # # ############################################################################ # +# todo Document all lists, dictionaries, etc. in README.md. + from .colored_logger import AnsiColorSetInit, Logger from .html_colored_logger import HtmlColorSetInitQ, LoggerQ __authot__ = "Kalynovsky 'Nakama3942' Valentin" -__version__ = "0.1.0" -__email__ = "nakama3942@gmail.com" \ No newline at end of file +__version__ = "0.2.0" +__email__ = "nakama3942@gmail.com" diff --git a/qt_colored_logger/src/ansi_format.py b/qt_colored_logger/src/ansi_format.py index 1d936cb..87049b4 100644 --- a/qt_colored_logger/src/ansi_format.py +++ b/qt_colored_logger/src/ansi_format.py @@ -155,6 +155,7 @@ def GetAnsi() -> dict: """ + todo Expand the functionality of the function Returns a complete dictionary of all ANSI escape codes.\n An example of working with ANSI escape codes:\n print(f"{GetAnsi()['reset']['on']}Test string")\n diff --git a/setup.py b/setup.py index c375f73..f4a9e69 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ setup( name="qt_colored_logger", - version="0.1.0", + version="0.2.0", author="Kalynovsky 'Nakama3942' Valentin", author_email="nakama3942@gmail.com", @@ -49,7 +49,7 @@ 'qt_colored_logger.basic.patterns' ], classifiers=[ - "Development Status :: 2 - Pre-Alpha", + "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent",