bcmd 0.6.15__tar.gz → 0.6.17__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.

Potentially problematic release.


This version of bcmd might be problematic. Click here for more details.

Files changed (40) hide show
  1. {bcmd-0.6.15 → bcmd-0.6.17}/PKG-INFO +1 -1
  2. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/tasks/__init__.py +0 -1
  3. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/tasks/upgrade.py +6 -3
  4. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd.egg-info/PKG-INFO +1 -1
  5. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd.egg-info/SOURCES.txt +0 -2
  6. {bcmd-0.6.15 → bcmd-0.6.17}/pyproject.toml +1 -1
  7. bcmd-0.6.15/bcmd/tasks/wslProxy.py +0 -59
  8. {bcmd-0.6.15 → bcmd-0.6.17}/MANIFEST.in +0 -0
  9. {bcmd-0.6.15 → bcmd-0.6.17}/README.md +0 -0
  10. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/__init__.py +0 -0
  11. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/common/__init__.py +0 -0
  12. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/common/func.py +0 -0
  13. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/common/secret.py +0 -0
  14. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/resources/project/main.py +0 -0
  15. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/tasks/bin.py +0 -0
  16. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/tasks/code.py +0 -0
  17. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/tasks/crypto.py +0 -0
  18. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/tasks/docs.py +0 -0
  19. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/tasks/download.py +0 -0
  20. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/tasks/image.py +0 -0
  21. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/tasks/json.py +0 -0
  22. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/tasks/lib.py +0 -0
  23. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/tasks/math.py +0 -0
  24. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/tasks/mirror.py +0 -0
  25. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/tasks/pdf.py +0 -0
  26. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/tasks/proxy.py +0 -0
  27. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/tasks/time.py +0 -0
  28. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/tasks/wasabi.py +0 -0
  29. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/utils/__init__.py +0 -0
  30. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd/utils/utils.py +0 -0
  31. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd.egg-info/dependency_links.txt +0 -0
  32. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd.egg-info/entry_points.txt +0 -0
  33. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd.egg-info/requires.txt +0 -0
  34. {bcmd-0.6.15 → bcmd-0.6.17}/bcmd.egg-info/top_level.txt +0 -0
  35. {bcmd-0.6.15 → bcmd-0.6.17}/setup.cfg +0 -0
  36. {bcmd-0.6.15 → bcmd-0.6.17}/test/__init__.py +0 -0
  37. {bcmd-0.6.15 → bcmd-0.6.17}/test/conftest.py +0 -0
  38. {bcmd-0.6.15 → bcmd-0.6.17}/test/test_pdf.py +0 -0
  39. {bcmd-0.6.15 → bcmd-0.6.17}/test/test_proxy.py +0 -0
  40. {bcmd-0.6.15 → bcmd-0.6.17}/test/test_wasabi.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bcmd
3
- Version: 0.6.15
3
+ Version: 0.6.17
4
4
  Summary: Commands for Beni
5
5
  Author-email: Beni Mang <benimang@126.com>
6
6
  Maintainer-email: Beni Mang <benimang@126.com>
@@ -14,4 +14,3 @@ from . import proxy
14
14
  from . import time
15
15
  from . import upgrade
16
16
  from . import wasabi
17
- from . import wslProxy
@@ -1,7 +1,8 @@
1
1
  from typing import Final
2
2
 
3
+ import pyperclip
3
4
  import typer
4
- from beni import bcolor, btask, brun
5
+ from beni import bcolor, btask
5
6
  from beni.bfunc import syncCall
6
7
 
7
8
  app: Final = btask.app
@@ -14,5 +15,7 @@ async def upgrade(
14
15
  ):
15
16
  '使用 uv 官方源更新指定包到最新版本'
16
17
  cmd = f'uv tool install -U --index https://pypi.org/simple {name}'
17
- await brun.run(cmd)
18
- bcolor.printGreen('OK')
18
+ pyperclip.copy(cmd + '\n')
19
+ bcolor.printGreen(cmd)
20
+ bcolor.printGreen('已复制到剪贴板(需要手动执行)')
21
+ bcolor.printGreen('OK')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bcmd
3
- Version: 0.6.15
3
+ Version: 0.6.17
4
4
  Summary: Commands for Beni
5
5
  Author-email: Beni Mang <benimang@126.com>
6
6
  Maintainer-email: Beni Mang <benimang@126.com>
@@ -22,7 +22,6 @@ pyproject.toml
22
22
  ./bcmd/tasks/time.py
23
23
  ./bcmd/tasks/upgrade.py
24
24
  ./bcmd/tasks/wasabi.py
25
- ./bcmd/tasks/wslProxy.py
26
25
  ./bcmd/utils/__init__.py
27
26
  ./bcmd/utils/utils.py
28
27
  ./test/__init__.py
@@ -57,6 +56,5 @@ bcmd/tasks/proxy.py
57
56
  bcmd/tasks/time.py
58
57
  bcmd/tasks/upgrade.py
59
58
  bcmd/tasks/wasabi.py
60
- bcmd/tasks/wslProxy.py
61
59
  bcmd/utils/__init__.py
62
60
  bcmd/utils/utils.py
@@ -3,7 +3,7 @@
3
3
 
4
4
  [project]
5
5
  name = 'bcmd'
6
- version = '0.6.15'
6
+ version = '0.6.17'
7
7
  description = 'Commands for Beni'
8
8
  requires-python = '>=3.10'
9
9
  keywords = ['benimang', 'beni', 'bcmd']
@@ -1,59 +0,0 @@
1
- from typing import Final
2
-
3
- import pyperclip
4
- import typer
5
- from beni import bcolor, btask
6
- from beni.bfunc import syncCall, textToAry
7
-
8
- app: Final = btask.newSubApp('WSL2 代理服务')
9
-
10
-
11
- @app.command()
12
- @syncCall
13
- async def linux(
14
- port: int = typer.Argument(15236, help="代理服务器端口"),
15
- ):
16
- '生成终端设置代理服务器的命令'
17
- ip = "$(ip route | grep default | awk '{print $3}')"
18
- lineAry = textToAry(f'''
19
- export HTTP_PROXY=http://{ip}:{port}
20
- export HTTPS_PROXY=http://{ip}:{port}
21
- export ALL_PROXY=http://{ip}:{port}
22
- curl https://google.com.hk
23
- ''')
24
- msg = '\r\n' + '\n'.join(lineAry) + '\n'
25
- pyperclip.copy(msg.strip() + '\n')
26
- bcolor.printMagenta(msg)
27
- bcolor.printYellow('已复制,可直接粘贴使用')
28
-
29
-
30
- @app.command()
31
- @syncCall
32
- async def windows(
33
- port: int = typer.Argument(15236, help="代理服务器端口"),
34
- off: bool = typer.Option(False, '--off', help='关闭代理'),
35
- ):
36
- '设置防火墙以及端口转发'
37
-
38
- firewallName = 'Allow Veee from WSL'
39
-
40
- if not off:
41
- template = f'''
42
- New-NetFirewallRule -DisplayName "{firewallName}" -Direction Inbound -Action Allow -Protocol TCP -LocalPort {port} -RemoteAddress 172.0.0.0/8 -Profile Any
43
- netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport={port} connectaddress=127.0.0.1 connectport={port}
44
- netstat -ano | findstr :{port} | findstr 0.0.0.0
45
- '''
46
- else:
47
- template = f'''
48
- netsh interface portproxy delete v4tov4 listenaddress=0.0.0.0 listenport={port}
49
- Remove-NetFirewallRule -DisplayName "{firewallName}"
50
- '''
51
- lineAry = textToAry(template)
52
- msg = '\r\n' + '\n'.join(lineAry) + '\n'
53
- pyperclip.copy(msg.strip() + '\n')
54
- bcolor.printMagenta(msg)
55
- if not off:
56
- bcolor.printYellow('开启防火墙以及端口转发')
57
- else:
58
- bcolor.printYellow('关闭防火墙以及端口转发')
59
- bcolor.printYellow('已复制,可直接粘贴使用')
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