-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add struct ids to rust, add more wordlists
- Loading branch information
Showing
19 changed files
with
247 additions
and
503 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[workspace] | ||
members = [ "codebook","codebook-lsp", "codebook-zed"] | ||
members = ["codebook", "codebook-lsp", "codebook-zed"] | ||
resolver = "2" | ||
|
||
[profile.test] | ||
env = { RUST_LOG = "debug" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// a script that gets all the wordLists in word_lists (that don't have .gen.) and combines them into a single file, de-duping the words. | ||
// Output is written to combined.gen.txt | ||
// input list format: | ||
// --- | ||
// word1 | ||
// word2 | ||
// word3 | ||
// --- | ||
|
||
import fs from "node:fs"; | ||
import path from "node:path"; | ||
|
||
const wordListsPath = path.join(__dirname, "..", "word_lists"); | ||
const wordLists = fs.readdirSync(wordListsPath); | ||
|
||
const combined = new Set<string>(); | ||
|
||
for (const file of wordLists) { | ||
if (!file.endsWith(".gen.txt")) { | ||
const words = fs | ||
.readFileSync(path.join(wordListsPath, file), "utf-8") | ||
.split("\n"); | ||
for (const word of words) { | ||
if (word.length > 1) { | ||
combined.add(word); | ||
} | ||
} | ||
} | ||
} | ||
|
||
const combinedPath = path.join(wordListsPath, "combined.gen.txt"); | ||
fs.writeFileSync( | ||
combinedPath, | ||
"# Generated by generate_combined_wordlist.ts. Do not edit.\n", | ||
); | ||
fs.writeFileSync(combinedPath, Array.from(combined).toSorted().join("\n"), { | ||
flag: "a", | ||
}); | ||
console.log("Combined word list written to", combinedPath); |
Oops, something went wrong.