bluer-options 5.189.1__py3-none-any.whl → 5.198.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.
Potentially problematic release.
This version of bluer-options might be problematic. Click here for more details.
- bluer_options/.bash/eval.sh +22 -9
- bluer_options/__init__.py +1 -1
- bluer_options/logger/__init__.py +1 -0
- bluer_options/logger/config.py +18 -3
- {bluer_options-5.189.1.dist-info → bluer_options-5.198.1.dist-info}/METADATA +1 -1
- {bluer_options-5.189.1.dist-info → bluer_options-5.198.1.dist-info}/RECORD +9 -9
- {bluer_options-5.189.1.dist-info → bluer_options-5.198.1.dist-info}/WHEEL +0 -0
- {bluer_options-5.189.1.dist-info → bluer_options-5.198.1.dist-info}/licenses/LICENSE +0 -0
- {bluer_options-5.189.1.dist-info → bluer_options-5.198.1.dist-info}/top_level.txt +0 -0
bluer_options/.bash/eval.sh
CHANGED
|
@@ -5,13 +5,19 @@ function bluer_ai_eval() {
|
|
|
5
5
|
local do_dryrun=$(bluer_ai_option_int "$options" dryrun 0)
|
|
6
6
|
local do_log=$(bluer_ai_option_int "$options" log 1)
|
|
7
7
|
local path=$(bluer_ai_option "$options" path ./)
|
|
8
|
+
local in_background=$(bluer_ai_option_int "$options" background 0)
|
|
8
9
|
|
|
9
10
|
[[ "$path" != "./" ]] && mkdir -pv $path
|
|
10
11
|
|
|
11
12
|
local command_line="${@:2}"
|
|
12
13
|
|
|
13
14
|
if [[ "$do_log" == 1 ]]; then
|
|
14
|
-
|
|
15
|
+
if [[ "$in_background" == 1 ]]; then
|
|
16
|
+
bluer_ai_log "⚙️ in background: $command_line"
|
|
17
|
+
else
|
|
18
|
+
bluer_ai_log "⚙️ $command_line"
|
|
19
|
+
fi
|
|
20
|
+
|
|
15
21
|
[[ "$path" != "./" ]] && bluer_ai_log " 📂 $path"
|
|
16
22
|
fi
|
|
17
23
|
|
|
@@ -19,15 +25,22 @@ function bluer_ai_eval() {
|
|
|
19
25
|
|
|
20
26
|
[[ "$path" != "./" ]] && pushd $path >/dev/null
|
|
21
27
|
|
|
22
|
-
|
|
23
|
-
|
|
28
|
+
if [[ "$in_background" == 1 ]]; then
|
|
29
|
+
source \
|
|
30
|
+
$abcli_path_bash/bluer_ai.sh \
|
|
31
|
+
$options \
|
|
32
|
+
"$command_line" &
|
|
33
|
+
else
|
|
34
|
+
eval "$command_line"
|
|
35
|
+
local status="$?"
|
|
24
36
|
|
|
25
|
-
|
|
37
|
+
[[ "$path" != "./" ]] && popd >/dev/null
|
|
26
38
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
39
|
+
if [[ $status -ne 0 ]]; then
|
|
40
|
+
bluer_ai_log_error "@eval: failed: status=$status: $command_line"
|
|
41
|
+
return 1
|
|
42
|
+
fi
|
|
31
43
|
|
|
32
|
-
|
|
44
|
+
return 0
|
|
45
|
+
fi
|
|
33
46
|
}
|
bluer_options/__init__.py
CHANGED
bluer_options/logger/__init__.py
CHANGED
bluer_options/logger/config.py
CHANGED
|
@@ -48,16 +48,31 @@ def crash_report(description):
|
|
|
48
48
|
logger.error(f"crash: {description}", exc_info=1)
|
|
49
49
|
|
|
50
50
|
|
|
51
|
+
def shorten_text(
|
|
52
|
+
text: str,
|
|
53
|
+
max_length: int = 100,
|
|
54
|
+
) -> str:
|
|
55
|
+
return (
|
|
56
|
+
"{}...".format(
|
|
57
|
+
text[: max_length - 3],
|
|
58
|
+
)
|
|
59
|
+
if len(text) > max_length
|
|
60
|
+
else text
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
|
|
51
64
|
def log_long_text(
|
|
52
65
|
logger: Logger,
|
|
53
66
|
text: str,
|
|
54
67
|
max_length: int = 100,
|
|
55
68
|
):
|
|
56
69
|
logger.info(
|
|
57
|
-
"{:,} char(s): {}
|
|
70
|
+
"{:,} char(s): {}".format(
|
|
58
71
|
len(text),
|
|
59
|
-
|
|
60
|
-
|
|
72
|
+
shorten_text(
|
|
73
|
+
text=text,
|
|
74
|
+
max_length=max_length,
|
|
75
|
+
),
|
|
61
76
|
)
|
|
62
77
|
)
|
|
63
78
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
bluer_options/__init__.py,sha256=
|
|
1
|
+
bluer_options/__init__.py,sha256=fn_eaxidks3mXb8J1DKxtNBnSKQ3cl0u--w3ORAi1VE,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
|
|
@@ -10,7 +10,7 @@ bluer_options/.bash/bool.sh,sha256=gjNTKqjKSeOG_wyaRDRaDzX_hSnAyjFvTNEuDUBR8cc,1
|
|
|
10
10
|
bluer_options/.bash/browse.sh,sha256=t-YxlnIrFrSUFrkhX3Kpv0iF4VxWtzjihlWQKlFcXjE,532
|
|
11
11
|
bluer_options/.bash/code.sh,sha256=z0LDbe73ZN46sTPln33V-SIhxmp_UqBT35kKvuukNAQ,320
|
|
12
12
|
bluer_options/.bash/env.sh,sha256=xpzO7I6BeonXTL_kF2MGpJISLPwCygRWaHxmRosxy_c,521
|
|
13
|
-
bluer_options/.bash/eval.sh,sha256=
|
|
13
|
+
bluer_options/.bash/eval.sh,sha256=RO9IKWJkgzbn751qdPZ-tes410dzs32PvGQ7TwdK7kU,1212
|
|
14
14
|
bluer_options/.bash/generic_task.sh,sha256=o0W_XQqV9SfmhDiy3jegx6P9XQsLKWny7l931TlIICQ,1205
|
|
15
15
|
bluer_options/.bash/help.sh,sha256=n0JnRWmqigfbJfyxBQ4WZaOsCdLL-ctN2U5C0Kuv0JQ,591
|
|
16
16
|
bluer_options/.bash/install.sh,sha256=lUF5Pfs7ND0UJTjopGU_P5VTspKHL3eaB3jj9VqWAt0,594
|
|
@@ -50,9 +50,9 @@ bluer_options/host/__main__.py,sha256=A0Z-sAG9lVpQx9ULzroAINPw2sZyzouUvwrYU_8QtS
|
|
|
50
50
|
bluer_options/host/functions.py,sha256=enPoxWBzKujMXnyg7kP-SFM2bbZI6vh12AonX6TnydU,4202
|
|
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
|
-
bluer_options/logger/__init__.py,sha256=
|
|
53
|
+
bluer_options/logger/__init__.py,sha256=UdUJHEQxgBC0Kn4TCEX_Nrwbec_gE82-ZTc_PugBXGk,176
|
|
54
54
|
bluer_options/logger/__main__.py,sha256=YetPs-lCkHDrmMgFB7pVs9icIqT5aFVA2nU0bgFN7_w,625
|
|
55
|
-
bluer_options/logger/config.py,sha256=
|
|
55
|
+
bluer_options/logger/config.py,sha256=HOkygUtlXoBY_SFQ_FMWpPHuvptaP00wMbGg6CzN25c,3885
|
|
56
56
|
bluer_options/logger/watch.py,sha256=4FJjbstlsAl3EF_2vx9Dshe4EmGrkR-VAQXZOmGV6jc,486
|
|
57
57
|
bluer_options/options/__init__.py,sha256=q0Ymi9oCBwgN0g7NVeYh4XgiICOtH8W8Wuaa52NH-rw,50
|
|
58
58
|
bluer_options/options/__main__.py,sha256=wnCzX2dxIgrjZ6qoDnE_YBE6xzJO5ME5u-gCPmb02cw,1479
|
|
@@ -67,8 +67,8 @@ bluer_options/terminal/functions.py,sha256=A23uHLeU4JIctmecOFk_KhIfOeHu-WMjnSzBj
|
|
|
67
67
|
bluer_options/timing/__init__.py,sha256=CCIJKvRVdimLdk46WOc_C-t8HHTVFPdGxQTFCFrN5zc,127
|
|
68
68
|
bluer_options/timing/classes.py,sha256=6savdv6s_2IJaGvTzHK_umeu51Qoj4JCJc_Ey4WEAyY,3795
|
|
69
69
|
bluer_options/timing/elapsed_timer.py,sha256=ecM11nzXnoDL_k6p41YPH28-OLnYreg_CgPQlbv4mjI,897
|
|
70
|
-
bluer_options-5.
|
|
71
|
-
bluer_options-5.
|
|
72
|
-
bluer_options-5.
|
|
73
|
-
bluer_options-5.
|
|
74
|
-
bluer_options-5.
|
|
70
|
+
bluer_options-5.198.1.dist-info/licenses/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
|
|
71
|
+
bluer_options-5.198.1.dist-info/METADATA,sha256=iE4WHjSABuZmVyslnMISfeeDZ-JlqGfpIfCJJI1YpvQ,4951
|
|
72
|
+
bluer_options-5.198.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
73
|
+
bluer_options-5.198.1.dist-info/top_level.txt,sha256=yw9slt8n3R7IiYmf83OtHtB8Z-EgP9UwyQTk1EGiAJU,14
|
|
74
|
+
bluer_options-5.198.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|