LinuxMonitor 1.3.9__tar.gz → 1.3.10__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.
- {linuxmonitor-1.3.9 → linuxmonitor-1.3.10/LinuxMonitor.egg-info}/PKG-INFO +1 -1
- {linuxmonitor-1.3.9/LinuxMonitor.egg-info → linuxmonitor-1.3.10}/PKG-INFO +1 -1
- {linuxmonitor-1.3.9 → linuxmonitor-1.3.10}/linuxmonitor/linuxmonitor.py +10 -5
- {linuxmonitor-1.3.9 → linuxmonitor-1.3.10}/setup.py +1 -1
- {linuxmonitor-1.3.9 → linuxmonitor-1.3.10}/LICENSE.md +0 -0
- {linuxmonitor-1.3.9 → linuxmonitor-1.3.10}/LinuxMonitor.egg-info/SOURCES.txt +0 -0
- {linuxmonitor-1.3.9 → linuxmonitor-1.3.10}/LinuxMonitor.egg-info/dependency_links.txt +0 -0
- {linuxmonitor-1.3.9 → linuxmonitor-1.3.10}/LinuxMonitor.egg-info/requires.txt +0 -0
- {linuxmonitor-1.3.9 → linuxmonitor-1.3.10}/LinuxMonitor.egg-info/top_level.txt +0 -0
- {linuxmonitor-1.3.9 → linuxmonitor-1.3.10}/README.md +0 -0
- {linuxmonitor-1.3.9 → linuxmonitor-1.3.10}/linuxmonitor/__init__.py +0 -0
- {linuxmonitor-1.3.9 → linuxmonitor-1.3.10}/linuxmonitor/__main__.py +0 -0
- {linuxmonitor-1.3.9 → linuxmonitor-1.3.10}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: LinuxMonitor
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.10
|
|
4
4
|
Summary: Get information and warning status of Linux server like service, port, ping, ssl certificate, disk/folder/cpu/ram/swap usage, ip connection, ... (Python and shell library, Linux ONLY)
|
|
5
5
|
Home-page: https://github.com/QuentinCG/Linux-Monitor-Python-Library
|
|
6
6
|
Author: Quentin Comte-Gaz
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: LinuxMonitor
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.10
|
|
4
4
|
Summary: Get information and warning status of Linux server like service, port, ping, ssl certificate, disk/folder/cpu/ram/swap usage, ip connection, ... (Python and shell library, Linux ONLY)
|
|
5
5
|
Home-page: https://github.com/QuentinCG/Linux-Monitor-Python-Library
|
|
6
6
|
Author: Quentin Comte-Gaz
|
|
@@ -33,7 +33,7 @@ __email__ = "quentin@comte-gaz.com"
|
|
|
33
33
|
__license__ = "MIT License"
|
|
34
34
|
__copyright__ = "Copyright Quentin Comte-Gaz (2024)"
|
|
35
35
|
__python_version__ = "3.+"
|
|
36
|
-
__version__ = "1.3.
|
|
36
|
+
__version__ = "1.3.10 (2024/09/23)"
|
|
37
37
|
__status__ = "Usable for any Linux project"
|
|
38
38
|
|
|
39
39
|
import json
|
|
@@ -196,6 +196,9 @@ class LinuxMonitor:
|
|
|
196
196
|
md: str = ""
|
|
197
197
|
indent: str = " " * level # type: ignore # Indentation for markdown headings
|
|
198
198
|
|
|
199
|
+
# Preprocess the input to convert single quotes to double quotes
|
|
200
|
+
json_string = re.sub(r"'", '"', json_string)
|
|
201
|
+
|
|
199
202
|
# Parse the JSON string to a Python object
|
|
200
203
|
try:
|
|
201
204
|
data = json.loads(json_string)
|
|
@@ -212,11 +215,13 @@ class LinuxMonitor:
|
|
|
212
215
|
md += f"{indent}- {key}\n"
|
|
213
216
|
process_data(value, level + 1) # type: ignore
|
|
214
217
|
elif isinstance(data, list):
|
|
215
|
-
|
|
216
|
-
md += f"{indent}-
|
|
217
|
-
|
|
218
|
+
if not data: # Show "nothing" for empty lists
|
|
219
|
+
md += f"{indent}- Nothing\n"
|
|
220
|
+
else:
|
|
221
|
+
for item in data: # type: ignore
|
|
222
|
+
process_data(item, level) # Skip "Item" label # type: ignore
|
|
218
223
|
else:
|
|
219
|
-
md += f"{indent}
|
|
224
|
+
md += f"{indent}- {data}\n"
|
|
220
225
|
|
|
221
226
|
process_data(data, level)
|
|
222
227
|
|
|
@@ -6,7 +6,7 @@ with io.open(file='README.md', mode='r', encoding='utf-8') as readme_file:
|
|
|
6
6
|
|
|
7
7
|
setup(
|
|
8
8
|
name="LinuxMonitor",
|
|
9
|
-
version="1.3.
|
|
9
|
+
version="1.3.10",
|
|
10
10
|
description="Get information and warning status of Linux server like service, port, ping, ssl certificate, disk/folder/cpu/ram/swap usage, ip connection, ... (Python and shell library, Linux ONLY)",
|
|
11
11
|
long_description=readme,
|
|
12
12
|
long_description_content_type="text/markdown",
|
|
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
|