pyhw 0.7.3__py3-none-any.whl → 0.7.4__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- pyhw/__init__.py +1 -1
- pyhw/backend/nic/linux.py +20 -3
- pyhw/library/lib/iokitGPULib.dylib +0 -0
- {pyhw-0.7.3.dist-info → pyhw-0.7.4.dist-info}/METADATA +7 -3
- {pyhw-0.7.3.dist-info → pyhw-0.7.4.dist-info}/RECORD +9 -10
- pyhw/library/lib/iokitHostLib.dylib +0 -0
- {pyhw-0.7.3.dist-info → pyhw-0.7.4.dist-info}/LICENSE +0 -0
- {pyhw-0.7.3.dist-info → pyhw-0.7.4.dist-info}/WHEEL +0 -0
- {pyhw-0.7.3.dist-info → pyhw-0.7.4.dist-info}/entry_points.txt +0 -0
- {pyhw-0.7.3.dist-info → pyhw-0.7.4.dist-info}/top_level.txt +0 -0
pyhw/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '0.7.
|
1
|
+
__version__ = '0.7.4'
|
pyhw/backend/nic/linux.py
CHANGED
@@ -3,6 +3,7 @@ from .nicInfo import NICInfo
|
|
3
3
|
from ...pyhwUtil import getArch
|
4
4
|
from ...pyhwException import BackendException
|
5
5
|
import pypci
|
6
|
+
import os
|
6
7
|
|
7
8
|
|
8
9
|
class NICDetectLinux:
|
@@ -28,9 +29,25 @@ class NICDetectLinux:
|
|
28
29
|
self._nicInfo.number += 1
|
29
30
|
|
30
31
|
def __handleNonePciDevices(self):
|
31
|
-
#
|
32
|
-
|
33
|
-
|
32
|
+
# need to update
|
33
|
+
interfaces = list()
|
34
|
+
for i in os.listdir('/sys/class/net/'):
|
35
|
+
if i == "lo":
|
36
|
+
continue
|
37
|
+
interfaces.append(i)
|
38
|
+
if len(interfaces) > 0:
|
39
|
+
for interface in interfaces:
|
40
|
+
try:
|
41
|
+
if_ip = subprocess.run(["bash", "-c", f"ip -4 addr show {interface} | grep inet | awk '{{print $2}}'"], capture_output=True, text=True).stdout.strip().split("/")[0]
|
42
|
+
self._nicInfo.nics.append(f"{interface} @ {if_ip}")
|
43
|
+
self._nicInfo.number += 1
|
44
|
+
except:
|
45
|
+
pass
|
46
|
+
else:
|
47
|
+
pass
|
48
|
+
if self._nicInfo.number == 0:
|
49
|
+
self._nicInfo.nics.append("Not found")
|
50
|
+
self._nicInfo.number = 1
|
34
51
|
|
35
52
|
@staticmethod
|
36
53
|
def _nicNameClean(nic_name: str):
|
Binary file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: pyhw
|
3
|
-
Version: 0.7.
|
3
|
+
Version: 0.7.4
|
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
|
@@ -33,8 +33,8 @@ This project is a Python reimplementation of [neofetch](https://github.com/dylan
|
|
33
33
|
|
34
34
|
|
35
35
|
[//]: # ()
|
36
|
-
![demo]
|
37
|
-
|
36
|
+
[//]: # ()
|
37
|
+

|
38
38
|
|
39
39
|
|
40
40
|
|
@@ -97,6 +97,10 @@ This is due to the fact that system python is not supposed to be managed by pip.
|
|
97
97
|
* Linux arm64, x86_64
|
98
98
|
* FreeBSD arm64
|
99
99
|
|
100
|
+
## Add Logo
|
101
|
+
1. Create a file named **\<os>.pyhw** in **logo/ascii** folder
|
102
|
+
2. Modify **colorConfig.py** file to add a new logo style
|
103
|
+
3. Update **pyhwUtil.py** to enable new logo style.
|
100
104
|
|
101
105
|
## Build from source
|
102
106
|
Currently, build process relay on swiftc and macOS IOKit framework. To build package from source, you need a Mac machine with macOS 11 and newer.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
pyhw/__init__.py,sha256=
|
1
|
+
pyhw/__init__.py,sha256=lBlBxbnftiADKPpC3XRA3jUPjRsVclCd3P95aQ33p_g,22
|
2
2
|
pyhw/__main__.py,sha256=A0t0jkcwdTXd6ca7POUfm8krjCn2FQaXTIss5gNmNcI,1775
|
3
3
|
pyhw/backend/__init__.py,sha256=knn_3Yroow1h0dqdrozk3zyy3vz-kQyNBRjR6OLmVoY,50
|
4
4
|
pyhw/backend/backendBase.py,sha256=mloo8mPEbgbIdmyQ3I4vdEXMSSjxWi_wnwACmzvHbEo,506
|
@@ -35,7 +35,7 @@ pyhw/backend/memory/memoryInfo.py,sha256=OQF165uEyuapAsi7cKacQYDRnKdrQHeldfyFwzS
|
|
35
35
|
pyhw/backend/metal/t.py,sha256=52yv-JoXNfaIOfcxEEidIg0MoyFtzWvTRm550kQKPZA,391
|
36
36
|
pyhw/backend/nic/__init__.py,sha256=eP4eOYIvMF3LcTf954hJa6TnB8R4Qahss2g-UcgypKY,57
|
37
37
|
pyhw/backend/nic/bsd.py,sha256=lIXnPqzSA2qexUt0P9OHMmxoI5c5XBi2V80RY9S0wsM,135
|
38
|
-
pyhw/backend/nic/linux.py,sha256=
|
38
|
+
pyhw/backend/nic/linux.py,sha256=3H91Nw87frzZA4P6Q5GbjHSaI7q4Q5-v6R8BgdvplgQ,1976
|
39
39
|
pyhw/backend/nic/macos.py,sha256=63gZjSmUGwGqfs41IWrEXmSz9O8eQy4G5oql3JLZmoo,855
|
40
40
|
pyhw/backend/nic/nicBase.py,sha256=cT_rxqIEcvvKFsvjKlkCJ8RIfp7QHxDE9_SImXDae0s,735
|
41
41
|
pyhw/backend/nic/nicInfo.py,sha256=wuBuL-aIzD441IUDPGz5e0xctcZ-opdpgqkVxgbvZLg,133
|
@@ -85,16 +85,15 @@ pyhw/frontend/logo/ascii/macOS.pyhw,sha256=HBGROtBb7wrNtRqAQ9ND7zxK0l17BRsmpgc2d
|
|
85
85
|
pyhw/frontend/logo/ascii/raspbian.pyhw,sha256=jEl6WMKF-FGx359ipQ1kzweUJS-NuauYQCFaYime4PQ,159
|
86
86
|
pyhw/frontend/logo/ascii/ubuntu.pyhw,sha256=l-Q0PfutxXYMwTojqeiM88063x4V0RBkZUHmi6YdsNc,833
|
87
87
|
pyhw/frontend/logo/ascii/ubuntu_small.pyhw,sha256=Xf8LSZdZUu9aEG3efhb1FUlUEuJ-3UztcIOJISpKhPw,229
|
88
|
-
pyhw/library/lib/iokitGPULib.dylib,sha256=
|
89
|
-
pyhw/library/lib/iokitHostLib.dylib,sha256=PKNLMhHwB6-sKDaeo3izbPR88OgzjuRGaLV0NvNWVRk,149256
|
88
|
+
pyhw/library/lib/iokitGPULib.dylib,sha256=DcJ0GZY79gTFckLFYtZgeKn1T0NFvdO_k_ccCa7od5Y,154808
|
90
89
|
pyhw/pyhwException/__init__.py,sha256=8JsFvtF13g0Y5t4z9fRndDXtfCzuBM59jDf6PhWSFSk,220
|
91
90
|
pyhw/pyhwException/pyhwException.py,sha256=wxuzFQa9g7XB1q9TUKO_55lw7wMEJMpzG8w1GVTFVa0,197
|
92
91
|
pyhw/pyhwUtil/__init__.py,sha256=diIqlNUBfuHu-2VAOJk5nipGLafnWxR3chAAOmX8QRo,250
|
93
92
|
pyhw/pyhwUtil/pyhwUtil.py,sha256=6aKYh7sEPkqrfevckJO7MGmehGwgu_QVniFjVOw4dYk,6297
|
94
93
|
pyhw/pyhwUtil/sysctlUtil.py,sha256=S-rUvqi7ZrMyMouIhxlyHEQ4agM7sCT1Y7uzs3Hu5-o,841
|
95
|
-
pyhw-0.7.
|
96
|
-
pyhw-0.7.
|
97
|
-
pyhw-0.7.
|
98
|
-
pyhw-0.7.
|
99
|
-
pyhw-0.7.
|
100
|
-
pyhw-0.7.
|
94
|
+
pyhw-0.7.4.dist-info/LICENSE,sha256=hJs6RBqSVCexbTsalkMLNFI5t06kekQEsSVaOt_-yLs,1497
|
95
|
+
pyhw-0.7.4.dist-info/METADATA,sha256=uRpLICG3Fl7YN7ofwJBnoD38B_D9T2_jE7yxN6Ive7M,5791
|
96
|
+
pyhw-0.7.4.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
97
|
+
pyhw-0.7.4.dist-info/entry_points.txt,sha256=q-AB8im_QahpmNrmy4aPTJRGi0LlbNlnI3kF7s6pKss,44
|
98
|
+
pyhw-0.7.4.dist-info/top_level.txt,sha256=7Inxvxt1TngEricKZEex9_WJZS3DbKYFUXDz4v5WHYU,5
|
99
|
+
pyhw-0.7.4.dist-info/RECORD,,
|
Binary file
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|