- Install pytesseract from here.
- Make sure pytesseract is installed at
C:\Program Files\Tesseract-OCR\. - Add
C:\Program Files\Tesseract-OCR\tesseract.exeto your PATH - Add
parent\directory\OCR\dist\ocr.exeto your PATH.
- Copy any image with text or snip the area on screen with text.
- Press
Win + R - Type
ocr.exeand hit enter. - Wait for a terminal to pop-up and close.
Ctrl + Vfor the text in image.
- This only works on windows, with python 2.5+ and 3.x.
- I used
pyinstallerto generate the executables forocr.py.
This Python script allows you to perform OCR (Optical Character Recognition) on images copied to your clipboard. The recognized text is automatically copied to the clipboard for easy pasting.
- Automatically detects if an image is available in the clipboard.
- Performs OCR on the image using Tesseract OCR.
- Copies the recognized text to the clipboard for easy access.
- Python 3.7+
pytesseractPillow(PIL)pyperclipnumpypywin32
-
Clone the repository:
git clone https://github.com/wiseobjective8/ocr-clipboard-tool.git cd ocr-clipboard-tool -
Install the required Python packages:
pip install pytesseract pillow pyperclip numpy pywin32
-
Ensure Tesseract OCR is installed on your system. You can download it from tesseract-ocr.github.io.
-
Update the
tessparameter in theOCRclass initialization if Tesseract is installed in a different location:tess: str = "C:\\Program Files\\Tesseract-OCR\\tesseract.exe"
Simply run the script:
python your_script.pyIf an image is available in the clipboard, the script will perform OCR on it and copy the recognized text back to the clipboard.
-
Copy an image containing text to your clipboard.
-
Run the script:
python your_script.py
-
The recognized text will be copied to your clipboard, and you can paste it anywhere.
This Python script allows you to download YouTube videos in various formats and resolutions using the pytubefix library. You can choose to download audio, video, or both, and select the resolution of the video.
- Download audio-only, video-only, or both audio and video from YouTube.
- Choose between different resolutions (1080p, 720p, 480p) for video downloads.
- Automatically handles temporary files and cleans up after downloads.
- Logs download activities to a file and displays messages in the console.
- Python 3.7+
pytubefixffmpegargparse
-
Clone the repository:
git clone https://github.com/wiseobjective8/yt-downloader.git cd yt-downloader -
Install the required Python packages:
pip install pytubefix ffmpeg-python
-
Ensure
ffmpegis installed on your system. You can download it from ffmpeg.org.
Run the script using the following command:
python your_script.py --link <YouTube-video-URL>You can also provide multiple URLs separated by spaces:
python your_script.py --link <YouTube-video-URL1> <YouTube-video-URL2>Alternatively, you can run the script without the --link argument and input the video URL(s) interactively.
--link: One or more YouTube video URLs to download.
The script will prompt you to choose:
-
The download type:
- 1: Audio only
- 2: Video only
- 3: Both audio and video (default)
-
The resolution (if downloading video):
- 1: 1080p (default)
- 2: 720p
- 3: 480p
-
A confirmation to proceed with the download.
The script logs its activities to a file named download_log.log in the current directory. It also prints log messages to the console.
You can create a standalone executable using PyInstaller:
pyinstaller --onefile --distpath /path/to/your/desired/folder your_script.pyReplace /path/to/your/desired/folder with the path to the folder where you want the executable to be placed. Add the .exe to PATH for global usage of the executable.
Feel free to open issues or submit pull requests if you find any bugs or have suggestions for new features.
This project is licensed under the MIT License.