diff --git a/README.adoc b/README.adoc index 3bdfc00..6f134f1 100644 --- a/README.adoc +++ b/README.adoc @@ -1,5 +1,5 @@ // echo README.adoc | entr sh -c "podman run --rm -it --network none -v "${PWD}:/documents/" asciidoctor/docker-asciidoctor asciidoctor -r asciidoctor-mathematical -a mathematical-format=svg README.adoc; printf 'Done ($(date -Isecond))\n'" -:toc: +// :toc: :nofooter: :!webfonts: :source-highlighter: rouge @@ -7,3 +7,54 @@ :sectlinks: = xpin + +== File Structure + +In order of dependency, the role of each of these directories in this repository is: + +[cols="m,,"] +|=== +|Directory |Contents |Description + +|docs +|Asciidoctor documentation +|Design decisions and algorithm definition documentation + +|wordlist +|Python/CSV +|Wordlist sources and generator code + +|test-data +|C++/CSV +|Test data mapping random and hand-picked lat/lon transformed to CellIDs and xpin addresses. +Also contains source code linking to the C++ S2 library to ensure CellIDs are translated properly. + +|words +|Rust Crate +|Crate to store the mapping of words and their associated numeric values. + +|src +|Rust Crate +| + +|tests +| +| + +|xpin-wasm +|Rust Crate +|WASM bindings for xpin + +|web-frontend +| +| + +|build +| +| + +|web +|Rust Crate +| + +|=== diff --git a/wordlist/03-exclude.csv b/wordlist/03-exclude.csv index 344473d..d600ee0 100644 --- a/wordlist/03-exclude.csv +++ b/wordlist/03-exclude.csv @@ -555,6 +555,7 @@ CASTILE CASTRO CATALOGING CATALOGUING +CATARACT CATASTROPHE CATECHISM CATHARINE @@ -1472,6 +1473,7 @@ HOSTAGE HOSTILITY HOT HOUGH +HOUSEWIFE HOUSTON HOWARD HP @@ -2141,7 +2143,6 @@ MYSORE NAD NAIROBI NAKED -NAKED NAMIBIA NAN NANCY @@ -2676,6 +2677,7 @@ RUSSIA RUSSIAN RUTH RUTHERFORD +RUTHLESS RUTLAND RWANDA SABBATH diff --git a/wordlist/04-deduplicated-words.py b/wordlist/04-deduplicated-words.py index fc6b055..0bf1570 100755 --- a/wordlist/04-deduplicated-words.py +++ b/wordlist/04-deduplicated-words.py @@ -114,7 +114,9 @@ pprint(list(enumerate(final_wordlist))) print(f"Ending index: {ending_word_index}") final_wordlist = [ - (idx + 1, word) + # The idx here starts at 0, which is fine + # It indicates that a *word* component can map to 0 (not that the numeric component can) + (idx, word) for idx, words in enumerate(final_wordlist) for word in words ] diff --git a/wordlist/99-wordlist.csv b/wordlist/99-wordlist.csv new file mode 120000 index 0000000..1ffe0ff --- /dev/null +++ b/wordlist/99-wordlist.csv @@ -0,0 +1 @@ +04-deduplicated-words.py \ No newline at end of file diff --git a/words/build.rs b/words/build.rs index 3f817fc..6bf9020 100644 --- a/words/build.rs +++ b/words/build.rs @@ -11,7 +11,7 @@ use std::path::Path; fn main() { let path = Path::new(&env::var("OUT_DIR").unwrap()).join("codegen.rs"); let mut file = BufWriter::new(File::create(path).unwrap()); - let wordlist_path = "../data/wordlist-tmp.csv"; + let wordlist_path = "../wordlist/99-wordlist.csv"; println!("cargo:rerun-if-changed={}", wordlist_path);