pyhw 0.3.1__py3-none-any.whl → 0.3.3__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.
- pyhw/backend/cpu/linux.py +5 -0
- pyhw/backend/gpu/linux.py +12 -2
- pyhw/backend/os/linux.py +5 -0
- {pyhw-0.3.1.dist-info → pyhw-0.3.3.dist-info}/METADATA +8 -2
- {pyhw-0.3.1.dist-info → pyhw-0.3.3.dist-info}/RECORD +9 -9
- {pyhw-0.3.1.dist-info → pyhw-0.3.3.dist-info}/LICENSE +0 -0
- {pyhw-0.3.1.dist-info → pyhw-0.3.3.dist-info}/WHEEL +0 -0
- {pyhw-0.3.1.dist-info → pyhw-0.3.3.dist-info}/entry_points.txt +0 -0
- {pyhw-0.3.1.dist-info → pyhw-0.3.3.dist-info}/top_level.txt +0 -0
pyhw/backend/cpu/linux.py
CHANGED
@@ -68,6 +68,11 @@ class CPUDetectLinux:
|
|
68
68
|
model = compatible.split(",")[-1]
|
69
69
|
if model.startswith("bcm"):
|
70
70
|
self.__cpuInfo.model = model.upper()
|
71
|
+
elif "orangepi" in compatible:
|
72
|
+
if "allwinner" in compatible:
|
73
|
+
model = compatible.split(",")[-1]
|
74
|
+
if model.startswith("sun"):
|
75
|
+
self.__cpuInfo.model = f"Allwinner {model.split('-')[-1].upper()} ({model})"
|
71
76
|
else:
|
72
77
|
pass
|
73
78
|
|
pyhw/backend/gpu/linux.py
CHANGED
@@ -10,6 +10,7 @@ class GPUDetectLinux:
|
|
10
10
|
|
11
11
|
def getGPUInfo(self):
|
12
12
|
self.__getGPUInfo()
|
13
|
+
self.__sortGPUList()
|
13
14
|
return self.__gpuInfo
|
14
15
|
|
15
16
|
def __getGPUInfo(self):
|
@@ -20,9 +21,9 @@ class GPUDetectLinux:
|
|
20
21
|
if len(pci_info) == 0: # no pcie devices found
|
21
22
|
self.__handleNonePciDevices()
|
22
23
|
for line in pci_info.split("\n"):
|
23
|
-
if "VGA" in line or "Display" in line or "3D" in line:
|
24
|
+
if "VGA" in line or "Display" in line or "3D " in line:
|
24
25
|
gpu = line.split(": ")[1]
|
25
|
-
self.__gpuInfo.gpus.append(gpu)
|
26
|
+
self.__gpuInfo.gpus.append(self.__gpuNameClean(gpu))
|
26
27
|
self.__gpuInfo.number += 1
|
27
28
|
if self.__gpuInfo.number == 0:
|
28
29
|
self.__handleNonePciDevices() # fallback to a sbc device detection method
|
@@ -35,3 +36,12 @@ class GPUDetectLinux:
|
|
35
36
|
else:
|
36
37
|
self.__gpuInfo.number = 1
|
37
38
|
self.__gpuInfo.gpus.append("Not found")
|
39
|
+
|
40
|
+
@staticmethod
|
41
|
+
def __gpuNameClean(gpu_name: str):
|
42
|
+
gpu_name_clean = gpu_name.replace("Corporation", "")
|
43
|
+
return gpu_name_clean
|
44
|
+
|
45
|
+
def __sortGPUList(self):
|
46
|
+
self.__gpuInfo.gpus.sort()
|
47
|
+
|
pyhw/backend/os/linux.py
CHANGED
@@ -14,6 +14,7 @@ class OSDetectLinux:
|
|
14
14
|
:return: dataclass OSInfoLinux, direct attrs: prettyName
|
15
15
|
"""
|
16
16
|
self.__getOSInfo()
|
17
|
+
self.__handleArmbian()
|
17
18
|
return self.__osInfo
|
18
19
|
|
19
20
|
def __getOSInfo(self):
|
@@ -45,3 +46,7 @@ class OSDetectLinux:
|
|
45
46
|
self.__osInfo.buildID = value.strip('"')
|
46
47
|
except Exception:
|
47
48
|
pass
|
49
|
+
|
50
|
+
def __handleArmbian(self):
|
51
|
+
if "Armbian" in self.__osInfo.prettyName or "armbian" in self.__osInfo.prettyName:
|
52
|
+
self.__osInfo.id = "armbian"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyhw
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.3
|
4
4
|
Summary: PyHw, a neofetch-like command line tool for fetching system information but written mostly in python.
|
5
5
|
Author-email: Xiao Ran <xiaoran.007@icloud.com>
|
6
6
|
License: BSD-3-Clause
|
@@ -15,7 +15,7 @@ Description-Content-Type: text/markdown
|
|
15
15
|
License-File: LICENSE
|
16
16
|
|
17
17
|
# PyHw
|
18
|
-
](https://pepy.tech/project/pyhw)
|
19
19
|

|
20
20
|
|
21
21
|

|
@@ -26,6 +26,12 @@ PyHw, a neofetch-like command line tool for fetching system information but writ
|
|
26
26
|
|
27
27
|
This project is a Python reimplementation of [neofetch](https://github.com/dylanaraps/neofetch) and references the [fastfetch](https://github.com/fastfetch-cli/fastfetch) project for logo style settings. Since this project is implemented in Python, it will be easier to maintain and extend than bash and c implementation. Also, this project only relies on the Python standard library, so you can run it on any device that has a Python environment (I hope so 🤔).
|
28
28
|
|
29
|
+
|
30
|
+

|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
|
29
35
|
## Install
|
30
36
|
There are already a lot of similar tools so you can choose any of them; they're all essentially no different. If you want to try this tool, just install it directly by pip.
|
31
37
|
```shell
|
@@ -6,12 +6,12 @@ pyhw/backend/backendBase.py,sha256=t9FKQPdK7yFZF0vrsXpjIUJNKrB-cXYeL5MDohlgguA,4
|
|
6
6
|
pyhw/backend/cpu/__init__.py,sha256=5YfANJVRwNwTRodG0ENOgusrdN592aaSnfq5ok4dKTo,56
|
7
7
|
pyhw/backend/cpu/cpuBase.py,sha256=AGWqVjdvb82NiH4kxk3GERdBLwBNhkR23j2ei_l3S18,464
|
8
8
|
pyhw/backend/cpu/cpuInfo.py,sha256=A_nNGElq9W7oZ5DFJowLdFBE0ZvXKr5h29E6TGAvbRc,251
|
9
|
-
pyhw/backend/cpu/linux.py,sha256=
|
9
|
+
pyhw/backend/cpu/linux.py,sha256=zJ2cOwQHtolJrMMY1WXVbLLIRNPxeClUgzLAAkd7As4,3346
|
10
10
|
pyhw/backend/cpu/macos.py,sha256=mnnH9ABiBgAiyA8-H9_tq2PC5OeneVLj67nMGoLDXh4,2873
|
11
11
|
pyhw/backend/gpu/__init__.py,sha256=EpMjPvUaXt0LTNMvGmB8WgXbUB9keCxuOhu8NT3Re6o,56
|
12
12
|
pyhw/backend/gpu/gpuBase.py,sha256=Ge0DX2P8_EB7ovM7glmPUnVsPJL3OUHV2t_1T5mimR0,409
|
13
13
|
pyhw/backend/gpu/gpuInfo.py,sha256=d_z_z5DiZAg85wP0VOBQEU0QHdaK3qFqA2Tp9Eq8-Zs,133
|
14
|
-
pyhw/backend/gpu/linux.py,sha256=
|
14
|
+
pyhw/backend/gpu/linux.py,sha256=xWgjKCuO9DwLR2NC6JlGFkEyDey5_zt7AnSVKPUk1_s,1714
|
15
15
|
pyhw/backend/gpu/macos.py,sha256=sgrROfJC59KWjxfW2n90thVEjgDNYYLWo_pETDFPKQA,2308
|
16
16
|
pyhw/backend/host/__init__.py,sha256=Efaj7-Oya7H8HdpZHQCLrwn-mcfPb-d6yfh4dzsE_7I,58
|
17
17
|
pyhw/backend/host/hostBase.py,sha256=POyDW3f5JSWtEKyCfrVSBEddSwoywe_OBgUExCEuje8,563
|
@@ -31,7 +31,7 @@ pyhw/backend/memory/memoryBase.py,sha256=RFRWTByH25T3T77maxLyIRRoedIi5M8XLtVbvwB
|
|
31
31
|
pyhw/backend/memory/memoryInfo.py,sha256=OQF165uEyuapAsi7cKacQYDRnKdrQHeldfyFwzS9N2g,186
|
32
32
|
pyhw/backend/metal/t.py,sha256=52yv-JoXNfaIOfcxEEidIg0MoyFtzWvTRm550kQKPZA,391
|
33
33
|
pyhw/backend/os/__init__.py,sha256=rPHQYdQK3qU6ZwwodqVoEWeqBnKffXlJyi4k3-8ViPY,53
|
34
|
-
pyhw/backend/os/linux.py,sha256=
|
34
|
+
pyhw/backend/os/linux.py,sha256=UDUSbCMQQJZqfRFHS270u-ZrW4KfqZxcS_vQZl6VbPo,1977
|
35
35
|
pyhw/backend/os/macos.py,sha256=DwgpwRD1a2oTANR_XL3kkMzNawqrt23F79dqBw3ULK8,1906
|
36
36
|
pyhw/backend/os/osBase.py,sha256=AA17HIwmWy7E6nCtqbojTNsHKtcNuehf51FxGcfXu7A,462
|
37
37
|
pyhw/backend/os/osInfo.py,sha256=iLPc7INFHH3izascwooj4JBVgvBsSgVPXWBlFXG47mQ,378
|
@@ -69,9 +69,9 @@ pyhw/pyhwException/pyhwException.py,sha256=wxuzFQa9g7XB1q9TUKO_55lw7wMEJMpzG8w1G
|
|
69
69
|
pyhw/pyhwUtil/__init__.py,sha256=PzeP9fXsIhvr3sUpJ4DxW9_H25DEIasBFfXd_NztfR4,226
|
70
70
|
pyhw/pyhwUtil/pyhwUtil.py,sha256=qJREsuPU_lq7T0Ictc-_BkGEp0Zh24Ptq8aklkEe6GY,2292
|
71
71
|
pyhw/pyhwUtil/sysctlUtil.py,sha256=S-rUvqi7ZrMyMouIhxlyHEQ4agM7sCT1Y7uzs3Hu5-o,841
|
72
|
-
pyhw-0.3.
|
73
|
-
pyhw-0.3.
|
74
|
-
pyhw-0.3.
|
75
|
-
pyhw-0.3.
|
76
|
-
pyhw-0.3.
|
77
|
-
pyhw-0.3.
|
72
|
+
pyhw-0.3.3.dist-info/LICENSE,sha256=hJs6RBqSVCexbTsalkMLNFI5t06kekQEsSVaOt_-yLs,1497
|
73
|
+
pyhw-0.3.3.dist-info/METADATA,sha256=3o7JFBZkOOb0-YiPvH6N8byalKwspXxR88d4cvK7_eU,4041
|
74
|
+
pyhw-0.3.3.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
|
75
|
+
pyhw-0.3.3.dist-info/entry_points.txt,sha256=q-AB8im_QahpmNrmy4aPTJRGi0LlbNlnI3kF7s6pKss,44
|
76
|
+
pyhw-0.3.3.dist-info/top_level.txt,sha256=7Inxvxt1TngEricKZEex9_WJZS3DbKYFUXDz4v5WHYU,5
|
77
|
+
pyhw-0.3.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|