Last active
October 4, 2023 16:54
-
-
Save dewomser/48bf126f52a0207a26d93117396c3867 to your computer and use it in GitHub Desktop.
OCR kopiert Text in die Zwischenablage . Ein Bashscript
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
#!/usr/bin/bash | |
/usr/bin/import "$HOME"/bin/text_erkennen.png | |
wait | |
tesseract -l deu "$HOME"/bin/text_erkennen.png "$HOME"/bin/text_erkennen | |
#eng,deu,… | |
wait | |
cat "$HOME"/bin/text_erkennen.txt |
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
#!/usr/bin/bash | |
/usr/bin/import "$HOME"/bin/text_erkennen.png | |
wait | |
tesseract -l deu "$HOME"/bin/text_erkennen.png "$HOME"/bin/text_erkennen | |
#eng | |
wait | |
text=$(cat "$HOME/bin/text_erkennen.txt") | |
dbus-send --type=method_call --dest=org.kde.klipper /klipper org.kde.klipper.klipper.setClipboardContents string:"$text" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Vorraussetzung: bash, imagemagick , tesseract und funktioniert nur mit Linux KDE/Plasma