dotfiles

personal dotfiles
git clone anongit@rnpnr.xyz:dotfiles.git
Log | Files | Refs | Feed | Submodules

Commit: 9246ed6969cb87828e83b29593b2e2089aacc335
Parent: 1f1866a32688323ecf363217a5d822ce0326a525
Author: Randy Palamar
Date:   Fri, 23 Apr 2021 23:42:55 -0600

add imageocr script

Diffstat:
Abin/imageocr | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/bin/imageocr b/bin/imageocr @@ -0,0 +1,11 @@ +#!/bin/sh + +# copy japanese text from an image to the clipboard +# deps: imagemagick tesseract slop xclip +# you probably want the capture2text jpn file from here: +# https://sourceforge.net/projects/capture2text/files/Dictionaries/Japanese.zip/download + +import -window root -crop $(slop -f '%g') png:- |\ +tesseract stdin stdout -l jpn --tessdata-dir ~/.local/share/tesseract |\ +tr -d ' ' |\ +xclip -sel clip