shellscripts 0.26.0__py3-none-any.whl → 0.26.2__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.
- shell_scripts/__init__.py +1 -1
- {shellscripts-0.26.0.dist-info → shellscripts-0.26.2.dist-info}/METADATA +2 -2
- {shellscripts-0.26.0.dist-info → shellscripts-0.26.2.dist-info}/RECORD +7 -8
- shell_scripts/commands/bin_links.py +0 -78
- {shellscripts-0.26.0.dist-info → shellscripts-0.26.2.dist-info}/WHEEL +0 -0
- {shellscripts-0.26.0.dist-info → shellscripts-0.26.2.dist-info}/entry_points.txt +0 -0
- {shellscripts-0.26.0.dist-info → shellscripts-0.26.2.dist-info}/licenses/LICENSE +0 -0
- {shellscripts-0.26.0.dist-info → shellscripts-0.26.2.dist-info}/top_level.txt +0 -0
shell_scripts/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: shellscripts
|
|
3
|
-
Version: 0.26.
|
|
3
|
+
Version: 0.26.2
|
|
4
4
|
Summary: Execute useful shell scripts via an uvx-compatible CLI interface.
|
|
5
5
|
Author: Francesco Rolando
|
|
6
6
|
License-Expression: GPL-3.0-only
|
|
@@ -31,7 +31,7 @@ Dynamic: license-file
|
|
|
31
31
|
> * **No Support or Feature Requests:** Please **do not** open issues, bug reports, or feature requests. They will not be addressed or accepted at this stage of development.
|
|
32
32
|
> * **No Warranty:** This software is provided **"AS IS"**, without warranty of any kind, express or implied. You may use it strictly for **testing and evaluation purposes** at your own sole risk.
|
|
33
33
|
|
|
34
|
-
# s/shellScripts (0.26.
|
|
34
|
+
# s/shellScripts (0.26.2)
|
|
35
35
|
|
|
36
36
|
<p align="center">
|
|
37
37
|
<img src="https://img.shields.io/badge/python-3.11%2B-3776AB?style=flat-square&logo=python&logoColor=white" alt="Python 3.11+">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
shell_scripts/__init__.py,sha256=
|
|
1
|
+
shell_scripts/__init__.py,sha256=JmxgRS8NrsDSG6NKwdLiZG8ij66-hy3KCzNRJBN1Kxk,96
|
|
2
2
|
shell_scripts/__main__.py,sha256=-wEmwKTfeY5TphAH82E38XRPoB4KT5QDLDgRZz84PTs,83
|
|
3
3
|
shell_scripts/config.py,sha256=bOFq3UxuTHPOqPc7lXLqri7f6NTaF19Mx1Q0i4rY3Dg,12624
|
|
4
4
|
shell_scripts/config_cli.py,sha256=IweyCYr-xzDJ-FqmgL5aTWN5pn5aZcj7zAl0gNsCSZ8,91448
|
|
@@ -9,7 +9,6 @@ shell_scripts/commands/__init__.py,sha256=M8ZeoJObUdTuA0J7DUuoGm1PU_Y83gpDb42Ltw
|
|
|
9
9
|
shell_scripts/commands/_dc_common.py,sha256=kfUn92r6n8F1w27jy5QDJE_6Kvpvzhq6dUGNs0_GO0U,4695
|
|
10
10
|
shell_scripts/commands/_yolo_common.py,sha256=CceSc5CBWp82sTXUKgSt5wjl6t1EV6SH9k9PRxBBUU8,6847
|
|
11
11
|
shell_scripts/commands/agy.py,sha256=vn7lIDcQmDz5Em34z-2R-_VnVb_RantL4AqBJnCSmGw,1949
|
|
12
|
-
shell_scripts/commands/bin_links.py,sha256=7chuWbk1FdnxH9ak_fATdmUSOyzIbg4WmfRPCOw10-U,2425
|
|
13
12
|
shell_scripts/commands/claude.py,sha256=tJVDFhY3VVEsaY8Yrv-eOrzeZGpb_r_2uxh10YopDZ8,1995
|
|
14
13
|
shell_scripts/commands/clean.py,sha256=LOK7bVzqpWDvFBMInlu9COtODVmjwOtwCHyMriq7wIk,2552
|
|
15
14
|
shell_scripts/commands/codex.py,sha256=qEWc41SMAIprtKzQjIMD1tgxqsmD7hBCWsuFJFaN7Is,1994
|
|
@@ -36,9 +35,9 @@ shell_scripts/commands/video2h265.py,sha256=Sr_UWGz_V77x4anmuy8kiWZv5I_AOFlV0WDn
|
|
|
36
35
|
shell_scripts/commands/view_cmd.py,sha256=qHEivQHZpZCTE3VSFP1ay2SuqgancQlEKxJcKtyeqNA,1827
|
|
37
36
|
shell_scripts/commands/vscode_cmd.py,sha256=Rkcjt5A1HMzqJoh2Yz9VRGoLP-L3qpRO5hkcSrzOmvA,1461
|
|
38
37
|
shell_scripts/commands/vsinsider_cmd.py,sha256=KTTv1cVpJO-u1ktxOE0W_o4AAmz20pAvkDtyhpU9XBg,1548
|
|
39
|
-
shellscripts-0.26.
|
|
40
|
-
shellscripts-0.26.
|
|
41
|
-
shellscripts-0.26.
|
|
42
|
-
shellscripts-0.26.
|
|
43
|
-
shellscripts-0.26.
|
|
44
|
-
shellscripts-0.26.
|
|
38
|
+
shellscripts-0.26.2.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
39
|
+
shellscripts-0.26.2.dist-info/METADATA,sha256=YIVj3KFI5AtiVt0vOALMk3gz0ie08rUhGGqlBVEE-xE,11040
|
|
40
|
+
shellscripts-0.26.2.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
41
|
+
shellscripts-0.26.2.dist-info/entry_points.txt,sha256=9ICAgH87fxHBzi3f6JXIVcsPWzAKsCh4_1xS8JThQ0M,85
|
|
42
|
+
shellscripts-0.26.2.dist-info/top_level.txt,sha256=7bDVqjcR5CfCCArCP4X4e9gYJ-ua8z-GfQeHbAo8rCY,14
|
|
43
|
+
shellscripts-0.26.2.dist-info/RECORD,,
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
import sys
|
|
3
|
-
from pathlib import Path
|
|
4
|
-
|
|
5
|
-
from shell_scripts.utils import print_error
|
|
6
|
-
|
|
7
|
-
PROGRAM = "shellscripts"
|
|
8
|
-
DESCRIPTION = "Create or update command symlinks in $HOME/bin."
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
def print_help(version):
|
|
12
|
-
print(f"Usage: {PROGRAM} bin-links [options] ({version})")
|
|
13
|
-
print()
|
|
14
|
-
print("bin-links options:")
|
|
15
|
-
print(
|
|
16
|
-
" <directory> - Source directory containing files to link (default: current dir)."
|
|
17
|
-
)
|
|
18
|
-
print(" --dest <dir> - Destination directory for symlinks (default: $HOME/bin).")
|
|
19
|
-
print(" --help - Show this help message.")
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def run(args):
|
|
23
|
-
src_dir = Path.cwd()
|
|
24
|
-
dest_dir = Path.home() / "bin"
|
|
25
|
-
|
|
26
|
-
i = 0
|
|
27
|
-
while i < len(args):
|
|
28
|
-
if args[i] == "--dest":
|
|
29
|
-
if i + 1 >= len(args):
|
|
30
|
-
print_error("--dest requires a directory path.")
|
|
31
|
-
return 1
|
|
32
|
-
dest_dir = Path(args[i + 1])
|
|
33
|
-
i += 2
|
|
34
|
-
elif not args[i].startswith("-"):
|
|
35
|
-
src_dir = Path(args[i])
|
|
36
|
-
i += 1
|
|
37
|
-
else:
|
|
38
|
-
print_error(f"Unknown option: {args[i]}")
|
|
39
|
-
return 1
|
|
40
|
-
|
|
41
|
-
if not src_dir.is_dir():
|
|
42
|
-
print_error(f"Source directory not found: {src_dir}")
|
|
43
|
-
return 1
|
|
44
|
-
|
|
45
|
-
dest_dir.mkdir(parents=True, exist_ok=True)
|
|
46
|
-
|
|
47
|
-
for file_path in sorted(src_dir.iterdir()):
|
|
48
|
-
if file_path.is_dir():
|
|
49
|
-
continue
|
|
50
|
-
|
|
51
|
-
filename = file_path.name
|
|
52
|
-
abs_src = file_path.resolve()
|
|
53
|
-
link_name = filename.removesuffix(".sh")
|
|
54
|
-
target_link = dest_dir / link_name
|
|
55
|
-
|
|
56
|
-
print(f"Examining: {filename}...")
|
|
57
|
-
|
|
58
|
-
if target_link.exists() or target_link.is_symlink():
|
|
59
|
-
if target_link.is_symlink():
|
|
60
|
-
current_target = target_link.resolve()
|
|
61
|
-
if current_target == abs_src:
|
|
62
|
-
print(f" [OK] Link already points correctly to {filename}.")
|
|
63
|
-
else:
|
|
64
|
-
print(" [UPDATE] Link points elsewhere. Updating...")
|
|
65
|
-
target_link.unlink()
|
|
66
|
-
target_link.symlink_to(abs_src)
|
|
67
|
-
else:
|
|
68
|
-
print(
|
|
69
|
-
f" [ERROR] '{target_link}' is a regular file. "
|
|
70
|
-
f"Skipping to avoid data loss.",
|
|
71
|
-
file=sys.stderr,
|
|
72
|
-
)
|
|
73
|
-
else:
|
|
74
|
-
print(" [NEW] Creating symlink...")
|
|
75
|
-
target_link.symlink_to(abs_src)
|
|
76
|
-
|
|
77
|
-
print("--- Operation completed ---")
|
|
78
|
-
return 0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|