fosslight-util 2.1.30__tar.gz → 2.1.32__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.
- {fosslight_util-2.1.30/src/fosslight_util.egg-info → fosslight_util-2.1.32}/PKG-INFO +2 -1
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/requirements.txt +1 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/setup.py +1 -1
- fosslight_util-2.1.32/src/fosslight_util/help.py +107 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32/src/fosslight_util.egg-info}/PKG-INFO +2 -1
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util.egg-info/requires.txt +1 -0
- fosslight_util-2.1.30/src/fosslight_util/help.py +0 -75
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/LICENSE +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/MANIFEST.in +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/README.md +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/setup.cfg +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/__init__.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/_get_downloadable_url.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/compare_yaml.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/constant.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/correct.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/cover.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/download.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/exclude.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/get_pom_license.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/oss_item.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/output_format.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/parsing_yaml.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/read_excel.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/resources/frequentLicenselist.json +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/resources/frequent_license_nick_list.json +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/resources/licenses.json +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/set_log.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/spdx_licenses.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/timer_thread.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/write_cyclonedx.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/write_excel.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/write_opossum.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/write_scancodejson.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/write_spdx.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/write_txt.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util/write_yaml.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util.egg-info/SOURCES.txt +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util.egg-info/dependency_links.txt +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util.egg-info/entry_points.txt +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util.egg-info/top_level.txt +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/tests/test_cyclonedx.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/tests/test_download.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/tests/test_opossum.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/tests/test_spdx_licenses.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/tests/test_text.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/tests/test_write_output.py +0 -0
- {fosslight_util-2.1.30 → fosslight_util-2.1.32}/tests/test_write_yaml.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fosslight_util
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.32
|
|
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
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
# Copyright (c) 2021 LG Electronics Inc.
|
|
4
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
import sys
|
|
6
|
+
import os
|
|
7
|
+
try:
|
|
8
|
+
from importlib.metadata import version, PackageNotFoundError
|
|
9
|
+
except ImportError:
|
|
10
|
+
from importlib_metadata import version, PackageNotFoundError # Python <3.8
|
|
11
|
+
|
|
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
|
+
_C1 = "\033[1;38;5;218m" # Light Pink
|
|
30
|
+
_C2 = "\033[1;38;5;211m" # Pink
|
|
31
|
+
_C3 = "\033[1;38;5;212m" # Medium Light Pink
|
|
32
|
+
_C4 = "\033[1;38;5;205m" # Pink
|
|
33
|
+
_C5 = "\033[1;38;5;198m" # Pink-Red
|
|
34
|
+
_C6 = "\033[1;38;5;161m" # Medium Red
|
|
35
|
+
_C7 = "\033[1;38;5;125m" # Burgundy - Middle
|
|
36
|
+
_C8 = "\033[1;38;5;88m" # Dark Burgundy
|
|
37
|
+
_C9 = "\033[1;38;5;52m" # Darker Burgundy
|
|
38
|
+
_C10 = "\033[1;38;5;53m" # Very Dark Burgundy
|
|
39
|
+
_STAR = "\033[1;38;5;226m" # Bright Yellow for stars
|
|
40
|
+
else:
|
|
41
|
+
# No color support
|
|
42
|
+
_RESET = _C1 = _C2 = _C3 = _C4 = _C5 = _C6 = _C7 = _C8 = _C9 = _C10 = _STAR = ""
|
|
43
|
+
|
|
44
|
+
_HELP_MESSAGE_COMMON = f"""
|
|
45
|
+
{_STAR} ═════════════════════════════════════════════════════════════════════{_RESET}
|
|
46
|
+
{_C1} ███████╗ {_C1}██████╗ {_C2}███████╗ {_C2}███████╗{_C3}██╗ {_C3}██╗ {_C4}██████╗ {_C5}██╗ {_C5}██╗{_C6}████████╗{_RESET}
|
|
47
|
+
{_C1} ██╔════╝{_C2}██╔═══██╗{_C2}██╔════╝ {_C3}██╔════╝{_C3}██║ {_C4}██║{_C4}██╔════╝ {_C5}██║ {_C6}██║{_C6}╚══██╔══╝{_RESET}
|
|
48
|
+
{_C2} █████╗ {_C2}██║ ██║{_C3}███████╗ {_C3}███████╗{_C4}██║ {_C5}██║{_C5}██║ ███╗{_C6}███████║{_C7} {_C7}██║ {_RESET}
|
|
49
|
+
{_C3} ██╔══╝ {_C3}██║ ██║{_C4}╚════██║ {_C4}╚════██║{_C5}██║ {_C6}██║{_C6}██║ ██║{_C7}██╔══██║{_C8} {_C8}██║ {_RESET}
|
|
50
|
+
{_C3} ██║ {_C4}╚██████╔╝{_C5}███████║ {_C5}███████║{_C6}███████╗{_C7}██║{_C7}╚██████╔╝{_C8}██║ {_C9}██║ {_C9}██║ {_RESET}
|
|
51
|
+
{_C4} ╚═╝ {_C5}╚═════╝ {_C5}╚══════╝ {_C6}╚══════╝{_C7}╚══════╝{_C8}╚═╝ {_C8}╚═════╝ {_C9}╚═╝ {_C10}╚═╝ {_C10}╚═╝ {_RESET}
|
|
52
|
+
{_STAR} ═════════════════════════════════════════════════════════════════════{_RESET}
|
|
53
|
+
{_STAR} ✨ Open Source Analysis Tool ✨{_RESET}
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
_HELP_MESSAGE_DOWNLOAD = """
|
|
58
|
+
FOSSLight Downloader is a tool to download the package via input URL
|
|
59
|
+
|
|
60
|
+
Usage: fosslight_download [option1] <arg1> [options2] <arg2>
|
|
61
|
+
ex) fosslight_download -s http://github.com/fosslight/fosslight -t output_dir -d log_dir
|
|
62
|
+
|
|
63
|
+
Required:
|
|
64
|
+
-s\t\t URL of the package to be downloaded
|
|
65
|
+
|
|
66
|
+
Optional:
|
|
67
|
+
-h\t\t Print help message
|
|
68
|
+
-t\t\t Output path name
|
|
69
|
+
-d\t\t Directory name to save the log file
|
|
70
|
+
-s\t\t Source link to download
|
|
71
|
+
-t\t\t Directory to download source code
|
|
72
|
+
-c\t\t Checkout to branch or tag/ or version
|
|
73
|
+
-z\t\t Unzip only compressed file
|
|
74
|
+
-o\t\t Generate summary output file with this option"""
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class PrintHelpMsg():
|
|
78
|
+
|
|
79
|
+
def __init__(self, value: str = ""):
|
|
80
|
+
self.message_suffix = value
|
|
81
|
+
|
|
82
|
+
def print_help_msg(self, exitopt: bool) -> None:
|
|
83
|
+
print(_HELP_MESSAGE_COMMON)
|
|
84
|
+
print(self.message_suffix)
|
|
85
|
+
|
|
86
|
+
if exitopt:
|
|
87
|
+
sys.exit()
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def print_package_version(pkg_name: str, msg: str = "", exitopt: bool = True) -> str:
|
|
91
|
+
if msg == "":
|
|
92
|
+
msg = f"{pkg_name} Version:"
|
|
93
|
+
try:
|
|
94
|
+
cur_version = version(pkg_name)
|
|
95
|
+
except PackageNotFoundError:
|
|
96
|
+
cur_version = "unknown"
|
|
97
|
+
|
|
98
|
+
if exitopt:
|
|
99
|
+
print(f'{msg} {cur_version}')
|
|
100
|
+
sys.exit(0)
|
|
101
|
+
else:
|
|
102
|
+
return cur_version
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def print_help_msg_download(exitOpt=True):
|
|
106
|
+
helpMsg = PrintHelpMsg(_HELP_MESSAGE_DOWNLOAD)
|
|
107
|
+
helpMsg.print_help_msg(exitOpt)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fosslight_util
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.32
|
|
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
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python
|
|
2
|
-
# -*- coding: utf-8 -*-
|
|
3
|
-
# Copyright (c) 2021 LG Electronics Inc.
|
|
4
|
-
# SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
import sys
|
|
6
|
-
try:
|
|
7
|
-
from importlib.metadata import version, PackageNotFoundError
|
|
8
|
-
except ImportError:
|
|
9
|
-
from importlib_metadata import version, PackageNotFoundError # Python <3.8
|
|
10
|
-
|
|
11
|
-
_HELP_MESSAGE_COMMON = """
|
|
12
|
-
_______ _______ _______ _______ ___ ___ __
|
|
13
|
-
| || || || || | |___| | | _
|
|
14
|
-
| ___|| _ || _____|| _____|| | ___ | |____ __| |__
|
|
15
|
-
| |___ | | | || |_____ | |_____ | | | | _______ | _ ||__ __|
|
|
16
|
-
| ___|| |_| ||_____ ||_____ || |___ | || _ || | | | | |
|
|
17
|
-
| | | | _____| | _____| || || || |_| || | | | | |__
|
|
18
|
-
|___| |_______||_______||_______||_______||___||____ ||__| |__| |____|
|
|
19
|
-
| |
|
|
20
|
-
____| |
|
|
21
|
-
|_______|
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
_HELP_MESSAGE_DOWNLOAD = """
|
|
26
|
-
FOSSLight Downloader is a tool to download the package via input URL
|
|
27
|
-
|
|
28
|
-
Usage: fosslight_download [option1] <arg1> [options2] <arg2>
|
|
29
|
-
ex) fosslight_download -s http://github.com/fosslight/fosslight -t output_dir -d log_dir
|
|
30
|
-
|
|
31
|
-
Required:
|
|
32
|
-
-s\t\t URL of the package to be downloaded
|
|
33
|
-
|
|
34
|
-
Optional:
|
|
35
|
-
-h\t\t Print help message
|
|
36
|
-
-t\t\t Output path name
|
|
37
|
-
-d\t\t Directory name to save the log file
|
|
38
|
-
-s\t\t Source link to download
|
|
39
|
-
-t\t\t Directory to download source code
|
|
40
|
-
-c\t\t Checkout to branch or tag/ or version
|
|
41
|
-
-z\t\t Unzip only compressed file
|
|
42
|
-
-o\t\t Generate summary output file with this option"""
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
class PrintHelpMsg():
|
|
46
|
-
|
|
47
|
-
def __init__(self, value: str = ""):
|
|
48
|
-
self.message_suffix = value
|
|
49
|
-
|
|
50
|
-
def print_help_msg(self, exitopt: bool) -> None:
|
|
51
|
-
print(_HELP_MESSAGE_COMMON)
|
|
52
|
-
print(self.message_suffix)
|
|
53
|
-
|
|
54
|
-
if exitopt:
|
|
55
|
-
sys.exit()
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
def print_package_version(pkg_name: str, msg: str = "", exitopt: bool = True) -> str:
|
|
59
|
-
if msg == "":
|
|
60
|
-
msg = f"{pkg_name} Version:"
|
|
61
|
-
try:
|
|
62
|
-
cur_version = version(pkg_name)
|
|
63
|
-
except PackageNotFoundError:
|
|
64
|
-
cur_version = "unknown"
|
|
65
|
-
|
|
66
|
-
if exitopt:
|
|
67
|
-
print(f'{msg} {cur_version}')
|
|
68
|
-
sys.exit(0)
|
|
69
|
-
else:
|
|
70
|
-
return cur_version
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
def print_help_msg_download(exitOpt=True):
|
|
74
|
-
helpMsg = PrintHelpMsg(_HELP_MESSAGE_DOWNLOAD)
|
|
75
|
-
helpMsg.print_help_msg(exitOpt)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{fosslight_util-2.1.30 → fosslight_util-2.1.32}/src/fosslight_util.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|