bcmd 0.5.5__tar.gz → 0.5.7__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.
- bcmd-0.5.7/MANIFEST.in +2 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/PKG-INFO +2 -2
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/tasks/__init__.py +1 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/tasks/code.py +7 -2
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/tasks/lib.py +2 -2
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/tasks/proxy.py +1 -1
- bcmd-0.5.7/bcmd/tasks/upgrade.py +18 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/tasks/venv.py +1 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd.egg-info/PKG-INFO +2 -2
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd.egg-info/SOURCES.txt +1 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd.egg-info/requires.txt +1 -1
- {bcmd-0.5.5 → bcmd-0.5.7}/pyproject.toml +5 -2
- bcmd-0.5.5/MANIFEST.in +0 -1
- {bcmd-0.5.5 → bcmd-0.5.7}/README.md +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/__init__.py +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/common/__init__.py +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/common/func.py +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/common/password.py +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/main.py +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/resources/project/.gitignore +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/resources/project/.vscode/launch.json +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/resources/project/.vscode/settings.json +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/resources/project/.vscode/tasks.json +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/resources/project/main.py +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/tasks/bin.py +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/tasks/crypto.py +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/tasks/debian.py +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/tasks/download.py +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/tasks/image.py +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/tasks/json.py +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/tasks/math.py +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/tasks/mirror.py +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/tasks/project.py +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd/tasks/time.py +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd.egg-info/dependency_links.txt +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd.egg-info/entry_points.txt +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/bcmd.egg-info/top_level.txt +0 -0
- {bcmd-0.5.5 → bcmd-0.5.7}/setup.cfg +0 -0
bcmd-0.5.7/MANIFEST.in
ADDED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: bcmd
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.7
|
|
4
4
|
Summary: Commands for Beni
|
|
5
5
|
Author-email: Beni Mang <benimang@126.com>
|
|
6
6
|
Maintainer-email: Beni Mang <benimang@126.com>
|
|
7
7
|
Keywords: benimang,beni,bcmd
|
|
8
8
|
Requires-Python: >=3.10
|
|
9
|
-
Requires-Dist: benimang==0.7.
|
|
9
|
+
Requires-Dist: benimang==0.7.12
|
|
10
10
|
Requires-Dist: build
|
|
11
11
|
Requires-Dist: cryptography
|
|
12
12
|
Requires-Dist: pathspec
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
+
import os
|
|
2
3
|
from pathlib import Path
|
|
3
4
|
from typing import Final
|
|
4
5
|
|
|
@@ -112,14 +113,18 @@ async def to_lf(
|
|
|
112
113
|
'.pytest_cache',
|
|
113
114
|
'__pycache__',
|
|
114
115
|
]
|
|
116
|
+
path = path or Path(os.getcwd())
|
|
115
117
|
files = bpath.listFile(path, True)
|
|
116
118
|
# 剔除子目录是这些的文件 .git venv ...
|
|
117
119
|
files = [x for x in files if not any([y in x.parts for y in ignoreSubDirs])]
|
|
118
120
|
|
|
119
121
|
async def convertFile(file: Path):
|
|
120
122
|
try:
|
|
121
|
-
await bfile.
|
|
122
|
-
|
|
123
|
+
content = await bfile.readText(file)
|
|
124
|
+
if '\r\n' in content:
|
|
125
|
+
content = content.replace('\r\n', '\n')
|
|
126
|
+
await bfile.writeText(file, content)
|
|
127
|
+
printYellow(file)
|
|
123
128
|
except:
|
|
124
129
|
pass
|
|
125
130
|
|
|
@@ -32,7 +32,7 @@ async def tidy_dependencies(
|
|
|
32
32
|
ignoreLibAry = sorted(list(set(ignoreLibAry) & set(libAry)))
|
|
33
33
|
libAry = sorted(list(set(libAry) - set(ignoreLibAry)))
|
|
34
34
|
replaceContent = '\n'.join([f" '{x}'," for x in libAry]) + '\n' + '\n'.join([f" # '{x}'," for x in ignoreLibAry])
|
|
35
|
-
newContent = re.sub(r'dependencies = \[(.*?)\]', f"dependencies = [\n{replaceContent}\n]", oldContent, 0, re.DOTALL)
|
|
35
|
+
newContent = re.sub(r'dependencies = \[(.*?)\n\]', f"dependencies = [\n{replaceContent}\n]", oldContent, 0, re.DOTALL)
|
|
36
36
|
if oldContent != newContent:
|
|
37
37
|
await bfile.writeText(pyprojectTomlFile, newContent)
|
|
38
38
|
bcolor.printYellow(pyprojectTomlFile)
|
|
@@ -93,7 +93,7 @@ async def build(
|
|
|
93
93
|
|
|
94
94
|
def _getIgnoreLibAry(content: str) -> list[str]:
|
|
95
95
|
'获取pyproject.toml中屏蔽的第三方库'
|
|
96
|
-
content = re.findall(r'dependencies = \[(.*?)\]', content, re.DOTALL)[0]
|
|
96
|
+
content = re.findall(r'dependencies = \[(.*?)\n\]', content, re.DOTALL)[0]
|
|
97
97
|
ary = textToAry(content)
|
|
98
98
|
return sorted([x[1:].replace('"', '').replace("'", '').replace(',', '').strip() for x in filter(lambda x: x.startswith('#'), ary)])
|
|
99
99
|
|
|
@@ -30,7 +30,7 @@ async def proxy(
|
|
|
30
30
|
elif set(['powershell.exe', 'pwsh.exe']) & set(processNameAry):
|
|
31
31
|
template = powerShellTemplate
|
|
32
32
|
|
|
33
|
-
btask.assertTrue(template, '不支持当前终端({processNameAry})')
|
|
33
|
+
btask.assertTrue(template, f'不支持当前终端({processNameAry})')
|
|
34
34
|
lineAry = textToAry(template.format(port))
|
|
35
35
|
msg = '\n'.join(lineAry)
|
|
36
36
|
bcolor.printMagenta('\r\n' + msg)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from typing import Final
|
|
2
|
+
|
|
3
|
+
import pyperclip
|
|
4
|
+
from beni import bcolor, btask
|
|
5
|
+
from beni.bfunc import syncCall
|
|
6
|
+
|
|
7
|
+
app: Final = btask.app
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@app.command()
|
|
11
|
+
@syncCall
|
|
12
|
+
async def upgrade():
|
|
13
|
+
'使用 pipx 官方源更新 bcmd 到最新版本'
|
|
14
|
+
cmd = 'pipx upgrade bcmd -i https://pypi.org/simple'
|
|
15
|
+
pyperclip.copy(cmd + '\n')
|
|
16
|
+
bcolor.printGreen(cmd)
|
|
17
|
+
bcolor.printGreen('已复制到剪贴板(需要手动执行)')
|
|
18
|
+
bcolor.printGreen('OK')
|
|
@@ -37,6 +37,7 @@ async def install_benimang(
|
|
|
37
37
|
path: Path = typer.Option(None, '--path', help='指定路径,默认当前目录'),
|
|
38
38
|
):
|
|
39
39
|
'更新 benimang 库,强制使用官方源'
|
|
40
|
+
path = path or Path(os.getcwd())
|
|
40
41
|
pip = getPipFile(path)
|
|
41
42
|
await brun.run(f'{pip} install benimang -U -i https://pypi.org/simple', isPrint=True)
|
|
42
43
|
await _venv(
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: bcmd
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.7
|
|
4
4
|
Summary: Commands for Beni
|
|
5
5
|
Author-email: Beni Mang <benimang@126.com>
|
|
6
6
|
Maintainer-email: Beni Mang <benimang@126.com>
|
|
7
7
|
Keywords: benimang,beni,bcmd
|
|
8
8
|
Requires-Python: >=3.10
|
|
9
|
-
Requires-Dist: benimang==0.7.
|
|
9
|
+
Requires-Dist: benimang==0.7.12
|
|
10
10
|
Requires-Dist: build
|
|
11
11
|
Requires-Dist: cryptography
|
|
12
12
|
Requires-Dist: pathspec
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
[project]
|
|
5
5
|
name = 'bcmd'
|
|
6
|
-
version = '0.5.
|
|
6
|
+
version = '0.5.7'
|
|
7
7
|
description = 'Commands for Beni'
|
|
8
8
|
requires-python = '>=3.10'
|
|
9
9
|
keywords = ['benimang', 'beni', 'bcmd']
|
|
@@ -12,7 +12,7 @@ maintainers = [{ name = 'Beni Mang', email = 'benimang@126.com' }]
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
dependencies = [
|
|
15
|
-
'benimang==0.7.
|
|
15
|
+
'benimang==0.7.12',
|
|
16
16
|
'build',
|
|
17
17
|
'cryptography',
|
|
18
18
|
'pathspec',
|
|
@@ -22,6 +22,9 @@ dependencies = [
|
|
|
22
22
|
'qiniu',
|
|
23
23
|
'twine',
|
|
24
24
|
'typer',
|
|
25
|
+
# 'pytest',
|
|
26
|
+
# 'pytest-asyncio',
|
|
27
|
+
# 'pytest-order',
|
|
25
28
|
# 'setuptools',
|
|
26
29
|
]
|
|
27
30
|
|
bcmd-0.5.5/MANIFEST.in
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
recursive-include bcmd/resources *
|
|
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
|