A desktop dictionary app build with tauri. Read word from screen use OCR. Get word by mouse hovering.
hovering mouse on a word, press Ctrl+Shift+c, a windows will popup and show the definition. You can input word by hand also.
OCR functionality comes from tesseract. Definition comes from a embedded database. this database comes from: https://github.com/skywind3000/ECDICT. If word can not be found in the database, it will lookup in merria-webster's web api.
Refer to tauri install tauri. Refer to tesseract-sys install tesseract dependencies. Apply a api key from merria-webster's web api place it under src-tauri/src/utils/ Download stardict version of sqlite database file from https://github.com/skywind3000/ECDICT.
On windows for statically linked libraries add -static
to vcpkg command.
vcpkg install tesseract:x64-windows-static
There are two system lib needed on Windows. I add it in build.rs
.
Ubuntu and Fedora are covered in tesseract-sys, arch linux just run pacman -S tesseract
.
Need install tesseract first.
brew install tesseract
I haven't found a way to build tesseract statically or bundle the library into app. So you have to install tesseract. I tried:
- set pkg-config env variable
TESSERACT_STATIC
, did not work. - set rustc env variable
RUSTFLAGS='-C target-feature=+crt-static'
, did not work.