wordmap/README.md

2.2 KiB

wordmap

by jan6

maps a string to a word from given word list, created because I wanted a consistent hash equivalence thingy and only found some overcomplicated ones

Usage: wordmap.py <wordlist file> <string to hash> [string to append]

where string to append is optional, and itself has \x1b[0m appended to it (the "reset formatting" code to stop color bleeding)

for example python3 wordmap.py wordlists/corncob_lowercase.txt "example words" would result in serenades
and to use the terminal colors: python3 wordmap.py wordlists/term16color.txt "colored" "colored"

it can also be imported, something like python3 -c 'a="examples";from wordmap import wordmap;wordmap("wordlists/term16color.txt",a);print(a+"\x1b[0m")'

corncob lists included here are from http://www.mieliestronk.com/wordlist.html
the color names list is from wikipedia, more specifically re-parsed from https://raw.githubusercontent.com/codebrainz/color-names/master/output/colors.conf

but you can use any newline-separated list of strings

some other word lists to save you time:

of course, you could also concaternate them all into one massive file, shuffle all the lines, and have one mega-word-list ;P