randomWordChoice
Usage
randomWordChoice [-t|--titlecase] [-s|--separator SEP] <wordlist1> <wordlist2>
A random word will be sampled from each word list, in the order provided.
By default, will return space-separated. Can provide your own separator, and also choose for each word to be capitalised.
Example:
randomWordChoice $HOME/words/adjectives.txt $HOME/words/animals.txt
# => angry badger
randomWordChoice -t -s "-" $HOME/words/animals.txt $HOME/words/jobs.txt
# => Shrew-Postman
Originally created animalhash
to provide something like docker's auto generated process names (using word lists adjectives.txt, colours.txt, and animals.txt). Then, decided to add in jobs.txt as a way of generating some drawing prompts.
Tips
Perhaps easiest used by creating a shell alias to commonly used wordlists, e.g.:
alias animalhash='randomWordChoice -s "" -t /usr/local/share/wordlists/adjectives.txt /usr/local/share/wordlists/colours.txt /usr/local/share/wordlists/animals.txt'
Install
go install