pymecli 0.6.4__tar.gz → 0.6.5__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.
- {pymecli-0.6.4 → pymecli-0.6.5}/PKG-INFO +1 -1
- {pymecli-0.6.4 → pymecli-0.6.5}/cli/util.py +34 -18
- {pymecli-0.6.4 → pymecli-0.6.5}/pyproject.toml +1 -1
- {pymecli-0.6.4 → pymecli-0.6.5}/.gitignore +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/README.md +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/api/__init__.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/api/v1/__init__.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/api/v1/clash.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/api/v1/redis.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/cli/__init__.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/cli/bitget.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/cli/dnspod.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/cli/dst.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/cli/etcd_sync.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/cli/example.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/cli/fast.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/cli/gate.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/cli/okx.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/cli/quark.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/cli/redis_csv.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/cli/tele.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/core/__init__.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/core/clash.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/core/config.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/core/redis_client.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/crypto/__init__.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/crypto/bitget.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/crypto/gate.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/crypto/okx.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/data/__init__.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/data/dou_dict.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/data/dou_list.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/data/main.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/data/template.yaml +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/models/__init__.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/models/douzero_model.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/models/ocr_model.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/models/response.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/utils/__init__.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/utils/elapsed.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/utils/etcd.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/utils/helper.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/utils/logger.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/utils/mysql.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/utils/notify.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/utils/path.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/utils/pd.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/utils/pyredis.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/utils/sendNotify.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/utils/sleep.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/utils/text.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.5}/utils/toml.py +0 -0
|
@@ -12,6 +12,8 @@ import pytz
|
|
|
12
12
|
import typer
|
|
13
13
|
from babel.dates import format_datetime
|
|
14
14
|
from cowsay.__main__ import cli
|
|
15
|
+
from tabulate import tabulate
|
|
16
|
+
from wcwidth import wcswidth
|
|
15
17
|
|
|
16
18
|
from utils.pyredis import get_redis_client_sync
|
|
17
19
|
|
|
@@ -65,24 +67,38 @@ def emoji():
|
|
|
65
67
|
"""
|
|
66
68
|
打印自己常用的『emoji』符号
|
|
67
69
|
"""
|
|
68
|
-
emoji_list =
|
|
69
|
-
"『"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
70
|
+
emoji_list = (
|
|
71
|
+
"『 』 ✓ ✗ ⇡ ⇣ ❎ ✅ 📢 🧪 🔎 🚀 🧮 💊 🐸 🐷 🐢"
|
|
72
|
+
" 🐶 🔖️ 📌 🐻 ☕ 🧸 📋 🍀 🍾 🥑 🍹"
|
|
73
|
+
" 🌞 🎉 🍼 🥇 🦊 🍉 🍈 🍑 🌐 🐠 🌱 🍭 💎 🎯 🌻"
|
|
74
|
+
" ⬇️ ⬆️ ↕️ 🍅 🍥 ☃️ 🐳 🤖 🪃 💰 🦣 🦄 🐼 ♂️ ♀️ 🐝"
|
|
75
|
+
).split()
|
|
76
|
+
|
|
77
|
+
# 把每个 emoji 补到 len=2 且 wcswidth=2,保证 tabulate 算列宽和终端显示一致
|
|
78
|
+
# FE0F 是 emoji 变体检视符:加了之后 SMP emoji len 从 1 变 2,wcswidth 仍是 2
|
|
79
|
+
VS = "\ufe0f"
|
|
80
|
+
|
|
81
|
+
def pad(e: str) -> str:
|
|
82
|
+
w = wcswidth(e)
|
|
83
|
+
l = len(e)
|
|
84
|
+
# SMP emoji: len=1, wcsw=2 → 加 VS 变 len=2, wcsw=2
|
|
85
|
+
if l == 1 and w == 2:
|
|
86
|
+
e = e + VS
|
|
87
|
+
# 窄符号: wcsw=1 → 加空格补显示宽度
|
|
88
|
+
space = " " * max(0, 2 - wcswidth(e))
|
|
89
|
+
return e + space
|
|
90
|
+
padded = [pad(e) for e in emoji_list]
|
|
91
|
+
|
|
92
|
+
# 重排成 10 列的二维表,最后一行空位填空字符串
|
|
93
|
+
rows = []
|
|
94
|
+
for i in range(0, len(padded), 10):
|
|
95
|
+
row = padded[i : i + 10]
|
|
96
|
+
while len(row) < 10:
|
|
97
|
+
row.append("")
|
|
98
|
+
rows.append(row)
|
|
99
|
+
|
|
100
|
+
cols = [f"{i}" for i in range(1, 11)]
|
|
101
|
+
print(tabulate(rows, headers=cols, tablefmt="grid"))
|
|
86
102
|
|
|
87
103
|
|
|
88
104
|
def strf_time(zone: str):
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|