From e5d7dc4bbbda1d8b27fc3b8b8e9a6a10077f1edf Mon Sep 17 00:00:00 2001 From: Robert Date: Thu, 3 Jul 2025 17:30:28 -0400 Subject: [PATCH] share --- .gitignore | 2 +- README.MD | 6 +++++- create_db.go | 2 +- go.mod | 2 +- go.sum | 2 ++ readData.go | 2 +- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 8a6f669..88a5e83 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -english_words.db rnd-english *.txt +*.db diff --git a/README.MD b/README.MD index aff8269..5887210 100644 --- a/README.MD +++ b/README.MD @@ -7,6 +7,10 @@ $ go get github.com/mattn/go-sqlite3 $ shuf /usr/share/dict/american-english > rnd-english $ go run create_db.go ``` +## How to add another dictionary +``` +$ go run create_db.go -db-update -dict mywordslist.txt +``` ### Passwords are ONLY for custom words not in the dictionary ### Enter one keyword at a time for security!! ## Create encoded data @@ -14,4 +18,4 @@ $ go run writeData.go -pwd MyPa$$word ## Fetch data from encodings $ go run readData.go -pwd MyPa$$word -## Share your rnd-english dictionary with others to be able to see the data. +## Share your english_words.db dictionary database with others to be able to view your comments... diff --git a/create_db.go b/create_db.go index 915a133..b61b3a7 100644 --- a/create_db.go +++ b/create_db.go @@ -24,7 +24,7 @@ var topEnglishWords = []string{ "all", "there", "when", "up", "use", "your", "how", "said", "an", "each", "she", "which", "do", "their", "time", "if", "will", "way", "about", "many", "then", "them", "write", "would", "like", "so", "these", - "here", "me", "make", "day", "where", "give", "now", "just", + "here", "me", "make", "where", "give", "now", "just", } var commonSymbols = []string{ diff --git a/go.mod b/go.mod index 7993320..72e049b 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module xorWords go 1.20 -require github.com/mattn/go-sqlite3 v1.14.19 // indirect +require github.com/mattn/go-sqlite3 v1.14.28 // indirect diff --git a/go.sum b/go.sum index 3042612..80c2acf 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,4 @@ github.com/mattn/go-sqlite3 v1.14.19 h1:fhGleo2h1p8tVChob4I9HpmVFIAkKGpiukdrgQbWfGI= github.com/mattn/go-sqlite3 v1.14.19/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= +github.com/mattn/go-sqlite3 v1.14.28 h1:ThEiQrnbtumT+QMknw63Befp/ce/nUPgBPMlRFEum7A= +github.com/mattn/go-sqlite3 v1.14.28/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= diff --git a/readData.go b/readData.go index eac3795..97b958c 100644 --- a/readData.go +++ b/readData.go @@ -54,7 +54,7 @@ func main() { defer file.Close() symbols := []string{ - ".", ",", "!", ";", "?", "(", ")", "'", "\"", + ".", ",", "!", ";", "?", "(", ")", "'", "\"", "...", ":", "*", "$", "@", "#", "%", } // Create a scanner to read the file line by line