Unibox is a tool that aims to provide a unified interface for various common daily operations
Project description
Unibox
Unibox is a tool that aims to provide a unified interface for various common daily operations.
Features
CLI:
unibox resize <dir>
: resizes a directory of images using eitherpillow
orlibvips
- customizable size / quality / encoding (png / webp / jpeg)
unibox copy <dir>
: an awscli-like tool for copying files with certain suffix to a new dir, keeping the same directory structure.- bypasses windows explorer so it's much faster.
unibox move <dir>
: likecopy
, but moves instead
utils:
UniLogger
: uniformed logger class (logger = unibox.UniLogger()
, and uselogger.info(...)
)UniLoader
: uniformed data loader class (unibox.loads(<filename>)
)UniSaver
: uniformed data saver class (unibox.saves(<data>, <filename>)
)UniTraverser
: uniformed directory traverser class, with callbacks in multiple stagesUniResizer
: uniformed image resizer class, with callbacks in multiple stages
callables:
unibox.traverses(dir, include, exclude, relative_unix)
: traverse a directory using specified exclude / include extensions, and return a list of filesunibox.loads(filepath)
: load arbitrary data from a file into suitable formats, with automatic detection of file type- supported formats: see UniLoader class implementation
unibox.saves(data, filepath)
: save arbitrary data to a file, with automatic detection of file type
Install
install from pypi:
pip install unibox
build from source:
git clone https://github.com/trojblue/unibox
# pip install poetry
poetry install
poetry build
pip install dist/unibox-<version number>.whl
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
unibox-0.3.0.tar.gz
(15.8 kB
view details)
Built Distribution
unibox-0.3.0-py3-none-any.whl
(20.2 kB
view details)
File details
Details for the file unibox-0.3.0.tar.gz
.
File metadata
- Download URL: unibox-0.3.0.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fe420741c66fb36317fa35ab3af569905a2782a90ef7a5532c5061b34df0d1c |
|
MD5 | 57634efc49038f8c68d67ef75f2bdf1a |
|
BLAKE2b-256 | fea70fbc193973f0286954568fd927916c14257f875bbc2af6de91e801a82af1 |
File details
Details for the file unibox-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: unibox-0.3.0-py3-none-any.whl
- Upload date:
- Size: 20.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b088e87086580de4a7156ccf846fa1e093256b3fd921d1d08d6ac911fe8ff67 |
|
MD5 | 86c91448d59a08fc474afab3191d1de0 |
|
BLAKE2b-256 | 6b8b915c02fa036ec681287c4a8f71704646322e2994226db1af943076e54170 |