a cli and python package for naming hashes
Project description
git-name
a git extension and python package for turning hashes into memorable names
install
from pypi
pip install git-name
or from github master
pip install git+https://github.com/CircArgs/git-name.git
Usage
shell
CircArgs $ git name -h
usage: git name [-h] [-f] [-l LENGTH] word_or_hash
convert hashes to memorable names
positional arguments:
word_or_hash
optional arguments:
-h, --help show this help message and exit
-f, --from `from hash` flag used to denote argument is a hash.
-l LENGTH, --length LENGTH
`hash length` (default=7) truncate the input output hash to this length
CircArgs $ git name efa8f31
ten occupied nuts
CircArgs $ git name -f "ten occupied nuts"
efa8f31
CircArgs $ git name -f "five fat frogs"
a42cd68
# use names with git instead of hashes
CircArgs $ git checkout $(git name -f "five fat frogs")
python
from git_name import NameGenerator
num=142152565
ng=NameGenerator()
name=ng.generate_name(num)
print(name)
# 'eight upward buttons'
name_num=ng.generate_num(name)
print(name_num)
#142152565
print(num==name_num)
#True
print(ng.generate_hash_from_name(name, 7))
#8791375
print(ng.generate_name_from_hash(8791375, 7)
#'eight upward buttons'
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
git-name-0.1.0.tar.gz
(49.8 kB
view details)
Built Distribution
git_name-0.1.0-py3-none-any.whl
(50.6 kB
view details)
File details
Details for the file git-name-0.1.0.tar.gz
.
File metadata
- Download URL: git-name-0.1.0.tar.gz
- Upload date:
- Size: 49.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.7.6 Linux/5.4.0-42-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 337e23831f5f10c58eb5057b9490160512e40589873f97553ed1622c25edecb0 |
|
MD5 | 5736eb4013a07e65b83918eb7fd410e2 |
|
BLAKE2b-256 | 5d35d0373da7b694b909a9af9bed711da355c69816002b80c5d3ec0b26734a4f |
File details
Details for the file git_name-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: git_name-0.1.0-py3-none-any.whl
- Upload date:
- Size: 50.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.7.6 Linux/5.4.0-42-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a27300e55478898ff567d8173605565fd3ba6e71e28f71d026a049b06dc8aa13 |
|
MD5 | 4c59548aced8af77176e4361f6402e1c |
|
BLAKE2b-256 | 102380f92f22127f95e83a5579976da03aee734dcfee05aac90a96a8f70cec81 |