pymecli 0.6.4__tar.gz → 0.6.6__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.6}/PKG-INFO +2 -1
- {pymecli-0.6.4 → pymecli-0.6.6}/cli/util.py +31 -18
- {pymecli-0.6.4 → pymecli-0.6.6}/pyproject.toml +3 -2
- {pymecli-0.6.4 → pymecli-0.6.6}/.gitignore +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/README.md +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/api/__init__.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/api/v1/__init__.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/api/v1/clash.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/api/v1/redis.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/cli/__init__.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/cli/bitget.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/cli/dnspod.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/cli/dst.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/cli/etcd_sync.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/cli/example.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/cli/fast.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/cli/gate.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/cli/okx.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/cli/quark.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/cli/redis_csv.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/cli/tele.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/core/__init__.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/core/clash.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/core/config.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/core/redis_client.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/crypto/__init__.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/crypto/bitget.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/crypto/gate.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/crypto/okx.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/data/__init__.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/data/dou_dict.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/data/dou_list.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/data/main.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/data/template.yaml +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/models/__init__.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/models/douzero_model.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/models/ocr_model.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/models/response.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/utils/__init__.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/utils/elapsed.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/utils/etcd.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/utils/helper.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/utils/logger.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/utils/mysql.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/utils/notify.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/utils/path.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/utils/pd.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/utils/pyredis.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/utils/sendNotify.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/utils/sleep.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/utils/text.py +0 -0
- {pymecli-0.6.4 → pymecli-0.6.6}/utils/toml.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: pymecli
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.6
|
|
4
4
|
Summary: My CLI
|
|
5
5
|
Project-URL: Homepage, https://pypi.org/project/pymecli
|
|
6
6
|
Project-URL: Repository, https://github.com/meme2046/pymecli
|
|
@@ -34,6 +34,7 @@ Requires-Dist: telethon>=1.44.0
|
|
|
34
34
|
Requires-Dist: toml>=0.10.2
|
|
35
35
|
Requires-Dist: typer>=0.20.1
|
|
36
36
|
Requires-Dist: uvicorn>=0.40.0
|
|
37
|
+
Requires-Dist: wcwidth==0.8.5
|
|
37
38
|
Requires-Dist: webdriver-manager>=4.0.2
|
|
38
39
|
Description-Content-Type: text/markdown
|
|
39
40
|
|
|
@@ -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 ljust, wcswidth
|
|
15
17
|
|
|
16
18
|
from utils.pyredis import get_redis_client_sync
|
|
17
19
|
|
|
@@ -65,24 +67,35 @@ 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
|
+
# tabulate 用 len() 算列宽,终端用 wcswidth() 算显示宽度,
|
|
78
|
+
# 需要把每个 emoji 补到 len=2 且 wcswidth=2 才能对齐
|
|
79
|
+
# - SMP emoji (len=1, wcsw=2): 加 VS(U+FE0F) 变 len=2
|
|
80
|
+
# - 窄符号 (wcsw=1): 用 wcwidth.ljust 补空格到 wcsw=2
|
|
81
|
+
VS = "\ufe0f"
|
|
82
|
+
|
|
83
|
+
def pad(e: str) -> str:
|
|
84
|
+
if len(e) == 1 and wcswidth(e) == 2:
|
|
85
|
+
e += VS
|
|
86
|
+
return ljust(e, 2)
|
|
87
|
+
|
|
88
|
+
padded = [pad(e) for e in emoji_list]
|
|
89
|
+
|
|
90
|
+
rows = []
|
|
91
|
+
for i in range(0, len(padded), 10):
|
|
92
|
+
row = padded[i : i + 10]
|
|
93
|
+
while len(row) < 10:
|
|
94
|
+
row.append("")
|
|
95
|
+
rows.append(row)
|
|
96
|
+
|
|
97
|
+
cols = [f"{i}" for i in range(1, 11)]
|
|
98
|
+
print(tabulate(rows, headers=cols, tablefmt="grid"))
|
|
86
99
|
|
|
87
100
|
|
|
88
101
|
def strf_time(zone: str):
|
|
@@ -32,13 +32,14 @@
|
|
|
32
32
|
"ifaddr>=0.2.0",
|
|
33
33
|
"telethon>=1.44.0",
|
|
34
34
|
"protobuf<4",
|
|
35
|
-
|
|
35
|
+
"wcwidth==0.8.5",
|
|
36
|
+
]
|
|
36
37
|
description = "My CLI"
|
|
37
38
|
license = { text = "MIT" }
|
|
38
39
|
name = "pymecli"
|
|
39
40
|
readme = "README.md"
|
|
40
41
|
requires-python = ">=3.10"
|
|
41
|
-
version = "0.6.
|
|
42
|
+
version = "0.6.6"
|
|
42
43
|
|
|
43
44
|
[project.urls]
|
|
44
45
|
Homepage = "https://pypi.org/project/pymecli"
|
|
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
|