bcmd 0.5.1__tar.gz → 0.5.3__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.1 → bcmd-0.5.3}/PKG-INFO +2 -2
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/tasks/download.py +18 -1
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/tasks/image.py +1 -1
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/tasks/venv.py +3 -3
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd.egg-info/PKG-INFO +2 -2
- {bcmd-0.5.1 → bcmd-0.5.3}/pyproject.toml +1 -1
- {bcmd-0.5.1 → bcmd-0.5.3}/MANIFEST.in +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/README.md +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/__init__.py +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/common/__init__.py +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/common/func.py +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/common/password.py +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/main.py +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/resources/project/.gitignore +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/resources/project/.vscode/launch.json +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/resources/project/.vscode/settings.json +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/resources/project/.vscode/tasks.json +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/resources/project/main.py +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/tasks/__init__.py +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/tasks/bin.py +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/tasks/code.py +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/tasks/crypto.py +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/tasks/debian.py +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/tasks/json.py +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/tasks/lib.py +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/tasks/math.py +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/tasks/mirror.py +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/tasks/project.py +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/tasks/proxy.py +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd/tasks/time.py +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd.egg-info/SOURCES.txt +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd.egg-info/dependency_links.txt +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd.egg-info/entry_points.txt +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd.egg-info/requires.txt +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/bcmd.egg-info/top_level.txt +0 -0
- {bcmd-0.5.1 → bcmd-0.5.3}/setup.cfg +0 -0
|
@@ -37,6 +37,7 @@ async def download(
|
|
|
37
37
|
await binput.confirm('是否确认?')
|
|
38
38
|
|
|
39
39
|
fileSet: set[Path] = set()
|
|
40
|
+
retryUrlSet: set[str] = set()
|
|
40
41
|
|
|
41
42
|
async def download(url: str):
|
|
42
43
|
urlPath = urlparse(url).path
|
|
@@ -51,7 +52,23 @@ async def download(
|
|
|
51
52
|
bcolor.printGreen(url)
|
|
52
53
|
await bhttp.download(url, file)
|
|
53
54
|
except:
|
|
55
|
+
retryUrlSet.add(url)
|
|
54
56
|
bcolor.printRed(url)
|
|
55
57
|
|
|
56
58
|
await asyncio.gather(*[download(x) for x in urlSet])
|
|
57
|
-
|
|
59
|
+
|
|
60
|
+
for i in range(4):
|
|
61
|
+
if i > 0:
|
|
62
|
+
print(f'等待重试第 {i} 次')
|
|
63
|
+
await asyncio.sleep(3)
|
|
64
|
+
await asyncio.gather(*[download(x) for x in urlSet])
|
|
65
|
+
if not retryUrlSet:
|
|
66
|
+
break
|
|
67
|
+
urlSet = set(retryUrlSet)
|
|
68
|
+
retryUrlSet.clear()
|
|
69
|
+
|
|
70
|
+
if retryUrlSet:
|
|
71
|
+
pyperclip.copy('\n'.join(retryUrlSet))
|
|
72
|
+
bcolor.printYellow('部分下载失败,失败部分已复制到剪贴板')
|
|
73
|
+
else:
|
|
74
|
+
bcolor.printGreen('OK')
|
|
@@ -65,7 +65,7 @@ async def convert(
|
|
|
65
65
|
@syncCall
|
|
66
66
|
async def tiny(
|
|
67
67
|
path: Path = typer.Option(None, '--path', help='指定目录或具体图片文件,默认当前目录'),
|
|
68
|
-
compression: int = typer.Option(
|
|
68
|
+
compression: int = typer.Option(75, '--compression', help='如果压缩小于指定数值则使用原来的图片,单位:%,默认75'),
|
|
69
69
|
isKeepOriginal: bool = typer.Option(False, '--keep-original', help='保留原始图片'),
|
|
70
70
|
):
|
|
71
71
|
|
|
@@ -33,7 +33,7 @@ async def add(
|
|
|
33
33
|
|
|
34
34
|
@app.command()
|
|
35
35
|
@syncCall
|
|
36
|
-
async def
|
|
36
|
+
async def install_benimang(
|
|
37
37
|
path: Path = typer.Option(None, '--path', help='指定路径,默认当前目录'),
|
|
38
38
|
):
|
|
39
39
|
'更新 benimang 库,强制使用官方源'
|
|
@@ -46,7 +46,7 @@ async def benimang(
|
|
|
46
46
|
|
|
47
47
|
@app.command()
|
|
48
48
|
@syncCall
|
|
49
|
-
async def
|
|
49
|
+
async def install_base(
|
|
50
50
|
path: Path = typer.Option(None, '--path', help='指定路径,默认当前目录'),
|
|
51
51
|
isOfficial: bool = typer.Option(False, '--official', help='是否使用官方地址安装(https://pypi.org/simple)'),
|
|
52
52
|
isReinstall: bool = typer.Option(False, '--reinstall', help='是否清空venv目录后重新安装'),
|
|
@@ -62,7 +62,7 @@ async def base(
|
|
|
62
62
|
|
|
63
63
|
@app.command()
|
|
64
64
|
@syncCall
|
|
65
|
-
async def
|
|
65
|
+
async def install_lock(
|
|
66
66
|
path: Path = typer.Option(None, '--path', help='指定路径,默认当前目录'),
|
|
67
67
|
isOfficial: bool = typer.Option(False, '--official', help='是否使用官方地址安装(https://pypi.org/simple)'),
|
|
68
68
|
isReinstall: bool = typer.Option(False, '--reinstall', help='是否清空venv目录后重新安装'),
|
|
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
|