summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-04-08 05:11:14 +0530
committerAndinus <andinus@nand.sh>2020-04-08 05:11:14 +0530
commitef6aa9a90243589f29c2741554af77a6a1233a43 (patch)
tree3983c9d4d470f101727b5f146d25bef255aea8bd
parenta2f0bec9c55817d0c15d3da0cbd5df120e152cfb (diff)
downloadgrus-ef6aa9a90243589f29c2741554af77a6a1233a43.tar.gz
Add installation instructions to readme v0.2.0
-rw-r--r--README.org37
-rw-r--r--grus.go2
2 files changed, 39 insertions, 0 deletions
diff --git a/README.org b/README.org
index 859005d..ad481a7 100644
--- a/README.org
+++ b/README.org
@@ -1,6 +1,8 @@
 #+HTML_HEAD: <link rel="stylesheet" href="../../static/style.css">
 #+HTML_HEAD: <link rel="icon" href="../../static/grus/favicon.png" type="image/png">
 #+EXPORT_FILE_NAME: index
+#+OPTIONS: toc:nil
+#+TOC: headlines 3
 #+TITLE: Grus
 
 Grus is a simple word unjumbler written in Go.
@@ -24,6 +26,14 @@ in next dictionary, search stops once the word gets unjumbled.
 |----------------------+----------------------------+--------------------|
 | =GRUS_SEARCH_ALL=      | Search in all dictionaries | 1 / true           |
 | =GRUS_ANAGRAMS=        | Print all anagrams         | 1 / true           |
+** Default Dictionaries
+These files will be checked by default (in order).
+- =/usr/local/share/dict/words=
+- =/usr/local/share/dict/web2=
+- =/usr/share/dict/words=
+- =/usr/share/dict/web2=
+- =/usr/share/dict/special/4bsd=
+- =/usr/share/dict/special/math=
 ** Examples
 #+BEGIN_SRC sh
 # unjumble word
@@ -44,6 +54,33 @@ GRUS_SEARCH_ALL=1 grus word /path/to/dict1 /path/to/dict2
 # search for word in all dictionaries & print all anagrams
 GRUS_SEARCH_ALL=1 GRUS_ANAGRAMS=1 grus word
 #+END_SRC
+* Installation
+** Pre-built binaries
+Pre-built binaries are available for OpenBSD, FreeBSD, NetBSD, DragonFly BSD,
+Linux & macOS.
+
+This will just print the steps to install grus & you have to run those commands
+manually. Piping directly to =sh= is not a good idea, don't run this unless you
+understand what you're doing.
+*** v0.2.0
+#+BEGIN_SRC sh
+curl -s https://tildegit.org/andinus/grus/raw/tag/v0.2.0/scripts/install.sh | sh
+#+END_SRC
+**** Post install
+You need to have a dictionary for grus to work, if you don't have one then you
+can download the Webster's Second International Dictionary, all 234,936 words
+worth. The 1934 copyright has lapsed.
+#+BEGIN_SRC sh
+curl -L -o /usr/local/share/web2 \
+     https://archive.org/download/grus-v0.2.0/web2
+#+END_SRC
+
+There is also another big dictionary with around half a million english words.
+I'm not allowed to distribute it, you can get it directly from GitHub.
+#+BEGIN_SRC sh
+curl -o /usr/local/share/words \
+     https://raw.githubusercontent.com/dwyl/english-words/master/words.txt
+#+END_SRC
 * History
 Initial version of Grus was just a simple shell script that used the slowest
 method of unjumbling words, it checked every permutation of the word with all
diff --git a/grus.go b/grus.go
index d4a63ad..7c17a98 100644
--- a/grus.go
+++ b/grus.go
@@ -23,7 +23,9 @@ func grus() {
 
 	dicts := []string{
 		"/usr/local/share/dict/words",
+		"/usr/local/share/dict/web2",
 		"/usr/share/dict/words",
+		"/usr/share/dict/web2",
 		"/usr/share/dict/special/4bsd",
 		"/usr/share/dict/special/math",
 	}