bcmd 0.5.16__py3-none-any.whl → 0.5.18__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.

Potentially problematic release.


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

bcmd/tasks/image.py CHANGED
@@ -285,14 +285,14 @@ async def merge(
285
285
  # 修改保存参数为 WebP 格式
286
286
  merged_image.save(
287
287
  output_path,
288
- format='WEBP',
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}.webp' # 修改文件扩展名为 webp
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)
bcmd/tasks/upgrade.py CHANGED
@@ -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
- '使用 pipx 官方源更新 bcmd 到最新版本'
14
- cmd = 'pipx upgrade bcmd -i https://pypi.org/simple'
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('已复制到剪贴板(需要手动执行)')
bcmd/tasks/venv.py CHANGED
@@ -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
- isReinstall: bool = typer.Option(False, '--reinstall', help='是否清空venv目录后重新安装'),
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=isReinstall,
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
- isReinstall: bool = typer.Option(False, '--reinstall', help='是否清空venv目录后重新安装'),
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=isReinstall,
77
+ isCleanup=isCleanup,
78
78
  )
79
79
 
80
80
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: bcmd
3
- Version: 0.5.16
3
+ Version: 0.5.18
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,7 +14,7 @@ bcmd/tasks/code.py,sha256=IUs_ClZuSsBk2gavlitC8mkRrQQX9rvNDgR8cFxduBA,3992
14
14
  bcmd/tasks/crypto.py,sha256=LKvgsMPLvsi1wlt66TinYiN-oV2IPAfaN9y7hWaVpHs,2951
15
15
  bcmd/tasks/debian.py,sha256=B9aMIIct3vNqMJr5hTr1GegXVf20H49C27FMvRRGIzI,3004
16
16
  bcmd/tasks/download.py,sha256=XdZYKi8zQTNYWEgUxeTNDqPgP7IGYJkMmlDDC9u93Vk,2315
17
- bcmd/tasks/image.py,sha256=-9cV8k645MejVRBsC9lmrQBOPcq_9uy3Me5IJCcNOEQ,12162
17
+ bcmd/tasks/image.py,sha256=Q8ujT6tq2tt0qS0DIY87PNG2RJ1wSArt2dHVTtCuccA,12161
18
18
  bcmd/tasks/json.py,sha256=WWOyvcZPYaqQgp-Tkm-uIJschNMBKPKtZN3yXz_SC5s,635
19
19
  bcmd/tasks/lib.py,sha256=lq-PdHxhK-5Akf7k4QaIT8mBB-sCK5or5OqEFTdphIA,4567
20
20
  bcmd/tasks/math.py,sha256=xbl5UdaDMyAjiLodDPleP4Cutrk2S3NOAgurzAgOEAE,2862
@@ -23,11 +23,11 @@ bcmd/tasks/pdf.py,sha256=fkHRgxqzrRxdb4_-9pL9wp2roqAHJPS_dVqAGJvRUsM,1504
23
23
  bcmd/tasks/project.py,sha256=yLYL6WNmq0mlY-hQ-SGKZ6uRjwceJxpgbP-QAo0Wk-Y,1948
24
24
  bcmd/tasks/proxy.py,sha256=xvxN5PClUnc5LQpmq2Wug7_LUVpJboMWLXBvL9lX7EM,1552
25
25
  bcmd/tasks/time.py,sha256=ZiqA1jdgl-TBtFSOxxP51nwv4g9iZItmkFKpf9MKelk,2453
26
- bcmd/tasks/upgrade.py,sha256=ZiyecgVbnnoTU_LAsd78CIKA4ioc9so9pXpAM76b_0M,447
27
- bcmd/tasks/venv.py,sha256=a7ZDyagUPQvCAXx3cZJIqJt0p1Iy5u5qmmj8iRbDQZE,7673
26
+ bcmd/tasks/upgrade.py,sha256=2Wu_aFn-UcToNPDzjRG78VSChirEiD2KnAf6fJUgYak,535
27
+ bcmd/tasks/venv.py,sha256=O7E-6FYoMsB4p1UM9m6_bljI-oBmlKg4AJWtsCln-8k,7661
28
28
  bcmd/tasks/wasabi.py,sha256=xWFAxprSIlBqDDMGaNXZFb-SahnW1d_R9XxSKRYIhnM,3110
29
- bcmd-0.5.16.dist-info/METADATA,sha256=FzL072W4dRsFfcC4HsqNJDz92pazZpDtIdeXGJK5MPM,500
30
- bcmd-0.5.16.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
31
- bcmd-0.5.16.dist-info/entry_points.txt,sha256=rHJrP6KEQpB-YaQqDFzEL2v88r03rxSfnzAayRvAqHU,39
32
- bcmd-0.5.16.dist-info/top_level.txt,sha256=-KrvhhtBcYsm4XhcjQvEcFbBB3VXeep7d3NIfDTrXKQ,5
33
- bcmd-0.5.16.dist-info/RECORD,,
29
+ bcmd-0.5.18.dist-info/METADATA,sha256=QB_MCVJKL8OM9wBQG1HcgEkFdRL8jgT8r9GOv4wCTPo,500
30
+ bcmd-0.5.18.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
31
+ bcmd-0.5.18.dist-info/entry_points.txt,sha256=rHJrP6KEQpB-YaQqDFzEL2v88r03rxSfnzAayRvAqHU,39
32
+ bcmd-0.5.18.dist-info/top_level.txt,sha256=-KrvhhtBcYsm4XhcjQvEcFbBB3VXeep7d3NIfDTrXKQ,5
33
+ bcmd-0.5.18.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.1.0)
2
+ Generator: setuptools (78.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5