dev: automated commit - 2025-10-10 18:38:54
This commit is contained in:
parent
a766ae0099
commit
b2e57bf792
1 changed files with 20 additions and 0 deletions
|
|
@ -815,3 +815,23 @@ function nas() {
|
|||
rclone mount --vfs-cache-mode writes --dir-cache-time 5s --no-check-certificate --allow-other nas: /home/mzunino/nas
|
||||
}
|
||||
|
||||
|
||||
|
||||
function ocr(){
|
||||
grim -g "$(slurp)" - \
|
||||
| magick - -colorspace gray -negate -brightness-contrast 15x40 -sharpen 0x2 -threshold 60% - \
|
||||
| tesseract stdin stdout -l eng+equ --psm 6 --oem 3 \
|
||||
-c preserve_interword_spaces=1 \
|
||||
-c tessedit_char_blacklist='‘’”“”´`–—•' \
|
||||
| sed -E '
|
||||
s/[“”]/"/g;
|
||||
s/[‘’]/"/g;
|
||||
s/’/'"'"'/g;
|
||||
s/[éèê]/8/g;
|
||||
s/í/i/g;
|
||||
s/—/-/g;
|
||||
s/“/"/g;
|
||||
' \
|
||||
| wl-copy
|
||||
notify-send "✅ OCR copied to clipboard"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue