pymecli 0.6.5__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.
Files changed (52) hide show
  1. {pymecli-0.6.5 → pymecli-0.6.6}/PKG-INFO +2 -1
  2. {pymecli-0.6.5 → pymecli-0.6.6}/cli/util.py +9 -12
  3. {pymecli-0.6.5 → pymecli-0.6.6}/pyproject.toml +3 -2
  4. {pymecli-0.6.5 → pymecli-0.6.6}/.gitignore +0 -0
  5. {pymecli-0.6.5 → pymecli-0.6.6}/README.md +0 -0
  6. {pymecli-0.6.5 → pymecli-0.6.6}/api/__init__.py +0 -0
  7. {pymecli-0.6.5 → pymecli-0.6.6}/api/v1/__init__.py +0 -0
  8. {pymecli-0.6.5 → pymecli-0.6.6}/api/v1/clash.py +0 -0
  9. {pymecli-0.6.5 → pymecli-0.6.6}/api/v1/redis.py +0 -0
  10. {pymecli-0.6.5 → pymecli-0.6.6}/cli/__init__.py +0 -0
  11. {pymecli-0.6.5 → pymecli-0.6.6}/cli/bitget.py +0 -0
  12. {pymecli-0.6.5 → pymecli-0.6.6}/cli/dnspod.py +0 -0
  13. {pymecli-0.6.5 → pymecli-0.6.6}/cli/dst.py +0 -0
  14. {pymecli-0.6.5 → pymecli-0.6.6}/cli/etcd_sync.py +0 -0
  15. {pymecli-0.6.5 → pymecli-0.6.6}/cli/example.py +0 -0
  16. {pymecli-0.6.5 → pymecli-0.6.6}/cli/fast.py +0 -0
  17. {pymecli-0.6.5 → pymecli-0.6.6}/cli/gate.py +0 -0
  18. {pymecli-0.6.5 → pymecli-0.6.6}/cli/okx.py +0 -0
  19. {pymecli-0.6.5 → pymecli-0.6.6}/cli/quark.py +0 -0
  20. {pymecli-0.6.5 → pymecli-0.6.6}/cli/redis_csv.py +0 -0
  21. {pymecli-0.6.5 → pymecli-0.6.6}/cli/tele.py +0 -0
  22. {pymecli-0.6.5 → pymecli-0.6.6}/core/__init__.py +0 -0
  23. {pymecli-0.6.5 → pymecli-0.6.6}/core/clash.py +0 -0
  24. {pymecli-0.6.5 → pymecli-0.6.6}/core/config.py +0 -0
  25. {pymecli-0.6.5 → pymecli-0.6.6}/core/redis_client.py +0 -0
  26. {pymecli-0.6.5 → pymecli-0.6.6}/crypto/__init__.py +0 -0
  27. {pymecli-0.6.5 → pymecli-0.6.6}/crypto/bitget.py +0 -0
  28. {pymecli-0.6.5 → pymecli-0.6.6}/crypto/gate.py +0 -0
  29. {pymecli-0.6.5 → pymecli-0.6.6}/crypto/okx.py +0 -0
  30. {pymecli-0.6.5 → pymecli-0.6.6}/data/__init__.py +0 -0
  31. {pymecli-0.6.5 → pymecli-0.6.6}/data/dou_dict.py +0 -0
  32. {pymecli-0.6.5 → pymecli-0.6.6}/data/dou_list.py +0 -0
  33. {pymecli-0.6.5 → pymecli-0.6.6}/data/main.py +0 -0
  34. {pymecli-0.6.5 → pymecli-0.6.6}/data/template.yaml +0 -0
  35. {pymecli-0.6.5 → pymecli-0.6.6}/models/__init__.py +0 -0
  36. {pymecli-0.6.5 → pymecli-0.6.6}/models/douzero_model.py +0 -0
  37. {pymecli-0.6.5 → pymecli-0.6.6}/models/ocr_model.py +0 -0
  38. {pymecli-0.6.5 → pymecli-0.6.6}/models/response.py +0 -0
  39. {pymecli-0.6.5 → pymecli-0.6.6}/utils/__init__.py +0 -0
  40. {pymecli-0.6.5 → pymecli-0.6.6}/utils/elapsed.py +0 -0
  41. {pymecli-0.6.5 → pymecli-0.6.6}/utils/etcd.py +0 -0
  42. {pymecli-0.6.5 → pymecli-0.6.6}/utils/helper.py +0 -0
  43. {pymecli-0.6.5 → pymecli-0.6.6}/utils/logger.py +0 -0
  44. {pymecli-0.6.5 → pymecli-0.6.6}/utils/mysql.py +0 -0
  45. {pymecli-0.6.5 → pymecli-0.6.6}/utils/notify.py +0 -0
  46. {pymecli-0.6.5 → pymecli-0.6.6}/utils/path.py +0 -0
  47. {pymecli-0.6.5 → pymecli-0.6.6}/utils/pd.py +0 -0
  48. {pymecli-0.6.5 → pymecli-0.6.6}/utils/pyredis.py +0 -0
  49. {pymecli-0.6.5 → pymecli-0.6.6}/utils/sendNotify.py +0 -0
  50. {pymecli-0.6.5 → pymecli-0.6.6}/utils/sleep.py +0 -0
  51. {pymecli-0.6.5 → pymecli-0.6.6}/utils/text.py +0 -0
  52. {pymecli-0.6.5 → 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.5
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
 
@@ -13,7 +13,7 @@ import typer
13
13
  from babel.dates import format_datetime
14
14
  from cowsay.__main__ import cli
15
15
  from tabulate import tabulate
16
- from wcwidth import wcswidth
16
+ from wcwidth import ljust, wcswidth
17
17
 
18
18
  from utils.pyredis import get_redis_client_sync
19
19
 
@@ -74,22 +74,19 @@ def emoji():
74
74
  " ⬇️ ⬆️ ↕️ 🍅 🍥 ☃️ 🐳 🤖 🪃 💰 🦣 🦄 🐼 ♂️ ♀️ 🐝"
75
75
  ).split()
76
76
 
77
- # 把每个 emoji 补到 len=2 且 wcswidth=2,保证 tabulate 算列宽和终端显示一致
78
- # FE0F 是 emoji 变体检视符:加了之后 SMP emoji len 从 1 变 2,wcswidth 仍是 2
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
79
81
  VS = "\ufe0f"
80
82
 
81
83
  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
84
+ if len(e) == 1 and wcswidth(e) == 2:
85
+ e += VS
86
+ return ljust(e, 2)
87
+
90
88
  padded = [pad(e) for e in emoji_list]
91
89
 
92
- # 重排成 10 列的二维表,最后一行空位填空字符串
93
90
  rows = []
94
91
  for i in range(0, len(padded), 10):
95
92
  row = padded[i : i + 10]
@@ -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.5"
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