Uniquify - get unique, short and easy-to-read names and paths
Project description
Shorten names/paths by extracting non-common parts:
>>> from uniquify import shortname, shortpath >>> shortname(['__common_part___abc___common_part__', ... '__common_part___ijk___common_part__', ... '__common_part___xyz___common_part__']) ['abc', 'ijk', 'xyz'] >>> shortpath(['some/long/path/___/abc/___/___/', ... 'some/long/path/___/ijk/___/___/', ... 'some/long/path/___/xyz/___/___/']) ['abc', 'ijk', 'xyz']
Convert common parts into skip marks:
>>> from uniquify import skipcommonname, skipcommonpath >>> skipcommonname(['ab__common_part___c', ... 'ij__common_part___k', ... 'xy__common_part___z']) ['ab...c', 'ij...k', 'xy...z'] >>> skipcommonpath(['ab/common/path/c', ... 'ij/common/path/k', ... 'xy/common/path/z']) ['ab/.../c', 'ij/.../k', 'xy/.../z']
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
uniquify-0.0.0.tar.gz
(2.9 kB
view details)
File details
Details for the file uniquify-0.0.0.tar.gz
.
File metadata
- Download URL: uniquify-0.0.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcd3964537ca7ec98b216c2a00a0f03a6475b8934f5ffa297a58945b50a1ba99 |
|
MD5 | 132d176eed147f1f8573aead8d95a2c2 |
|
BLAKE2b-256 | d088313c7b30fc5913be6d703009ec2f8cb43b219a667af3487aad18429419cf |