flameshot-ocr
is an open source tool to quickly OCR and look up
text. It will look up text in your yomichan search app, so it
respects all dictionaries/frequency lists etc. that you already have
installed. Fast, lightweight, and uses manga-ocr
for OCR.
git clone https://github.com/christofferaakre/flameshot-ocr.git
install.sh
script
(if you are on a Debian based distro)
or manuallyflameshot-ocr
script to your path, for example by
executing the following commands:
cd flameshot-ocr
sudo ln -s ~/bin/flameshot-ocr flameshot-ocr
sudo ln -s ~/bin/yomichan-search yomichan-search
Clipboard monitor
turned on in Yomichan Search.yomichan-search
script that reads/opt/google/chrome/google-chrome --profile-directory=Default --app-id=dmlhnpobnomcmidkoijomppdlpfkedmi
:
google-chrome
with the path to your chromium browser if you don't use Google Chrome/home/negosaki/bin/yomichan-search
with the absolute
path to the yomichan-search
, which should be /home/yourUsername/yomichan-search
if you followed the instructions above. This path needs to be absolute, not relative
as otherwise it breaks for ubuntu keyboard shortcuts.save_path
directory with the absolute path
to the directory that you will monitor with manga_ocr
cd flameshot-ocr
chmod +x install.sh
sudo ./install.sh
Install the following dependencies in any way you see fit:
manga_ocr
and the required language-specific tesseract packages (tesseract
need to be in your system path)flameshot
(needs to be in system path)xdotool
(needs to be in system path)
No support currently
No support for running natively on windows currently, but you can install WSL (Windows Subsystem for Linux) and install/run the script from there. So, install WSL and then refer to the Linux installation instructions.
Currently this project is only supported on Linux. The dependencies used are:
flameshot
(Windows/MacOS/Linux support)manga_ocr
(Windows/MacOS/Linux support)xdotool
(Only Linux support as far as I am aware)xdotool
is only used to focus the yomichan search window so could be
easily be swapped out for Windows/MacOS compatible alternatives.
Also, unix specific paths like /usr/bin
and /tmp
are used,
and these do not exist on Windows (although they do on MacOS). However,
this is not too hard to fix, the main problem is not all the dependencies are
supported on Windows/MacOS.
I am not familiar with Windows/MacOS, but if someone else wants to open a pull request and merge in Windows/MacOS compatible versions, I'll happily accept the pull request.
Before attempting to run the script, make sure you have manga_ocr
running in the background, monitoring the directory that you indicated
with the save_path
variable in the flameshot-ocr
script.
Run the script like this: yomichan-search
from the terminal. Bind
this command to a keyboard shortcut for easy access. For example,
I have the script bound to Alt + x
. So, when I am for example,
reading a manga and want to ocr and look up something, I
simply do the following:
Alt + x