Command Line Interface (CLI) mode #1701
-
Hello, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
Hi @makemeunsee! The dictionary lookup feature is published as a separate Node module: However, it relies on using IndexedDB to store the data and look it up. You might be able to use something like fake-indexeddb in Node but I believe that only operates in-memory meaning a CLI tool would end up downloading the data each time. There might be some other kind of IndexedDB shim for node that can persist to disk that would work. Maybe In the coming months I plan to obsolete |
Beta Was this translation helpful? Give feedback.
-
Hi @birtles I've had time to dive into this, and have a proof of concept working, see below for a sample. I cant think of a way to get around this but to use another underlying DB, and having looked at the Sample run; the fetches take the overwhelming bulk of the time (and I dont load the names on purpose yet):
|
Beta Was this translation helpful? Give feedback.
Hi @makemeunsee
I was thinking about this and I remembered another option.
When you first install 10ten it comes with a snapshot of the word database and an index into that (see here). The whole database snapshot is then loaded into memory and looked up from there. Internally it'…