ErisPulse 1.0.7__py3-none-any.whl → 1.0.8__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.
ErisPulse/__main__.py CHANGED
@@ -11,6 +11,9 @@ from rich.console import Console
11
11
  from rich.table import Table
12
12
  from rich.panel import Panel
13
13
  from rich.prompt import Prompt, Confirm
14
+ from prompt_toolkit import PromptSession
15
+ from prompt_toolkit.completion import WordCompleter
16
+ from prompt_toolkit.formatted_text import HTML
14
17
  from .envManager import env
15
18
  from .origin import origin_manager
16
19
 
@@ -383,10 +386,11 @@ def list_modules(module_name=None):
383
386
  def main():
384
387
  parser = argparse.ArgumentParser(
385
388
  description="ErisPulse 命令行工具",
386
- prog="python -m ErisPulse"
389
+ prog="ep"
387
390
  )
388
391
  subparsers = parser.add_subparsers(dest='command', help='可用命令')
389
392
 
393
+ # 添加子命令解析器(与原代码一致)
390
394
  enable_parser = subparsers.add_parser('enable', help='启用指定模块')
391
395
  enable_parser.add_argument('module_name', type=str, help='要启用的模块名称')
392
396
  enable_parser.add_argument('--init', action='store_true', help='在启用模块前初始化模块数据库')
@@ -424,12 +428,12 @@ def main():
424
428
 
425
429
  args = parser.parse_args()
426
430
 
431
+ # 初始化模块数据库
427
432
  if hasattr(args, 'init') and args.init:
428
433
  console.print("[yellow]正在初始化模块列表...[/yellow]")
429
434
  from . import init as init_module
430
435
  init_module()
431
436
 
432
- # 全部指令:enable, disable, list, uninstall, install, update, origin(add, list, del)
433
437
  if args.command == 'enable':
434
438
  enable_module(args.module_name)
435
439
  elif args.command == 'disable':
@@ -461,4 +465,4 @@ def main():
461
465
  parser.print_help()
462
466
 
463
467
  if __name__ == "__main__":
464
- main()
468
+ main()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ErisPulse
3
- Version: 1.0.7
3
+ Version: 1.0.8
4
4
  Summary: ErisPulse 是一个模块化、可扩展的异步 Python SDK 框架,主要用于构建高效、可维护的机器人应用程序。
5
5
  Home-page: https://github.com/wsu2059q/ErisPulse
6
6
  Author: 艾莉丝·格雷拉特(WSu2059)
@@ -56,3 +56,6 @@ ErisPulse 是一个模块化、可扩展的异步 Python SDK 框架,主要用
56
56
 
57
57
  ## 1.0.7
58
58
  修复诸多小问题
59
+
60
+ ## 1.0.8
61
+ 现在包会被添加至系统环境,用户可以直接通过命令行'ep'或'epsdk'命令调用cli
@@ -1,12 +1,13 @@
1
1
  ErisPulse/__init__.py,sha256=ADMbg8y80sxxZzNE3R5EI_65h6KpYHWNtPAwEjjxVlk,5836
2
- ErisPulse/__main__.py,sha256=_fvBxI94cD71wdqVH4gGJlQB3yyPOOY2CNHVyYSRIGE,20273
2
+ ErisPulse/__main__.py,sha256=-390U-a1yrFL_VLRGp31YJ4P9LRFbXBRj84pUDIfzBI,20393
3
3
  ErisPulse/envManager.py,sha256=YLPZcH6nJUf9_fILp-Y6WHq6-B_B997PUDrIFFEJDzA,8541
4
4
  ErisPulse/errors.py,sha256=DwIQ2nx3GyxSY0ogoeezTSP11MwSVFeR1tx7obkP9Rs,430
5
5
  ErisPulse/logger.py,sha256=qOXrYVHZRZwNBhZJ0-rpVbOgtyH414ujHLFqJ49aPtM,1934
6
6
  ErisPulse/origin.py,sha256=IYQADXaAOGfPrxWimpq19qFK1qE2WROOkqcWDQtUqKQ,4653
7
7
  ErisPulse/sdk.py,sha256=IKo1HN2Su0_bOca6CLiRb7X5zDkD3o13fQsyO0x-pUQ,102
8
8
  ErisPulse/util.py,sha256=duZ6XCkf4AXUT9gQxOv2GoTfH5WSODIvM9aGuQxAU-Q,1088
9
- erispulse-1.0.7.dist-info/METADATA,sha256=PPiOypi-QzYYH1wCZbqNJWA76R9hF2-V7lMmgJ8BKYg,2198
10
- erispulse-1.0.7.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
11
- erispulse-1.0.7.dist-info/top_level.txt,sha256=Lm_qtkVvNJR8_dXh_qEDdl_12cZGpic-i4HUlVVUMZc,10
12
- erispulse-1.0.7.dist-info/RECORD,,
9
+ erispulse-1.0.8.dist-info/METADATA,sha256=XPF6OTorUt5EBgYW9ciPLtb5RxxNlDsngNvlzh7NGPM,2313
10
+ erispulse-1.0.8.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
11
+ erispulse-1.0.8.dist-info/entry_points.txt,sha256=_FKA8Cj-pfmMwo3MmIlKa2s4YvW7JTiwNs9WoL-8iG8,79
12
+ erispulse-1.0.8.dist-info/top_level.txt,sha256=Lm_qtkVvNJR8_dXh_qEDdl_12cZGpic-i4HUlVVUMZc,10
13
+ erispulse-1.0.8.dist-info/RECORD,,
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ ep = ErisPulse.__main__:main
3
+ epsdk = ErisPulse.__main__:main