nercone-modern 1.11.3__tar.gz → 1.11.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nercone_modern-1.11.3 → nercone_modern-1.11.4}/PKG-INFO +2 -2
- {nercone_modern-1.11.3 → nercone_modern-1.11.4}/pyproject.toml +2 -2
- {nercone_modern-1.11.3 → nercone_modern-1.11.4}/src/nercone_modern/logging.py +5 -5
- {nercone_modern-1.11.3 → nercone_modern-1.11.4}/README.md +0 -0
- {nercone_modern-1.11.3 → nercone_modern-1.11.4}/src/nercone_modern/__init__.py +0 -0
- {nercone_modern-1.11.3 → nercone_modern-1.11.4}/src/nercone_modern/__main__.py +0 -0
- {nercone_modern-1.11.3 → nercone_modern-1.11.4}/src/nercone_modern/color.py +0 -0
- {nercone_modern-1.11.3 → nercone_modern-1.11.4}/src/nercone_modern/progressbar.py +0 -0
- {nercone_modern-1.11.3 → nercone_modern-1.11.4}/src/nercone_modern/text.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: nercone-modern
|
|
3
|
-
Version: 1.11.
|
|
3
|
+
Version: 1.11.4
|
|
4
4
|
Summary: Modern CLI Library
|
|
5
5
|
Author: Nercone
|
|
6
6
|
Author-email: Nercone <nercone@diamondgotcat.net>
|
|
@@ -8,7 +8,7 @@ License: MIT
|
|
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
|
9
9
|
Classifier: License :: OSI Approved :: MIT License
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
11
|
-
Requires-Dist:
|
|
11
|
+
Requires-Dist: strip-ansi
|
|
12
12
|
Requires-Python: >=3.6
|
|
13
13
|
Project-URL: Homepage, https://github.com/DiamondGotCat/nercone-modern
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
@@ -4,7 +4,7 @@ build-backend = "uv_build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "nercone-modern"
|
|
7
|
-
version = "1.11.
|
|
7
|
+
version = "1.11.4"
|
|
8
8
|
description = "Modern CLI Library"
|
|
9
9
|
readme = { file = "README.md", content-type = "text/markdown" }
|
|
10
10
|
authors = [
|
|
@@ -13,7 +13,7 @@ authors = [
|
|
|
13
13
|
license = { text = "MIT" }
|
|
14
14
|
requires-python = ">=3.6"
|
|
15
15
|
dependencies = [
|
|
16
|
-
"
|
|
16
|
+
"strip-ansi"
|
|
17
17
|
]
|
|
18
18
|
classifiers = [
|
|
19
19
|
"Programming Language :: Python :: 3",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import sys
|
|
10
10
|
from .color import ModernColor
|
|
11
|
-
from
|
|
11
|
+
from strip_ansi import strip_ansi
|
|
12
12
|
from datetime import datetime, timezone
|
|
13
13
|
|
|
14
14
|
ModernLoggingLevels = ["DEBUG", "INFO", "WARN", "ERROR", "CRITICAL"]
|
|
@@ -63,7 +63,7 @@ class ModernLogging:
|
|
|
63
63
|
_last_level = normalize_level(level_text.strip().upper())
|
|
64
64
|
if self.filepath:
|
|
65
65
|
with open(self.filepath, "a") as f:
|
|
66
|
-
f.write(f"{
|
|
66
|
+
f.write(f"{strip_ansi(log_line)}\n")
|
|
67
67
|
|
|
68
68
|
def prompt(self, message: str = "", level_text: str = "INFO", level_color: str | None = None, default: str | None = None, show_default: bool = False, choices: list[str] | None = None, show_choices: bool = True, interrupt_ignore: bool = False, interrupt_default: str | None = None) -> str:
|
|
69
69
|
if not is_higher_priority(level_text, self.display_level):
|
|
@@ -104,7 +104,7 @@ class ModernLogging:
|
|
|
104
104
|
self._rewrite_prompt_line_with_answer(log_line, answer)
|
|
105
105
|
if self.filepath:
|
|
106
106
|
with open(self.filepath, "a") as f:
|
|
107
|
-
f.write(f"{
|
|
107
|
+
f.write(f"{strip_ansi(log_line)}{answer}\n")
|
|
108
108
|
if choices:
|
|
109
109
|
selected = self._select_choice(answer, choices)
|
|
110
110
|
if selected is not None:
|
|
@@ -115,7 +115,7 @@ class ModernLogging:
|
|
|
115
115
|
print(log_line)
|
|
116
116
|
if self.filepath:
|
|
117
117
|
with open(self.filepath, "a") as f:
|
|
118
|
-
f.write(f"{
|
|
118
|
+
f.write(f"{strip_ansi(log_line)}{answer}\n")
|
|
119
119
|
log_line = self.make(message=message, level_text=level_text, level_color=level_color)
|
|
120
120
|
print(log_line, end="")
|
|
121
121
|
try:
|
|
@@ -142,7 +142,7 @@ class ModernLogging:
|
|
|
142
142
|
self._rewrite_prompt_line_with_answer(log_line, answer)
|
|
143
143
|
if self.filepath:
|
|
144
144
|
with open(self.filepath, "a") as f:
|
|
145
|
-
f.write(f"{
|
|
145
|
+
f.write(f"{strip_ansi(log_line)}{answer}\n")
|
|
146
146
|
if answer.strip() == "" and default is not None:
|
|
147
147
|
if choices:
|
|
148
148
|
selected_default = self._select_choice(default, choices)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|