This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Dependencies: tesseract-ocr imagemagick scrot xsel wikit rofi | |
set -e | |
SCR_IMG=$(mktemp) | |
trap 'rm $SCR_IMG*' EXIT | |
scrot -s "$SCR_IMG.png" | |
mogrify -modulate 100,0 -resize 400% "$SCR_IMG.png" #should increase detection rate | |
tesseract "$SCR_IMG.png" "$SCR_IMG" &> /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Dependencies: tesseract-ocr imagemagick scrot xsel rofi | |
set -e | |
SCR_IMG=$(mktemp) | |
trap 'rm $SCR_IMG*' EXIT | |
scrot -s "$SCR_IMG.png" | |
mogrify -modulate 100,0 -resize 400% "$SCR_IMG.png" #should increase detection rate | |
tesseract "$SCR_IMG.png" "$SCR_IMG" &> /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Dependencies: tesseract-ocr imagemagick scrot xsel | |
SCR_IMG=`mktemp` | |
trap "rm $SCR_IMG*" EXIT | |
/usr/bin/scrot -s $SCR_IMG.png | |
/usr/bin/mogrify -modulate 100,0 -resize 400% $SCR_IMG.png #should increase detection rate | |
/usr/bin/tesseract $SCR_IMG.png $SCR_IMG &> /dev/null | |
cat $SCR_IMG.txt | /usr/bin/xsel -bi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use ranger to save attachment | |
macro attach S "<pipe-message>/path/to/muttsaveattach.sh"<enter> |