zipget 2.0.0__py3-none-win_amd64.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.
Binary file
@@ -0,0 +1,396 @@
1
+ Metadata-Version: 2.4
2
+ Name: zipget
3
+ Version: 2.0.0
4
+ Summary: Download and extract archives from GitHub releases, URLs, and S3 via recipes
5
+ Requires-Python: >=3.10
6
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
7
+
8
+ # zipget-rs
9
+
10
+ [![Build and Publish](https://github.com/vivainio/zipget-rs/actions/workflows/build-and-publish.yml/badge.svg)](https://github.com/vivainio/zipget-rs/actions/workflows/build-and-publish.yml)
11
+
12
+ A tool for downloading and extracting files from URLs, GitHub releases, and S3 buckets, with caching and a TOML recipe format.
13
+
14
+ ## Features
15
+
16
+ - **Caching**: Files are cached by URL hash to avoid re-downloading
17
+ - **Multi-Format Archive Support**: Extract both ZIP and tar.gz (.tgz) archives automatically
18
+ - **GitHub Releases Integration**: Download latest or specific tagged releases from GitHub repositories
19
+ - **S3 Support**: Download files from AWS S3 buckets using `s3://` URLs
20
+ - **Semantic TOML Recipes**: Process multiple downloads from TOML recipes with meaningful section names
21
+ - **Version Management**: Automatically upgrade GitHub releases to latest versions
22
+ - **Flexible Output**: Extract to directories and/or save files with custom names
23
+ - **Direct Execution**: Download and run executables directly with the `run` command
24
+ - **Cross-Platform Installation**: Install executables directly to `~/.local/bin` on any platform with `--no-shim`, or use Windows shims
25
+ - **Java JAR Support**: Download and create launchers for Java JAR applications
26
+ - **Cross-Platform**: Works on Windows, macOS, and Linux
27
+
28
+ ## Installation
29
+
30
+ ### Linux / macOS
31
+
32
+ ```bash
33
+ sudo curl -fsSL https://github.com/vivainio/zipget-rs/releases/latest/download/zipget-linux-x64-musl -o /usr/local/bin/zipget && sudo chmod +x /usr/local/bin/zipget
34
+ ```
35
+
36
+ For macOS ARM (Apple Silicon):
37
+ ```bash
38
+ curl -fsSL https://github.com/vivainio/zipget-rs/releases/latest/download/zipget-macos-arm64 -o ~/.local/bin/zipget && chmod +x ~/.local/bin/zipget
39
+ ```
40
+
41
+ ### Windows (PowerShell)
42
+
43
+ ```powershell
44
+ iwr https://github.com/vivainio/zipget-rs/releases/latest/download/zipget-windows-x64.exe -OutFile ~/.local/bin/zipget.exe
45
+ ```
46
+
47
+ ### Self-Update
48
+
49
+ Once installed, zipget can update itself:
50
+ ```bash
51
+ zipget update
52
+ ```
53
+
54
+ ### GitHub Actions
55
+
56
+ ```yaml
57
+ - name: Install zipget
58
+ run: |
59
+ curl -fsSL https://github.com/vivainio/zipget-rs/releases/latest/download/zipget-linux-x64-musl -o /usr/local/bin/zipget
60
+ chmod +x /usr/local/bin/zipget
61
+
62
+ - name: Download tools
63
+ run: zipget recipe tools.toml
64
+ ```
65
+
66
+ For Windows runners:
67
+ ```yaml
68
+ - name: Install zipget
69
+ run: |
70
+ Invoke-WebRequest -Uri "https://github.com/vivainio/zipget-rs/releases/latest/download/zipget-windows-x64.exe" -OutFile "$env:USERPROFILE\.local\bin\zipget.exe"
71
+ echo "$env:USERPROFILE\.local\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
72
+ ```
73
+
74
+ For macOS runners (ARM):
75
+ ```yaml
76
+ - name: Install zipget
77
+ run: |
78
+ curl -fsSL https://github.com/vivainio/zipget-rs/releases/latest/download/zipget-macos-arm64 -o /usr/local/bin/zipget
79
+ chmod +x /usr/local/bin/zipget
80
+ ```
81
+
82
+ ### From Source
83
+
84
+ ```bash
85
+ git clone https://github.com/vivainio/zipget-rs
86
+ cd zipget-rs
87
+ cargo build --release
88
+ ```
89
+
90
+ The binary will be available at `target/release/zipget`.
91
+
92
+ ## Quick Start
93
+
94
+ ```bash
95
+ # Download from TOML recipe
96
+ zipget recipe demo_recipe.toml
97
+
98
+ # Download from GitHub releases (auto-detects best binary for your platform)
99
+ zipget github sharkdp/bat --unzip-to ./tools
100
+
101
+ # Download and run executables directly
102
+ zipget run BurntSushi/ripgrep -- --version
103
+
104
+ # Install tools with shims (Windows only)
105
+ zipget install google/go-jsonnet
106
+
107
+ # Install tools directly (cross-platform)
108
+ zipget install google/go-jsonnet --no-shim
109
+
110
+ # Create launcher for a Java JAR
111
+ zipget shim ./myapp.jar
112
+ ```
113
+
114
+ ## Commands
115
+
116
+ ### Install Command
117
+
118
+ Install executables from packages to your local system:
119
+
120
+ ```bash
121
+ # Install with shims (Windows only) - creates shims in ~/.local/bin
122
+ zipget install sharkdp/bat
123
+
124
+ # Install directly to ~/.local/bin (cross-platform)
125
+ zipget install sharkdp/bat --no-shim
126
+
127
+ # Install specific executable from multi-binary package
128
+ zipget install google/go-jsonnet --exe jsonnet --no-shim
129
+
130
+ # Install from specific release tag
131
+ zipget install sharkdp/bat --tag v0.24.0 --no-shim
132
+
133
+ # Install from direct URL
134
+ zipget install https://example.com/tool.zip --no-shim
135
+ ```
136
+
137
+ **Shims vs Direct Installation:**
138
+ - **Shims (Windows only)**: Creates wrapper executables that can handle different versions and provide additional functionality
139
+ - **Direct Installation (`--no-shim`)**: Copies executables directly to `~/.local/bin`, works on all platforms
140
+
141
+ ### Shim Command
142
+
143
+ Create launchers/shims for executables or Java JAR files:
144
+
145
+ ```bash
146
+ # Create a launcher for a JAR file
147
+ zipget shim ./plantuml.jar
148
+
149
+ # Create with a custom name
150
+ zipget shim ./plantuml.jar --name plantuml
151
+
152
+ # Create with Java options (for JARs)
153
+ zipget shim ./myapp.jar --java-opts="-Xmx1g -Xms256m"
154
+
155
+ # Create a shim for a native executable
156
+ zipget shim ./mytool
157
+ ```
158
+
159
+ **How it works:**
160
+ - For JAR files: Creates a shell script (Unix) or batch file (Windows) that runs `java -jar`
161
+ - For executables: Creates a shell script wrapper (Unix) or Scoop-style shim (Windows)
162
+ - Launchers are created in `~/.local/bin`
163
+
164
+ **Generated JAR launcher (Unix):**
165
+ ```bash
166
+ #!/bin/sh
167
+ exec java -Xmx1g -jar "/path/to/myapp.jar" "$@"
168
+ ```
169
+
170
+ **Generated JAR launcher (Windows):**
171
+ ```batch
172
+ @java -Xmx1g -jar "C:\path\to\myapp.jar" %*
173
+ ```
174
+
175
+ ### Recipe Command
176
+
177
+ Process a TOML recipe file to download and extract multiple packages:
178
+
179
+ ```bash
180
+ # Process a TOML recipe file
181
+ zipget recipe my_recipe.toml
182
+
183
+ # Upgrade all GitHub releases in recipe to latest versions
184
+ zipget recipe my_recipe.toml --upgrade
185
+
186
+ # Process only specific items by their section names (tags)
187
+ zipget recipe my_recipe.toml ripgrep
188
+ ```
189
+
190
+ ### GitHub Command
191
+
192
+ Download the latest release binary from a GitHub repository:
193
+
194
+ ```bash
195
+ # Download latest release (auto-detects best binary for your platform)
196
+ zipget github sharkdp/bat
197
+
198
+ # Download specific tagged release
199
+ zipget github sharkdp/bat --tag v0.24.0
200
+
201
+ # Save to specific file path
202
+ zipget github BurntSushi/ripgrep --save-as ./tools/ripgrep.zip
203
+
204
+ # Manually specify asset if needed (rarely required)
205
+ zipget github sharkdp/bat --asset windows-x86_64
206
+ ```
207
+
208
+ ### Run Command
209
+
210
+ Download and run an executable from a package:
211
+
212
+ ```bash
213
+ # Run a single executable from a GitHub release
214
+ zipget run BurntSushi/ripgrep -- --version
215
+
216
+ # Run a specific executable if multiple are found
217
+ zipget run sharkdp/bat --exe bat -- --help
218
+
219
+ # Run from a direct URL
220
+ zipget run https://example.com/tool.zip --exe mytool -- arg1 arg2
221
+ ```
222
+
223
+ The `run` command:
224
+ - Downloads and caches the package (honoring existing cache)
225
+ - Extracts the package to a temporary directory
226
+ - Automatically finds executable files in the extracted content
227
+ - If only one executable is found, runs it directly
228
+ - If multiple executables are found, prompts you to specify which one using `--exe`
229
+ - Passes all arguments after `--` to the executable
230
+ - Cleans up temporary files after execution
231
+
232
+ ## Recipe Format
233
+
234
+ Zipget uses TOML recipe files with semantic section names. Each section name becomes an implicit tag for that download item:
235
+
236
+ ```toml
237
+ [bat]
238
+ github = { repo = "sharkdp/bat", tag = "v0.24.0" }
239
+ unzip_to = "./tools"
240
+ save_as = "./downloads/bat.zip"
241
+ files = "*.exe"
242
+
243
+ [ripgrep]
244
+ github = { repo = "BurntSushi/ripgrep" }
245
+ save_as = "./tools/ripgrep.zip"
246
+
247
+ [public-tool]
248
+ url = "https://example.com/some-file.zip"
249
+ unzip_to = "./downloads"
250
+ ```
251
+
252
+ ### Recipe Schema
253
+
254
+ Each section represents a download item and can have:
255
+ - **url**: Direct URL to download from (supports HTTP/HTTPS, S3 URLs, and local file paths starting with `/` or `.`)
256
+ - **github**: GitHub release specification (inline table format)
257
+ - **repo**: Repository in "owner/repo" format
258
+ - **asset**: Regex pattern to match release asset names (case-insensitive; optional, auto-detected if not specified)
259
+ - **tag**: Specific release tag (optional, defaults to latest)
260
+ - **unzip_to**: Directory where archives should be extracted (supports ZIP and tar.gz files)
261
+ - **save_as**: Path where the downloaded file should be saved
262
+ - **files**: Glob pattern for files to extract from archives (extracts all if not specified)
263
+ - **profile**: AWS profile to use for S3 downloads
264
+ - **executable**: Set to `true` to add executable permission to extracted files (Unix only)
265
+ - **install_exes**: List of executables or JAR files to install to `~/.local/bin` (supports glob patterns)
266
+ - **no_shim**: Set to `true` to copy executables directly instead of creating shims/launchers
267
+
268
+ ## Java JAR Support
269
+
270
+ Zipget can download Java JAR applications and create launcher scripts for them.
271
+
272
+ ### Installing JARs from Recipes
273
+
274
+ ```toml
275
+ [plantuml]
276
+ github = { repo = "plantuml/plantuml", asset = "plantuml.jar" }
277
+ save_as = "./tools/plantuml.jar"
278
+ install_exes = ["plantuml.jar"]
279
+ ```
280
+
281
+ This will:
282
+ 1. Download `plantuml.jar` from the GitHub release
283
+ 2. Save it to `./tools/plantuml.jar`
284
+ 3. Create a launcher at `~/.local/bin/plantuml`
285
+
286
+ ### Installing JARs with the Shim Command
287
+
288
+ ```bash
289
+ curl -LO https://github.com/plantuml/plantuml/releases/latest/download/plantuml.jar
290
+ zipget shim ./plantuml.jar
291
+ # Now you can run: plantuml -version
292
+ ```
293
+
294
+ ### JARs with Custom Java Options
295
+
296
+ ```bash
297
+ zipget shim ./memory-intensive-app.jar --java-opts="-Xmx4g -XX:+UseG1GC"
298
+ ```
299
+
300
+ ## GitHub Integration
301
+
302
+ ### Latest Releases
303
+
304
+ ```toml
305
+ [bat]
306
+ github = { repo = "sharkdp/bat" }
307
+ ```
308
+
309
+ ### Specific Versions
310
+
311
+ ```toml
312
+ [bat]
313
+ github = { repo = "sharkdp/bat", tag = "v0.24.0" }
314
+ ```
315
+
316
+ ### Manual Asset Selection (Optional)
317
+
318
+ The `asset` field is a regex pattern (case-insensitive) matched against release asset names:
319
+
320
+ ```toml
321
+ [bat]
322
+ # Simple substring match (still works — valid regex)
323
+ github = { repo = "sharkdp/bat", asset = "windows-x86_64", tag = "v0.24.0" }
324
+
325
+ [obsidian]
326
+ # Regex to select amd64 tarball, excluding arm64 variant
327
+ github = { repo = "obsidianmd/obsidian-releases", asset = "^obsidian-[\\d.]+\\.tar\\.gz$" }
328
+ ```
329
+
330
+ ### Version Upgrading
331
+
332
+ ```bash
333
+ zipget recipe my_recipe.toml --upgrade
334
+ ```
335
+
336
+ This will:
337
+ - Check the latest release for each GitHub repository
338
+ - Update tags to the latest version
339
+ - Save the updated recipe file
340
+ - Show which versions were upgraded
341
+
342
+ ## How It Works
343
+
344
+ 1. **Caching**: Each URL is hashed using MD5, and the downloaded file is stored as `{hash}_{filename}` in a system temporary cache directory (`%TEMP%\zipget-cache` on Windows, `/tmp/zipget-cache` on Unix)
345
+ 2. **Cache Check**: Before downloading, zipget checks if the file already exists in the cache directory
346
+ 3. **GitHub API**: For GitHub releases, the tool queries the GitHub API to get download URLs
347
+ 4. **S3 Downloads**: For S3 URLs, the tool uses AWS CLI (`aws s3 cp`) to download files using your configured credentials
348
+ 5. **Download**: If not cached, the file is downloaded and stored in the cache directory
349
+ 6. **Extract**: If `unzip_to` is specified, the archive is extracted to the target directory (auto-detects ZIP and tar.gz formats)
350
+ 7. **Save**: If `save_as` is specified, the downloaded file is copied to the specified path
351
+ 8. **Run**: The `run` command additionally extracts to a temporary directory, finds executables, and executes them with provided arguments
352
+
353
+ ## Selective File Extraction
354
+
355
+ Use the `files` field to extract only specific files from archives using glob patterns.
356
+
357
+ When `files` is specified, the directory structure is flattened — files are extracted directly to `unzip_to` without preserving subdirectories:
358
+
359
+ ```toml
360
+ [ripgrep]
361
+ # Archive contains: ripgrep-15.1.0-x86_64-unknown-linux-musl/rg
362
+ # Result: ./tools/rg (flattened, not ./tools/ripgrep-15.1.0-.../rg)
363
+ github = { repo = "BurntSushi/ripgrep", asset = "x86_64-unknown-linux-musl" }
364
+ unzip_to = "./tools"
365
+ files = "*/rg"
366
+
367
+ [bat-windows]
368
+ github = { repo = "sharkdp/bat", asset = "windows" }
369
+ unzip_to = "./tools"
370
+ files = "{bat.exe,LICENSE*}"
371
+ ```
372
+
373
+ Common glob patterns:
374
+ - `*.exe` - Extract only .exe files
375
+ - `*.{exe,dll}` - Extract .exe and .dll files
376
+ - `*/rg` - Extract `rg` binary from any subdirectory (flattened)
377
+ - `{LICENSE,README*}` - Extract LICENSE and README files
378
+
379
+ ## Setting Executable Permissions (Unix)
380
+
381
+ Use the `executable` field to automatically set executable permissions on extracted files:
382
+
383
+ ```toml
384
+ [my-scripts]
385
+ url = "/path/to/scripts.tar.gz"
386
+ unzip_to = "./bin"
387
+ files = "*.sh"
388
+ executable = true
389
+ ```
390
+
391
+ Local file paths (starting with `/` or `.`) are also supported in the `url` field.
392
+
393
+ ## License
394
+
395
+ MIT License
396
+
@@ -0,0 +1,5 @@
1
+ zipget-2.0.0.data/scripts/zipget.exe,sha256=x1XSeZ5TI8FWyZGKPTiFf-rLgaix7eGifc3fR72nT64,4184064
2
+ zipget-2.0.0.dist-info/METADATA,sha256=57aqueqwvnkRLa6vAbVQw9JuW4DjGAk5M6GqZS1tn8g,12766
3
+ zipget-2.0.0.dist-info/WHEEL,sha256=T1DkkvVlw1bn9taKYXZyic2iz5lp4CFExsOlxcRDXDI,94
4
+ zipget-2.0.0.dist-info/sboms/zipget.cyclonedx.json,sha256=NzLfJlBB0r_5UepM-ag6tuvonybYIs2bO7Uc7tu6gIc,158844
5
+ zipget-2.0.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.14.0)
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-win_amd64