diff --git a/README.md b/README.md index a5c2331..c36152d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ## Installation -To compile from source, you need to have `go` installed. +To compile from the source, you need to have golang installed on the system. git clone https://github.com/weakish/xkcd936 cd xkcd936 @@ -42,6 +42,17 @@ By default, xkcd936 will generate four words, consistent with the [xkcd936] comic. But xkcd936 can generate up to 12 words with the number specified in `-n`. +By default, the BIP32 English word list is used. +To use a BIP32 word list in another language, specify it in `-l`. + +Some diceware-derived lists can also be used: + + - `diceware{1,2,3,4}`: four lists split from [diceware8k], containing 2048 words each. + - `diceware2k`: [a wordlist derived from diceware8k][diceware2k], containing 2048 short words. + +[diceware8k]: https://theworld.com/~reinhold/diceware8k.txt +[diceware2k]: https://diceware2k.surge.sh + ### As a Library ```go diff --git a/main.go b/main.go index 2ae141b..c16df14 100644 --- a/main.go +++ b/main.go @@ -13,7 +13,7 @@ func main() { var titlized *bool = flag.Bool("t", false, "titlized words (English only)") var version *bool = flag.Bool("V", false, "show version") var number *int = flag.Int("n", 4, "number of words, 1 <= n <= 12") - var list *string = flag.String("l", "en", "word list: chs, cht, cs, en, fr, it, jp, ko, es") + var list *string = flag.String("l", "en", "word list: chs, cht, cs, en, fr, it, jp, ko, es, diceware{1,2,3,4} (split from diceware8k), diceware2k") flag.Parse() if *version { diff --git a/morelists/diceware-short.go b/morelists/diceware-short.go index e96fb22..f528344 100644 --- a/morelists/diceware-short.go +++ b/morelists/diceware-short.go @@ -9,7 +9,7 @@ var DicewareShort = strings.Split(strings.TrimSpace(diceware2k), "\n") // // cat diceware8k.txt | egrep '^.{2,3}$' | wc -l # 2028 // -// And diceware8k contains 51 single character "word": (seperated by comma): +// And diceware8k contains 51 single character "words": (seperated by comma): // // ; cat diceware8k.txt | egrep '^.$' | tr '\n' ',' // a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,