Skip to content
/ ocrshot Public

Copy & paste text from videos & photos by screenshotting

License

Notifications You must be signed in to change notification settings

rail5/ocrshot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ocrshot

Copy & paste text from videos & photos by screenshotting

Demonstration

Description

Simple bash script that allows you to copy-and-paste text via Optical Character Recognition

IMO, this is useful for copying-and-pasting text from videos or photos, as well as from Google Docs et al services which go through great lengths to prevent ctrl+c ctrl+v

Also IMO, it's most useful when tied to a quick&easy keyboard shortcut

Usage

After calling 'ocrshot', your cursor will be used to select an area of your screen to screenshot

After this screenshot is taken, it's run through Tesseract to read the text inside it

And that text, finally, is copied to your clipboard (ctrl+v to paste)

Calling 'ocrshot -i' will do the same thing but also invert the colors of the screenshot before pushing it to Tesseract. The -i option is best if you use a dark theme (a dark background with light text should be inverted to a light background with dark text for Tesseract)

Depends on

  • gnome-screenshot

  • xclip (To put text in the clipboard)

  • tesseract (For Optical Character Recognition)

  • imagemagick (If using the -i option for color inversion)

About

Copy & paste text from videos & photos by screenshotting

Resources

License

Stars

Watchers

Forks

Packages

No packages published