dotlocalslashbin 0.0.10__tar.gz → 0.0.12__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.
- {dotlocalslashbin-0.0.10 → dotlocalslashbin-0.0.12}/PKG-INFO +2 -2
- {dotlocalslashbin-0.0.10 → dotlocalslashbin-0.0.12}/README.md +1 -1
- {dotlocalslashbin-0.0.10 → dotlocalslashbin-0.0.12}/src/dotlocalslashbin.py +7 -5
- {dotlocalslashbin-0.0.10 → dotlocalslashbin-0.0.12}/LICENSES/MPL-2.0.txt +0 -0
- {dotlocalslashbin-0.0.10 → dotlocalslashbin-0.0.12}/pyproject.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dotlocalslashbin
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.12
|
|
4
4
|
Summary: Download and extract files to `~/.local/bin/`.
|
|
5
5
|
Author-email: Keith Maxwell <keith.maxwell@gmail.com>
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -60,7 +60,7 @@ Command to install the latest released `dotlocalslashbin` from PyPI:
|
|
|
60
60
|
Command to run latest development version of `dotlocalslashbin` directly from
|
|
61
61
|
GitHub:
|
|
62
62
|
|
|
63
|
-
uv run https://raw.githubusercontent.com/maxwell-k/
|
|
63
|
+
uv run https://raw.githubusercontent.com/maxwell-k/dotlocalslashbin/refs/heads/main/src/dotlocalslashbin.py --version
|
|
64
64
|
|
|
65
65
|
## Examples
|
|
66
66
|
|
|
@@ -39,7 +39,7 @@ Command to install the latest released `dotlocalslashbin` from PyPI:
|
|
|
39
39
|
Command to run latest development version of `dotlocalslashbin` directly from
|
|
40
40
|
GitHub:
|
|
41
41
|
|
|
42
|
-
uv run https://raw.githubusercontent.com/maxwell-k/
|
|
42
|
+
uv run https://raw.githubusercontent.com/maxwell-k/dotlocalslashbin/refs/heads/main/src/dotlocalslashbin.py --version
|
|
43
43
|
|
|
44
44
|
## Examples
|
|
45
45
|
|
|
@@ -23,8 +23,9 @@ from urllib.request import urlopen
|
|
|
23
23
|
from zipfile import ZipFile
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
__version__ = "0.0.
|
|
26
|
+
__version__ = "0.0.12"
|
|
27
27
|
|
|
28
|
+
_HOME = str(Path("~").expanduser())
|
|
28
29
|
_OUTPUT = Path("~/.local/bin/")
|
|
29
30
|
_SHA512_LENGTH = 128
|
|
30
31
|
|
|
@@ -48,7 +49,7 @@ class Item:
|
|
|
48
49
|
action: Action
|
|
49
50
|
downloaded: Path
|
|
50
51
|
expected: str | None
|
|
51
|
-
version: str
|
|
52
|
+
version: str
|
|
52
53
|
prefix: str
|
|
53
54
|
command: str | None
|
|
54
55
|
ignore: set
|
|
@@ -69,7 +70,7 @@ def main() -> int:
|
|
|
69
70
|
item.target = Path(record.get("target", default)).expanduser()
|
|
70
71
|
item.ignore = record.get("ignore", set())
|
|
71
72
|
item.expected = record.get("expected", None)
|
|
72
|
-
item.version = record.get("version",
|
|
73
|
+
item.version = record.get("version", "")
|
|
73
74
|
item.prefix = record.get("prefix", "")
|
|
74
75
|
item.command = record.get("command", None)
|
|
75
76
|
|
|
@@ -88,8 +89,9 @@ def main() -> int:
|
|
|
88
89
|
print(f"Error {e.code} downloading {e.url}")
|
|
89
90
|
return 1
|
|
90
91
|
|
|
91
|
-
arg0 =
|
|
92
|
-
|
|
92
|
+
arg0 = str(item.target.absolute())
|
|
93
|
+
prompt = "#" if item.version else "$"
|
|
94
|
+
print(" ".join((prompt, arg0.replace(_HOME, "~"), item.version)))
|
|
93
95
|
if item.version:
|
|
94
96
|
run([arg0, item.version], check=True)
|
|
95
97
|
print()
|
|
File without changes
|
|
File without changes
|