2017-10-31 11:01:53 +00:00
|
|
|
#!/bin/bash
|
2018-12-30 12:44:08 +00:00
|
|
|
set -euo pipefail
|
2017-10-31 11:01:53 +00:00
|
|
|
|
2018-12-30 12:44:08 +00:00
|
|
|
version="8744120d"
|
|
|
|
source="https://raw.githubusercontent.com/leonardr/olipy/${version}/data/more-corpora/scribblenauts_words.txt"
|
2017-10-31 11:01:53 +00:00
|
|
|
|
2018-12-30 12:44:08 +00:00
|
|
|
words=$(curl -sL "${source}" | awk '/^[a-z]{4}[a-z]*$/{ print "\""$1"\"," }')
|
2017-10-31 11:01:53 +00:00
|
|
|
|
2018-12-30 12:44:08 +00:00
|
|
|
cat -s <<EOF >lib/xkcd_words.go
|
2017-10-31 11:01:53 +00:00
|
|
|
package securepassword
|
|
|
|
|
|
|
|
// xkcdWordList contains a list of words derived from the scribblenauts
|
|
|
|
// word list inside the olipy library by leonardr
|
|
|
|
// https://github.com/leonardr/olipy
|
|
|
|
var xkcdWordList = []string{
|
2018-12-30 12:44:08 +00:00
|
|
|
${words}
|
2017-10-31 11:01:53 +00:00
|
|
|
}
|
|
|
|
EOF
|
|
|
|
|
|
|
|
gofmt -s -w lib/xkcd_words.go
|