maps a string to a word from given word list
Go to file
jan6 0f8ef4da2d fixed incorrect usage of the scale function (apparently)
also slight README change
2021-07-05 23:37:53 +03:00
wordlists edited term colors to also include black and white 2021-02-19 09:21:15 +02:00
.gitignore Initial commit 2021-02-17 09:04:36 +00:00
LICENSE Initial commit 2021-02-17 09:04:36 +00:00
README.md fixed incorrect usage of the scale function (apparently) 2021-07-05 23:37:53 +03:00
wordmap.py fixed incorrect usage of the scale function (apparently) 2021-07-05 23:37:53 +03:00

README.md

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