Skip to main content

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'

Metadata

Release files for git-name 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for git-name 0.1.0
File Size Uploaded
git-name-0.1.0.tar.gz 49.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for git-name 0.1.0
File Interpreter ABI Platform
git_name-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 100.3 kB

Release files / git-name-0.1.0.tar.gz

Download URL git-name-0.1.0.tar.gz
Size 49.8 kB
Tags Source
SHA-256 checksum
How to use checksums
337e23831f5f10c58eb5057b9490160512e40589873f97553ed1622c25edecb0
BLAKE2b-256 checksum
How to use checksums
5d35d0373da7b694b909a9af9bed711da355c69816002b80c5d3ec0b26734a4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.7.6 Linux/5.4.0-42-generic

Release files / git_name-0.1.0-py3-none-any.whl

Download URL git_name-0.1.0-py3-none-any.whl
Size 50.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a27300e55478898ff567d8173605565fd3ba6e71e28f71d026a049b06dc8aa13
BLAKE2b-256 checksum
How to use checksums
102380f92f22127f95e83a5579976da03aee734dcfee05aac90a96a8f70cec81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.7.6 Linux/5.4.0-42-generic

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page