Download and extract files to `~/.local/bin/`.
Project description
dotlocalslashbin
→ Download to ~/.local/bin/
Features
Uses a TOML configuration file, by default bin.toml
and has no dependencies
beyond the Python standard library. Supports the following actions after
downloading the URL* to a cache:
- extract to the output directory — from zip or tar files — or
- create a symbolic link in the output directory or
- run a command for example to correct the shebang line in a zipapp or
- copy the downloaded file
Guesses the correct action if none is specified. By default caches downloads to
~/.cache/dotlocalslashbin/
.
Optionally can:
- run a command after download for example to correct a shebang line
- confirm a SHA256 or SHA512 hex-digest of the downloaded file
- invoke the target with an argument, for example
--version
- strip a prefix while extracting
- ignore certain files while extracting
* if the URL is an absolute path on the local file system; it is not downloaded to the cache.
Examples
For example to download yq
to the current working directory, first save the
following as yq.toml
, then run the command below:
[yq]
expected = "cfbbb9ba72c9402ef4ab9d8f843439693dfb380927921740e51706d90869c7e1"
url = "https://github.com/mikefarah/yq/releases/download/v4.43.1/yq_linux_amd64"
version = "--version"
Command:
dotlocalslashbin --input=yq.toml --output=.
Further examples are available in
bin.toml
in maxwell-k/dotfiles.
See also
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dotlocalslashbin-0.0.8.tar.gz
.
File metadata
- Download URL: dotlocalslashbin-0.0.8.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a6d4a57ce7ffdc26b9719b4465c9153cd38654149846b02395aaa2b5808a5d0 |
|
MD5 | 0d3359371ccb17d71db26ee5a3216783 |
|
BLAKE2b-256 | 0955f3bc2e220be27a3879704f308ae79b325e9af599879053c43acf3a60d098 |
File details
Details for the file dotlocalslashbin-0.0.8-py2.py3-none-any.whl
.
File metadata
- Download URL: dotlocalslashbin-0.0.8-py2.py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9547e74ad6501fe7274d17b1b54754766e11b31ea09aff9122d23ea75b447959 |
|
MD5 | ec76739dc9f95327cda8d9a8b3bf7c0c |
|
BLAKE2b-256 | e468ef743b4a2c401e4a6ff6be3ce039f9497352181aa31c4557fb0767dd9fa7 |