File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Dependency: `brew install pngpaste tesseract`
4
+ # pngpaste required to grab image from clipboard
5
+ # tesseract required to OCR
6
+
7
+ # Required parameters:
8
+ # @raycast.schemaVersion 1
9
+ # @raycast.title OCR Image
10
+ # @raycast.mode fullOutput
11
+
12
+ # Optional parameters:
13
+ # @raycast.icon 📋
14
+ # @raycast.packageName Clipboard
15
+
16
+ # Documentation:
17
+ # @raycast.description OCR Image from Clipboard
18
+ # @raycast.author xxchan
19
+ # @raycast.authorURL https://github.com/xxchan
20
+
21
+ # credit to @laixintao https://www.kawabangga.com/posts/4876
22
+
23
+ pngpaste - | tesseract stdin stdout
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Dependency: `brew install pngpaste coreutils`
4
+ # pngpaste required to grab image from clipboard
5
+ # coreutils required to create temp file with suffix
6
+
7
+ # Required parameters:
8
+ # @raycast.schemaVersion 1
9
+ # @raycast.title Open Image
10
+ # @raycast.mode compact
11
+
12
+ # Optional parameters:
13
+ # @raycast.icon 📋
14
+ # @raycast.packageName Clipboard
15
+
16
+ # Documentation:
17
+ # @raycast.description Open Image from Clipboard in Preview for OCR or other purposes.
18
+ # @raycast.author xxchan
19
+ # @raycast.authorURL https://github.com/xxchan
20
+
21
+ tempfile=$( gmktemp --suffix=.png) && pngpaste $tempfile && open $tempfile
You can’t perform that action at this time.
0 commit comments