dotlocalslashbin 0.0.10__py2.py3-none-any.whl → 0.0.12__py2.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dotlocalslashbin
3
- Version: 0.0.10
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/dotfiles/refs/heads/main/dotlocalslashbin.py --help
63
+ uv run https://raw.githubusercontent.com/maxwell-k/dotlocalslashbin/refs/heads/main/src/dotlocalslashbin.py --version
64
64
 
65
65
  ## Examples
66
66
 
@@ -0,0 +1,5 @@
1
+ dotlocalslashbin.py,sha256=4DGpbdAoqziXxzTnuy0Cuu8Qna6aXjp_x3HhOOqVleo,5987
2
+ dotlocalslashbin-0.0.12.dist-info/METADATA,sha256=ysRLipwB0T6xsJI7T1M3PlJ8ceEwfD_-urNMRu1RZOw,3048
3
+ dotlocalslashbin-0.0.12.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
4
+ dotlocalslashbin-0.0.12.dist-info/entry_points.txt,sha256=eK8C0lW2h7WAcr78hM-_OBrLotRptdLvjbnT7f67m34,58
5
+ dotlocalslashbin-0.0.12.dist-info/RECORD,,
dotlocalslashbin.py CHANGED
@@ -23,8 +23,9 @@ from urllib.request import urlopen
23
23
  from zipfile import ZipFile
24
24
 
25
25
 
26
- __version__ = "0.0.10"
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 | None
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", None)
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 = item.name if args.output == _OUTPUT else str(item.target.absolute())
92
- print(" ".join(("#" if item.version else "$", arg0, item.version or "")))
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()
@@ -1,5 +0,0 @@
1
- dotlocalslashbin.py,sha256=nUPegFMgTLe79Mtr59VA1WBvQ-6od-ThLr9X3m3IXsc,5963
2
- dotlocalslashbin-0.0.10.dist-info/METADATA,sha256=l3fXw-DIFUn347nPPNQ-x4ktUGDO5uJoLu9EPwGpGmQ,3033
3
- dotlocalslashbin-0.0.10.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
4
- dotlocalslashbin-0.0.10.dist-info/entry_points.txt,sha256=eK8C0lW2h7WAcr78hM-_OBrLotRptdLvjbnT7f67m34,58
5
- dotlocalslashbin-0.0.10.dist-info/RECORD,,