bluer-options 5.170.1__py3-none-any.whl → 5.173.1__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.
- bluer_options/__init__.py +1 -1
- bluer_options/logger/__main__.py +32 -0
- bluer_options/logger/watch.py +19 -0
- {bluer_options-5.170.1.dist-info → bluer_options-5.173.1.dist-info}/METADATA +1 -1
- {bluer_options-5.170.1.dist-info → bluer_options-5.173.1.dist-info}/RECORD +8 -6
- {bluer_options-5.170.1.dist-info → bluer_options-5.173.1.dist-info}/WHEEL +0 -0
- {bluer_options-5.170.1.dist-info → bluer_options-5.173.1.dist-info}/licenses/LICENSE +0 -0
- {bluer_options-5.170.1.dist-info → bluer_options-5.173.1.dist-info}/top_level.txt +0 -0
bluer_options/__init__.py
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import argparse
|
|
2
|
+
|
|
3
|
+
from blueness import module
|
|
4
|
+
from blueness.argparse.generic import sys_exit
|
|
5
|
+
|
|
6
|
+
from bluer_options import NAME
|
|
7
|
+
from bluer_options.logger.watch import watch
|
|
8
|
+
from bluer_options.logger import logger
|
|
9
|
+
|
|
10
|
+
NAME = module.name(__file__, NAME)
|
|
11
|
+
|
|
12
|
+
parser = argparse.ArgumentParser(NAME)
|
|
13
|
+
parser.add_argument(
|
|
14
|
+
"task",
|
|
15
|
+
type=str,
|
|
16
|
+
help="watch",
|
|
17
|
+
)
|
|
18
|
+
parser.add_argument(
|
|
19
|
+
"--seconds",
|
|
20
|
+
type=int,
|
|
21
|
+
default=1,
|
|
22
|
+
help="in seconds.",
|
|
23
|
+
)
|
|
24
|
+
args = parser.parse_args()
|
|
25
|
+
|
|
26
|
+
success = False
|
|
27
|
+
if args.task == "watch":
|
|
28
|
+
success = watch(seconds=args.seconds)
|
|
29
|
+
else:
|
|
30
|
+
success = None
|
|
31
|
+
|
|
32
|
+
sys_exit(logger, NAME, args.task, success)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import time
|
|
2
|
+
|
|
3
|
+
from bluer_options.env import bluer_ai_log_filename
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def watch(seconds: int = 1) -> bool:
|
|
7
|
+
try:
|
|
8
|
+
with open(bluer_ai_log_filename, "r") as f:
|
|
9
|
+
f.seek(0, 2) # jump to end of file
|
|
10
|
+
while True:
|
|
11
|
+
line = f.readline()
|
|
12
|
+
if not line:
|
|
13
|
+
time.sleep(seconds)
|
|
14
|
+
continue
|
|
15
|
+
print(line, end="")
|
|
16
|
+
except KeyboardInterrupt:
|
|
17
|
+
print("\n^C received.")
|
|
18
|
+
|
|
19
|
+
return True
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
bluer_options/__init__.py,sha256=
|
|
1
|
+
bluer_options/__init__.py,sha256=KI-1j_f-6NEP1UupvqgLtCTcLwcf3SdkSRCpr9EtqGk,288
|
|
2
2
|
bluer_options/__main__.py,sha256=-6ce9W1uXkle4YtEYlSUMWxSmsur3dRDA4_MvNNhEVg,236
|
|
3
3
|
bluer_options/config.env,sha256=2AG3xuWiMqaNmlCNDWQOJ_AssKk7KXhn0XDIkHWNQ2Q,30
|
|
4
4
|
bluer_options/timer.py,sha256=UPmsfCjbEWpcjXgMpYemXieheMJH_UpuemhVGsKYVoE,2470
|
|
@@ -51,7 +51,9 @@ bluer_options/host/functions.py,sha256=SZnEaPp1dvQuWi8K_skwI3wQXr7PKtwUBI1qJ2Rqo
|
|
|
51
51
|
bluer_options/list/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
52
52
|
bluer_options/list/__main__.py,sha256=er69iqdooU9Hb-7Vl6CAUMgQmZApSq_BTDnLT4xCjWI,3646
|
|
53
53
|
bluer_options/logger/__init__.py,sha256=2k9853tBtpTx00sBQwI_YTyacYpN6WK6obK4IWMvz7s,158
|
|
54
|
+
bluer_options/logger/__main__.py,sha256=YetPs-lCkHDrmMgFB7pVs9icIqT5aFVA2nU0bgFN7_w,625
|
|
54
55
|
bluer_options/logger/config.py,sha256=fBsZb1sTLf_iVR_Cq7Xpiyka4cp0OV-Ps2GFrdz_g9U,3475
|
|
56
|
+
bluer_options/logger/watch.py,sha256=4FJjbstlsAl3EF_2vx9Dshe4EmGrkR-VAQXZOmGV6jc,486
|
|
55
57
|
bluer_options/options/__init__.py,sha256=q0Ymi9oCBwgN0g7NVeYh4XgiICOtH8W8Wuaa52NH-rw,50
|
|
56
58
|
bluer_options/options/__main__.py,sha256=wnCzX2dxIgrjZ6qoDnE_YBE6xzJO5ME5u-gCPmb02cw,1479
|
|
57
59
|
bluer_options/options/classes.py,sha256=dcfGd34y6vDYvj-v-Bb5uOyy79mwV0s98czYFJ9hB9U,2211
|
|
@@ -65,8 +67,8 @@ bluer_options/terminal/functions.py,sha256=A23uHLeU4JIctmecOFk_KhIfOeHu-WMjnSzBj
|
|
|
65
67
|
bluer_options/timing/__init__.py,sha256=CCIJKvRVdimLdk46WOc_C-t8HHTVFPdGxQTFCFrN5zc,127
|
|
66
68
|
bluer_options/timing/classes.py,sha256=iIzoMtR8SXNJcDGDPCJodRqUHPAPrEMTUCsMQ-BOuZg,3398
|
|
67
69
|
bluer_options/timing/elapsed_timer.py,sha256=ecM11nzXnoDL_k6p41YPH28-OLnYreg_CgPQlbv4mjI,897
|
|
68
|
-
bluer_options-5.
|
|
69
|
-
bluer_options-5.
|
|
70
|
-
bluer_options-5.
|
|
71
|
-
bluer_options-5.
|
|
72
|
-
bluer_options-5.
|
|
70
|
+
bluer_options-5.173.1.dist-info/licenses/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
|
|
71
|
+
bluer_options-5.173.1.dist-info/METADATA,sha256=x1icIdxhCYmJfJNugItK1gx9Q6Blh9KNVoJ9cmK9qU4,4951
|
|
72
|
+
bluer_options-5.173.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
73
|
+
bluer_options-5.173.1.dist-info/top_level.txt,sha256=yw9slt8n3R7IiYmf83OtHtB8Z-EgP9UwyQTk1EGiAJU,14
|
|
74
|
+
bluer_options-5.173.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|