Script to provide a functionality similar to Bing Visual Search to Linux
running the start.sh will take screenshot of your current screen and will open an image window.
click and drag the area you want to perform OCR and press C.
The text will be copied to your clipboard.
In order to perform OCR with the image, you need to have tesseract OCR installed in your system.
Open your terminal and type the following command to install Tesseract-ocr
sudo apt-get install tesseract-ocr
Also make sure that you have python3 in your system and have the required modules installed.
After cloning the repo, In your terminal, type the following command to install the required modules
pip install -r requirements.txt
And don't forget to change the file paths to their full path [Absolute Path]
You can create a file and place it in /usr/bin
directory and execute it as a terminal command.
Here's how you can do so.
cp start.sh vSearch
cp cropper.py cropper
cp copytext.py copytext
Open the file cropper in nano editor
nano cropper
Now add the following line on top of the cropper file
#!/usr/bin/python3
Then move the cropper file to /usr/bin
.
sudo cp cropper /usr/bin
Open the file copytext in nano editor
nano copytext
Now add the following line on top of the cropper file
#!/usr/bin/python3
Then move the cropper file to /usr/bin
.
sudo cp copytext /usr/bin
Before we convert vSearch into a linux command, we must do some changes to the vSearch file inorder to make use of cropper
and copytext
linux commands which we created now instead of cropper.py
and copytext.py
scripts.
To do so, open the file vSearch in nano editor
nano vSearch
Change python3 cropper.py &
to cropper
.
Change python3 copytext.py &
to copytext
Open the file vSearch in nano editor
nano vSearch
Now add the following line on top of the cropper file
#!/usr/bin/bash
Then move the cropper file to /usr/bin
.
sudo cp vSearch /usr/bin
Now you can use it as a terminal command.
Feel free to ping me in case of any doubts!!
Kindly tweet it out or share this in any other social Media platform so that more people can make use of this :)
Feel free to ping me if you have any doubts or you wish to contribute :)