bcmd 0.5.16__tar.gz → 0.5.18__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.16 → bcmd-0.5.18}/PKG-INFO +2 -2
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/tasks/image.py +2 -2
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/tasks/upgrade.py +7 -3
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/tasks/venv.py +4 -4
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd.egg-info/PKG-INFO +2 -2
- {bcmd-0.5.16 → bcmd-0.5.18}/pyproject.toml +1 -1
- {bcmd-0.5.16 → bcmd-0.5.18}/MANIFEST.in +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/README.md +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/__init__.py +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/common/__init__.py +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/common/func.py +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/common/password.py +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/main.py +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/resources/project/.gitignore +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/resources/project/.vscode/launch.json +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/resources/project/.vscode/settings.json +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/resources/project/.vscode/tasks.json +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/resources/project/main.py +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/tasks/__init__.py +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/tasks/bin.py +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/tasks/code.py +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/tasks/crypto.py +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/tasks/debian.py +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/tasks/download.py +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/tasks/json.py +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/tasks/lib.py +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/tasks/math.py +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/tasks/mirror.py +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/tasks/pdf.py +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/tasks/project.py +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/tasks/proxy.py +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/tasks/time.py +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd/tasks/wasabi.py +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd.egg-info/SOURCES.txt +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd.egg-info/dependency_links.txt +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd.egg-info/entry_points.txt +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd.egg-info/requires.txt +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/bcmd.egg-info/top_level.txt +0 -0
- {bcmd-0.5.16 → bcmd-0.5.18}/setup.cfg +0 -0
|
@@ -285,14 +285,14 @@ async def merge(
|
|
|
285
285
|
# 修改保存参数为 WebP 格式
|
|
286
286
|
merged_image.save(
|
|
287
287
|
output_path,
|
|
288
|
-
format='
|
|
288
|
+
format='JPEG',
|
|
289
289
|
quality=80, # 质量参数(0-100),推荐 80-90 之间
|
|
290
290
|
method=6, # 压缩方法(0-6),6 为最佳压缩
|
|
291
291
|
lossless=False, # 不使用无损压缩(更小的文件体积)
|
|
292
292
|
)
|
|
293
293
|
|
|
294
294
|
image_files = [x for x in bpath.listFile(path) if x.suffix in ('.png', '.jpg', '.jpeg', '.webp', '.bmp')]
|
|
295
|
-
output_image = path / f'merge_{path.name}.
|
|
295
|
+
output_image = path / f'merge_{path.name}.jpg' # 修改文件扩展名为 webp
|
|
296
296
|
if output_image in image_files:
|
|
297
297
|
if not force:
|
|
298
298
|
print(output_image)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from typing import Final
|
|
2
2
|
|
|
3
3
|
import pyperclip
|
|
4
|
+
import typer
|
|
4
5
|
from beni import bcolor, btask
|
|
5
6
|
from beni.bfunc import syncCall
|
|
6
7
|
|
|
@@ -9,9 +10,12 @@ app: Final = btask.app
|
|
|
9
10
|
|
|
10
11
|
@app.command()
|
|
11
12
|
@syncCall
|
|
12
|
-
async def upgrade(
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
async def upgrade(
|
|
14
|
+
name: str = typer.Argument('bcmd', help='要更新的包名'),
|
|
15
|
+
):
|
|
16
|
+
'使用 pipx 官方源更新指定包到最新版本'
|
|
17
|
+
|
|
18
|
+
cmd = f'pipx upgrade {name} -i https://pypi.org/simple'
|
|
15
19
|
pyperclip.copy(cmd + '\n')
|
|
16
20
|
bcolor.printGreen(cmd)
|
|
17
21
|
bcolor.printGreen('已复制到剪贴板(需要手动执行)')
|
|
@@ -51,14 +51,14 @@ async def install_benimang(
|
|
|
51
51
|
async def install_base(
|
|
52
52
|
path: Path = typer.Option(None, '--path', help='指定路径,默认当前目录'),
|
|
53
53
|
isOfficial: bool = typer.Option(False, '--official', help='是否使用官方地址安装(https://pypi.org/simple)'),
|
|
54
|
-
|
|
54
|
+
isCleanup: bool = typer.Option(False, '--cleanup', help='是否清空venv目录后重新安装'),
|
|
55
55
|
):
|
|
56
56
|
'安装基础库'
|
|
57
57
|
await _venv(
|
|
58
58
|
path=path,
|
|
59
59
|
isOfficial=isOfficial,
|
|
60
60
|
isUseBase=True,
|
|
61
|
-
isCleanup=
|
|
61
|
+
isCleanup=isCleanup,
|
|
62
62
|
)
|
|
63
63
|
|
|
64
64
|
|
|
@@ -67,14 +67,14 @@ async def install_base(
|
|
|
67
67
|
async def install_lock(
|
|
68
68
|
path: Path = typer.Option(None, '--path', help='指定路径,默认当前目录'),
|
|
69
69
|
isOfficial: bool = typer.Option(False, '--official', help='是否使用官方地址安装(https://pypi.org/simple)'),
|
|
70
|
-
|
|
70
|
+
isCleanup: bool = typer.Option(False, '--cleanup', help='是否清空venv目录后重新安装'),
|
|
71
71
|
):
|
|
72
72
|
'安装指定版本的库'
|
|
73
73
|
await _venv(
|
|
74
74
|
path=path,
|
|
75
75
|
isOfficial=isOfficial,
|
|
76
76
|
isUseLock=True,
|
|
77
|
-
isCleanup=
|
|
77
|
+
isCleanup=isCleanup,
|
|
78
78
|
)
|
|
79
79
|
|
|
80
80
|
|
|
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
|