fosslight-util 2.1.30__py3-none-any.whl → 2.1.31__py3-none-any.whl
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.
- fosslight_util/help.py +44 -11
- {fosslight_util-2.1.30.dist-info → fosslight_util-2.1.31.dist-info}/METADATA +2 -1
- {fosslight_util-2.1.30.dist-info → fosslight_util-2.1.31.dist-info}/RECORD +7 -7
- {fosslight_util-2.1.30.dist-info → fosslight_util-2.1.31.dist-info}/WHEEL +0 -0
- {fosslight_util-2.1.30.dist-info → fosslight_util-2.1.31.dist-info}/entry_points.txt +0 -0
- {fosslight_util-2.1.30.dist-info → fosslight_util-2.1.31.dist-info}/licenses/LICENSE +0 -0
- {fosslight_util-2.1.30.dist-info → fosslight_util-2.1.31.dist-info}/top_level.txt +0 -0
fosslight_util/help.py
CHANGED
|
@@ -3,22 +3,55 @@
|
|
|
3
3
|
# Copyright (c) 2021 LG Electronics Inc.
|
|
4
4
|
# SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
import sys
|
|
6
|
+
import os
|
|
6
7
|
try:
|
|
7
8
|
from importlib.metadata import version, PackageNotFoundError
|
|
8
9
|
except ImportError:
|
|
9
10
|
from importlib_metadata import version, PackageNotFoundError # Python <3.8
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
|
|
13
|
+
def _supports_color():
|
|
14
|
+
"""Check if the terminal supports color."""
|
|
15
|
+
# Check if output is redirected or if NO_COLOR environment variable is set
|
|
16
|
+
if not hasattr(sys.stdout, 'isatty') or not sys.stdout.isatty():
|
|
17
|
+
return False
|
|
18
|
+
if os.environ.get('NO_COLOR'):
|
|
19
|
+
return False
|
|
20
|
+
# Windows cmd.exe support (Windows 10+)
|
|
21
|
+
if sys.platform == 'win32':
|
|
22
|
+
return True
|
|
23
|
+
# Unix-like systems
|
|
24
|
+
return True
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
if _supports_color():
|
|
28
|
+
_RESET = "\033[0m"
|
|
29
|
+
_BOLD = "\033[1m"
|
|
30
|
+
_C1 = "\033[1;38;2;230;140;165m" # Toned Down Light Pink
|
|
31
|
+
_C2 = "\033[1;38;2;217;115;153m" # Toned Down Pink
|
|
32
|
+
_C3 = "\033[1;38;2;242;115;166m" # Medium Light Pink
|
|
33
|
+
_C4 = "\033[1;38;2;230;77;140m" # Pink
|
|
34
|
+
_C5 = "\033[1;38;2;217;38;115m" # Pink-Red
|
|
35
|
+
_C6 = "\033[1;38;2;191;19;89m" # Medium Red
|
|
36
|
+
_C7 = "\033[1;38;2;165;0;52m" # Burgundy (#A50034) - Middle
|
|
37
|
+
_C8 = "\033[1;38;2;140;0;44m" # Dark Burgundy
|
|
38
|
+
_C9 = "\033[1;38;2;115;0;36m" # Darker Burgundy
|
|
39
|
+
_C10 = "\033[1;38;2;89;0;28m" # Very Dark Burgundy
|
|
40
|
+
_STAR = "\033[1;38;5;226m" # Bright Yellow for stars
|
|
41
|
+
else:
|
|
42
|
+
# No color support
|
|
43
|
+
_RESET = _BOLD = _C1 = _C2 = _C3 = _C4 = _C5 = _C6 = _C7 = _C8 = _C9 = _C10 = _STAR = ""
|
|
44
|
+
|
|
45
|
+
_HELP_MESSAGE_COMMON = f"""
|
|
46
|
+
{_STAR} ═════════════════════════════════════════════════════════════════════{_RESET}
|
|
47
|
+
{_C1} ███████╗ {_C1}██████╗ {_C2}███████╗ {_C2}███████╗{_C3}██╗ {_C3}██╗ {_C4}██████╗ {_C5}██╗ {_C5}██╗{_C6}████████╗{_RESET}
|
|
48
|
+
{_C1} ██╔════╝{_C2}██╔═══██╗{_C2}██╔════╝ {_C3}██╔════╝{_C3}██║ {_C4}██║{_C4}██╔════╝ {_C5}██║ {_C6}██║{_C6}╚══██╔══╝{_RESET}
|
|
49
|
+
{_C2} █████╗ {_C2}██║ ██║{_C3}███████╗ {_C3}███████╗{_C4}██║ {_C5}██║{_C5}██║ ███╗{_C6}███████║{_C7} {_C7}██║ {_RESET}
|
|
50
|
+
{_C3} ██╔══╝ {_C3}██║ ██║{_C4}╚════██║ {_C4}╚════██║{_C5}██║ {_C6}██║{_C6}██║ ██║{_C7}██╔══██║{_C8} {_C8}██║ {_RESET}
|
|
51
|
+
{_C3} ██║ {_C4}╚██████╔╝{_C5}███████║ {_C5}███████║{_C6}███████╗{_C7}██║{_C7}╚██████╔╝{_C8}██║ {_C9}██║ {_C9}██║ {_RESET}
|
|
52
|
+
{_C4} ╚═╝ {_C5}╚═════╝ {_C5}╚══════╝ {_C6}╚══════╝{_C7}╚══════╝{_C8}╚═╝ {_C8}╚═════╝ {_C9}╚═╝ {_C10}╚═╝ {_C10}╚═╝ {_RESET}
|
|
53
|
+
{_STAR} ═════════════════════════════════════════════════════════════════════{_RESET}
|
|
54
|
+
{_STAR} ✨ Open Source Analysis Tool ✨{_RESET}
|
|
22
55
|
"""
|
|
23
56
|
|
|
24
57
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fosslight_util
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.31
|
|
4
4
|
Summary: FOSSLight Util
|
|
5
5
|
Home-page: https://github.com/fosslight/fosslight_util
|
|
6
6
|
Download-URL: https://github.com/fosslight/fosslight_util
|
|
@@ -28,6 +28,7 @@ Requires-Dist: numpy
|
|
|
28
28
|
Requires-Dist: requests
|
|
29
29
|
Requires-Dist: GitPython
|
|
30
30
|
Requires-Dist: cyclonedx-python-lib==8.5.*; sys_platform == "linux"
|
|
31
|
+
Requires-Dist: defusedxml
|
|
31
32
|
Dynamic: author
|
|
32
33
|
Dynamic: classifier
|
|
33
34
|
Dynamic: description
|
|
@@ -7,7 +7,7 @@ fosslight_util/cover.py,sha256=qqqKzxqFwKimal764FaugRUBcHWdeKt8af6xeK0mH8E,2040
|
|
|
7
7
|
fosslight_util/download.py,sha256=AWwD3FWhF-bMagWINJ-Dg1VMuycXbe8VXX7qQ09YjYs,23565
|
|
8
8
|
fosslight_util/exclude.py,sha256=fDmBsZJ_F7O9Oh2T-07R03XNbElo1tFaf_z01KfSAqU,2399
|
|
9
9
|
fosslight_util/get_pom_license.py,sha256=x4_RHpM91s01j1OUWpKIxUjTGDH6y5AxTNDGkMajs4I,4253
|
|
10
|
-
fosslight_util/help.py,sha256=
|
|
10
|
+
fosslight_util/help.py,sha256=nMS7TkrjFeBCwxHDrD1yFLScLhXIh3t_FuQsZJUBP0w,5084
|
|
11
11
|
fosslight_util/oss_item.py,sha256=8890JHb5ZoKQWAwN7Fl8badnlYatJtF4MVJz1rdS4yQ,6938
|
|
12
12
|
fosslight_util/output_format.py,sha256=BP23LspxawDZ_a99oWLVKWUQ-G7P5uoUpjEXhkRFKwc,8801
|
|
13
13
|
fosslight_util/parsing_yaml.py,sha256=2zx_N5lMkXT1dRmfJMpzlrru-y_2F_CkVbGlba6vQpU,5380
|
|
@@ -25,9 +25,9 @@ fosslight_util/write_yaml.py,sha256=QlEKoIPQsEaYERfbP53TeKgnllYzhLQWm5wYjnWtVjE,
|
|
|
25
25
|
fosslight_util/resources/frequentLicenselist.json,sha256=GUhzK6tu7ok10fekOnmVmUgIGRC-acGABZKTNKfDyYA,4776157
|
|
26
26
|
fosslight_util/resources/frequent_license_nick_list.json,sha256=ryU2C_6ZxHbz90_sUN9OvI9GXkCMLu7oGcmd9W79YYo,5005
|
|
27
27
|
fosslight_util/resources/licenses.json,sha256=mK55z-bhY7Mjpj2KsO1crKGGL-X3F6MBFQJ0zLlx010,240843
|
|
28
|
-
fosslight_util-2.1.
|
|
29
|
-
fosslight_util-2.1.
|
|
30
|
-
fosslight_util-2.1.
|
|
31
|
-
fosslight_util-2.1.
|
|
32
|
-
fosslight_util-2.1.
|
|
33
|
-
fosslight_util-2.1.
|
|
28
|
+
fosslight_util-2.1.31.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
29
|
+
fosslight_util-2.1.31.dist-info/METADATA,sha256=aAyYCFccvQnt0KDxkH4JtzhCubqG6Z5OXQ60yI7dmR8,6365
|
|
30
|
+
fosslight_util-2.1.31.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
|
|
31
|
+
fosslight_util-2.1.31.dist-info/entry_points.txt,sha256=0yZggRWNwDaClDG8UmUA10UFG8cVX3Jiy5gG9nW7hJs,68
|
|
32
|
+
fosslight_util-2.1.31.dist-info/top_level.txt,sha256=2qyYWGLakgBRy4BqoBNt-I5C29tBr_e93e5e1pbuTGA,15
|
|
33
|
+
fosslight_util-2.1.31.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|