dotlocalslashbin 0.0.18__tar.gz → 0.0.20__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dotlocalslashbin
3
- Version: 0.0.18
3
+ Version: 0.0.20
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
 
@@ -40,27 +40,28 @@ Command to install the latest released `dotlocalslashbin` from PyPI:
40
40
  Command to run latest development version of `dotlocalslashbin` directly from
41
41
  GitHub:
42
42
 
43
- uv run https://raw.githubusercontent.com/maxwell-k/dotlocalslashbin/refs/heads/main/src/dotlocalslashbin.py --version
43
+ uv tool run git+https://github.com/maxwell-k/dotlocalslashbin --version
44
44
 
45
- ## Examples
45
+ ## Example
46
46
 
47
- For example to download `yq` to the current working directory, first save the
48
- following as `yq.toml`, then install with uv (above) and then run the command
49
- below:
47
+ For example to download `tofu` to the current working directory, first save the
48
+ following as `tofu.toml` then run the command below.
50
49
 
51
50
  ```
52
- [yq]
53
- expected = "cfbbb9ba72c9402ef4ab9d8f843439693dfb380927921740e51706d90869c7e1"
54
- url = "https://github.com/mikefarah/yq/releases/download/v4.43.1/yq_linux_amd64"
55
- version = "--version"
51
+ [tofu]
52
+ url = "https://github.com/opentofu/opentofu/releases/download/v1.10.3/tofu_1.10.3_linux_amd64.zip"
53
+ expected = "acf330602ec6ae29ba68dd5d8eb1f645811ae9809231ecdccd4774b21d5c79bc"
54
+ version = "version"
55
+ ignore = ["LICENSE", "README.md", "CHANGELOG.md"]
56
56
  ```
57
57
 
58
58
  Command:
59
59
 
60
- dotlocalslashbin --input=yq.toml --output=.
60
+ uv tool run dotlocalslashbin --input=tofu.toml --output=.
61
61
 
62
- Further examples are available in
63
- [`bin.toml` in maxwell-k/dotfiles](https://github.com/maxwell-k/dotfiles/blob/main/bin.toml).
62
+ Further examples are available in files like `linux-amd64.toml` and
63
+ `github.toml` in the `bin` directory of
64
+ [maxwell-k/dotfiles](https://github.com/maxwell-k/dotfiles/).
64
65
 
65
66
  ## See also
66
67
 
@@ -53,6 +53,12 @@ ignore = [
53
53
  "T201", # print is used for output in command line scripts
54
54
  ]
55
55
 
56
+ [tool.usort]
57
+ excludes = [
58
+ "/.venv/",
59
+ "/.nox/",
60
+ ]
61
+
56
62
  # pyproject.toml
57
63
  # SPDX-FileCopyrightText: 2024 Keith Maxwell <keith.maxwell@gmail.com>
58
64
  # SPDX-License-Identifier: CC0-1.0
@@ -23,7 +23,7 @@ from urllib.request import urlopen
23
23
  from zipfile import ZipFile
24
24
 
25
25
 
26
- __version__ = "0.0.18"
26
+ __version__ = "0.0.20"
27
27
 
28
28
  _CACHE = Path("~/.cache/dotlocalslashbin/")
29
29
  _HOME = str(Path("~").expanduser())
@@ -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