dotlocalslashbin 0.0.19__py3-none-any.whl → 0.0.21__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.4
2
2
  Name: dotlocalslashbin
3
- Version: 0.0.19
3
+ Version: 0.0.21
4
4
  Summary: Download and extract files to `~/.local/bin/`.
5
5
  Author-email: Keith Maxwell <keith.maxwell@gmail.com>
6
6
  Requires-Python: >=3.13
@@ -64,27 +64,28 @@ Command to install the latest released `dotlocalslashbin` from PyPI:
64
64
  Command to run latest development version of `dotlocalslashbin` directly from
65
65
  GitHub:
66
66
 
67
- uv run https://raw.githubusercontent.com/maxwell-k/dotlocalslashbin/refs/heads/main/src/dotlocalslashbin.py --version
67
+ uv tool run git+https://github.com/maxwell-k/dotlocalslashbin --version
68
68
 
69
- ## Examples
69
+ ## Example
70
70
 
71
- For example to download `yq` to the current working directory, first save the
72
- following as `yq.toml`, then install with uv (above) and then run the command
73
- below:
71
+ For example to download `tofu` to the current working directory, first save the
72
+ following as `tofu.toml` then run the command below.
74
73
 
75
74
  ```
76
- [yq]
77
- expected = "cfbbb9ba72c9402ef4ab9d8f843439693dfb380927921740e51706d90869c7e1"
78
- url = "https://github.com/mikefarah/yq/releases/download/v4.43.1/yq_linux_amd64"
79
- version = "--version"
75
+ [tofu]
76
+ url = "https://github.com/opentofu/opentofu/releases/download/v1.10.3/tofu_1.10.3_linux_amd64.zip"
77
+ expected = "acf330602ec6ae29ba68dd5d8eb1f645811ae9809231ecdccd4774b21d5c79bc"
78
+ version = "version"
79
+ ignore = ["LICENSE", "README.md", "CHANGELOG.md"]
80
80
  ```
81
81
 
82
82
  Command:
83
83
 
84
- dotlocalslashbin --input=yq.toml --output=.
84
+ uv tool run dotlocalslashbin --input=tofu.toml --output=.
85
85
 
86
- Further examples are available in
87
- [`bin.toml` in maxwell-k/dotfiles](https://github.com/maxwell-k/dotfiles/blob/main/bin.toml).
86
+ Further examples are available in files like `linux-amd64.toml` and
87
+ `github.toml` in the `bin` directory of
88
+ [maxwell-k/dotfiles](https://github.com/maxwell-k/dotfiles/).
88
89
 
89
90
  ## See also
90
91
 
@@ -0,0 +1,6 @@
1
+ dotlocalslashbin.py,sha256=O1phXrUwrPVI5fTBcYV1PaNq_B8P9z2DcDHvOF-LpyA,6451
2
+ dotlocalslashbin-0.0.21.dist-info/METADATA,sha256=UO8rU7_P-tMyYuA7vvHV-Z4cfZ2skjJTns-BLIbYIrE,3225
3
+ dotlocalslashbin-0.0.21.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
4
+ dotlocalslashbin-0.0.21.dist-info/entry_points.txt,sha256=eK8C0lW2h7WAcr78hM-_OBrLotRptdLvjbnT7f67m34,58
5
+ dotlocalslashbin-0.0.21.dist-info/licenses/LICENSES/MPL-2.0.txt,sha256=ZqMQfVrWoFiqt1PqrCBHzLLtDjlGXdD-WETaPjANUXI,16727
6
+ dotlocalslashbin-0.0.21.dist-info/RECORD,,
dotlocalslashbin.py CHANGED
@@ -23,7 +23,7 @@ from urllib.request import urlopen
23
23
  from zipfile import ZipFile
24
24
 
25
25
 
26
- __version__ = "0.0.19"
26
+ __version__ = "0.0.21"
27
27
 
28
28
  _CACHE = Path("~/.cache/dotlocalslashbin/")
29
29
  _HOME = str(Path("~").expanduser())
@@ -101,7 +101,7 @@ def main() -> int:
101
101
  prompt = "#" if item.version else "$"
102
102
  print(" ".join((prompt, arg0.replace(_HOME, "~"), item.version)))
103
103
  if item.version:
104
- run([arg0, item.version], check=True)
104
+ run([arg0, *split(item.version)], check=True)
105
105
  print()
106
106
 
107
107
  return 0
@@ -175,9 +175,9 @@ def _download(item: Item) -> None:
175
175
  def _untar(item: Item) -> None:
176
176
  with tarfile.open(item.downloaded, "r") as file:
177
177
  for member in file.getmembers():
178
- if member.path in item.ignore:
178
+ if member.name in item.ignore:
179
179
  continue
180
- member.path = member.path.removeprefix(item.prefix)
180
+ member.name = member.name.removeprefix(item.prefix)
181
181
  try:
182
182
  file.extract(member, path=item.target.parent, filter="tar")
183
183
  except TypeError: # before 3.11.4 e.g. Debian 12
@@ -1,6 +0,0 @@
1
- dotlocalslashbin.py,sha256=gponG7eWgAxyD0pCPQME7q5gkMFS2EmTrZsQjVw3eIM,6443
2
- dotlocalslashbin-0.0.19.dist-info/METADATA,sha256=VhqFlFyQ_aDz1NjF6TGVCJvW3pMRS3ds-L5dm-PDemg,3178
3
- dotlocalslashbin-0.0.19.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
4
- dotlocalslashbin-0.0.19.dist-info/entry_points.txt,sha256=eK8C0lW2h7WAcr78hM-_OBrLotRptdLvjbnT7f67m34,58
5
- dotlocalslashbin-0.0.19.dist-info/licenses/LICENSES/MPL-2.0.txt,sha256=ZqMQfVrWoFiqt1PqrCBHzLLtDjlGXdD-WETaPjANUXI,16727
6
- dotlocalslashbin-0.0.19.dist-info/RECORD,,