fosslight-util 2.1.30__tar.gz → 2.1.31__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.
Files changed (48) hide show
  1. {fosslight_util-2.1.30/src/fosslight_util.egg-info → fosslight_util-2.1.31}/PKG-INFO +2 -1
  2. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/requirements.txt +1 -0
  3. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/setup.py +1 -1
  4. fosslight_util-2.1.31/src/fosslight_util/help.py +108 -0
  5. {fosslight_util-2.1.30 → fosslight_util-2.1.31/src/fosslight_util.egg-info}/PKG-INFO +2 -1
  6. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util.egg-info/requires.txt +1 -0
  7. fosslight_util-2.1.30/src/fosslight_util/help.py +0 -75
  8. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/LICENSE +0 -0
  9. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/MANIFEST.in +0 -0
  10. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/README.md +0 -0
  11. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/setup.cfg +0 -0
  12. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/__init__.py +0 -0
  13. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/_get_downloadable_url.py +0 -0
  14. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/compare_yaml.py +0 -0
  15. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/constant.py +0 -0
  16. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/correct.py +0 -0
  17. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/cover.py +0 -0
  18. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/download.py +0 -0
  19. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/exclude.py +0 -0
  20. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/get_pom_license.py +0 -0
  21. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/oss_item.py +0 -0
  22. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/output_format.py +0 -0
  23. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/parsing_yaml.py +0 -0
  24. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/read_excel.py +0 -0
  25. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/resources/frequentLicenselist.json +0 -0
  26. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/resources/frequent_license_nick_list.json +0 -0
  27. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/resources/licenses.json +0 -0
  28. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/set_log.py +0 -0
  29. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/spdx_licenses.py +0 -0
  30. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/timer_thread.py +0 -0
  31. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/write_cyclonedx.py +0 -0
  32. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/write_excel.py +0 -0
  33. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/write_opossum.py +0 -0
  34. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/write_scancodejson.py +0 -0
  35. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/write_spdx.py +0 -0
  36. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/write_txt.py +0 -0
  37. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util/write_yaml.py +0 -0
  38. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util.egg-info/SOURCES.txt +0 -0
  39. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util.egg-info/dependency_links.txt +0 -0
  40. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util.egg-info/entry_points.txt +0 -0
  41. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/src/fosslight_util.egg-info/top_level.txt +0 -0
  42. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/tests/test_cyclonedx.py +0 -0
  43. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/tests/test_download.py +0 -0
  44. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/tests/test_opossum.py +0 -0
  45. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/tests/test_spdx_licenses.py +0 -0
  46. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/tests/test_text.py +0 -0
  47. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/tests/test_write_output.py +0 -0
  48. {fosslight_util-2.1.30 → fosslight_util-2.1.31}/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.30
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
@@ -14,3 +14,4 @@ numpy
14
14
  requests
15
15
  GitPython
16
16
  cyclonedx-python-lib==8.5.*;sys_platform=="linux"
17
+ defusedxml
@@ -14,7 +14,7 @@ with open('requirements.txt', 'r', 'utf-8') as f:
14
14
  if __name__ == "__main__":
15
15
  setup(
16
16
  name='fosslight_util',
17
- version='2.1.30',
17
+ version='2.1.31',
18
18
  package_dir={"": "src"},
19
19
  packages=find_packages(where='src'),
20
20
  description='FOSSLight Util',
@@ -0,0 +1,108 @@
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
+ _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}
55
+ """
56
+
57
+
58
+ _HELP_MESSAGE_DOWNLOAD = """
59
+ FOSSLight Downloader is a tool to download the package via input URL
60
+
61
+ Usage: fosslight_download [option1] <arg1> [options2] <arg2>
62
+ ex) fosslight_download -s http://github.com/fosslight/fosslight -t output_dir -d log_dir
63
+
64
+ Required:
65
+ -s\t\t URL of the package to be downloaded
66
+
67
+ Optional:
68
+ -h\t\t Print help message
69
+ -t\t\t Output path name
70
+ -d\t\t Directory name to save the log file
71
+ -s\t\t Source link to download
72
+ -t\t\t Directory to download source code
73
+ -c\t\t Checkout to branch or tag/ or version
74
+ -z\t\t Unzip only compressed file
75
+ -o\t\t Generate summary output file with this option"""
76
+
77
+
78
+ class PrintHelpMsg():
79
+
80
+ def __init__(self, value: str = ""):
81
+ self.message_suffix = value
82
+
83
+ def print_help_msg(self, exitopt: bool) -> None:
84
+ print(_HELP_MESSAGE_COMMON)
85
+ print(self.message_suffix)
86
+
87
+ if exitopt:
88
+ sys.exit()
89
+
90
+
91
+ def print_package_version(pkg_name: str, msg: str = "", exitopt: bool = True) -> str:
92
+ if msg == "":
93
+ msg = f"{pkg_name} Version:"
94
+ try:
95
+ cur_version = version(pkg_name)
96
+ except PackageNotFoundError:
97
+ cur_version = "unknown"
98
+
99
+ if exitopt:
100
+ print(f'{msg} {cur_version}')
101
+ sys.exit(0)
102
+ else:
103
+ return cur_version
104
+
105
+
106
+ def print_help_msg_download(exitOpt=True):
107
+ helpMsg = PrintHelpMsg(_HELP_MESSAGE_DOWNLOAD)
108
+ helpMsg.print_help_msg(exitOpt)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fosslight_util
3
- Version: 2.1.30
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
@@ -11,6 +11,7 @@ setuptools>=65.5.1
11
11
  numpy
12
12
  requests
13
13
  GitPython
14
+ defusedxml
14
15
 
15
16
  [:sys_platform == "linux"]
16
17
  spdx-tools==0.8.*
@@ -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