randomWordChoice

command module
v0.0.0-...-9089251 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2023 License: MIT Imports: 7 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL