Get any text on your screen into your clipboard.

Related tags

Text macOCR
Overview

macOCR

macOCR is a command line app that enables you to turn any text on your screen into text on your clipboard. When you envoke the ocr command, a "screen capture" like cursor is shown. Any text within the bounds will be converted to text.

You could invoke the app using the likes of Alfred.app, LaunchBar, Hammerspoon, Quicksilver, Raycast etc.

Examples:

An example Alfred.app workflow is available here.

If you're still wondering "how does this work ?", I always find the .gif is the best way to clarify things:

How it works

Installation

Compile the code in this repo, or download a prebuilt binary (Apple Silicon, Intel) and put it on your path.

Apple Silicon Install:

curl -O https://files.littlebird.com.au/ocr.zip; 
unzip ocr.zip;
sudo cp ocr /usr/local/bin;

Intel Install:

curl -O https://files.littlebird.com.au/ocr-EPiReQzFJ5Xw9wElWMqbiBayYLVp.zip; 
unzip ocr-EPiReQzFJ5Xw9wElWMqbiBayYLVp.zip;
sudo cp ocr /usr/local/bin;

When running the app the first time, you will likely be asked to allow the app access to your screen.

Enabling access to screen

OS Support

This should run on Catalina and above.

Who made this?

macOCR was made by Marcus Schappi. I create software (and even hardware) to automate ecommerce, including:

Thoughts on Sherlocking?

Apple, please sherlock this software!

MIT License

Copyright 2021 Marcus Schappi

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Comments
  • Not work on Chinese language

    Not work on Chinese language

    Hi, it seems this tool can't work properly on image with Chinese language, does it only work with English ? Will Chinese be supported later versions ?

    opened by kevinnerd 18
  • Can't unzip (Intel / Catalina)

    Can't unzip (Intel / Catalina)

    Running on a Intel / Catalina (2.6 GHz 6-Core Intel Core i7)

    curl -O https://files.littlebird.com.au/ocr.zip; 
    unzip ocr.zip;
    sudo cp ocr /usr/local/bin;
    

    And I am getting that it can't unzip the file to get the binaries image

    Any suggestions as to what I might be doing wrong?

    opened by assadtony 2
  • Add details about adding this as a MacOS Shortcut

    Add details about adding this as a MacOS Shortcut

    I had some trouble understanding the MacOS shortcuts link. So this PR just adds some details about adding as a Shortcut.

    Also, thanks for making this, it's incredible ❤️

    opened by benwinding 1
  • Alfred workflow: `brew` is installed to /opt/homebrew

    Alfred workflow: `brew` is installed to /opt/homebrew

    Minor issue, but fyi, on M1 Macs brew is installed to /opt/homebrew (not /usr/local) which prevents the Alfred workflow from executing...

    So the bash script should execute: /opt/homebrew/bin/ocr;

    You might want to change that in the Workflow :-)

    opened by notDavid 1
  • Not working for Alfred 4?

    Not working for Alfred 4?

    Hi,

    thanks for the great tool. After downloading the workflow in the README. It seems it is not able to work with Alfred 4. Is it possible that there is some specific setting required? Following is the outputs from the debugging when I invoke the workflow. It seems the ocr command didn't return anything from the screenshot part.

    [17:36:03.990] OCR[Keyword] Processing complete
    [17:36:03.993] OCR[Keyword] Passing output '' to Run Script
    

    Meanwhile, I can use the tool directly from the command line by invoking ocr directly. Thanks for any help in advance.

    opened by ZhiliangWu 1
  • End-of-central-directory signature not found.  Either this file is not   a zipfile, or it constitutes one disk of a multi-part archive.

    End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive.

    jack @ JackdeMacBook-Air in ~ [18:21:56] C:9

    $ curl -O https://files.littlebird.com.au/ocr-EPiReQzFJ5Xw9wElWMqbiBayYLVp.zip; % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 243 0 243 0 0 142 0 --:--:-- 0:00:01 --:--:-- 142

    jack @ JackdeMacBook-Air in ~ [18:22:51]

    $ unzip ocr-EPiReQzFJ5Xw9wElWMqbiBayYLVp.zip; unzip: cannot find or open ocr-EPiReQzFJ5Xw9wElWMqbiBayYLVp.zip, ocr-EPiReQzFJ5Xw9wElWMqbiBayYLVp.zip.zip or ocr-EPiReQzFJ5Xw9wElWMqbiBayYLVp.zip.ZIP.

    jack @ JackdeMacBook-Air in ~ [18:23:03] C:9

    $ unzip ocr-EPiReQzFJ5Xw9wElWMqbiBayYLVp.zip; Archive: ocr-EPiReQzFJ5Xw9wElWMqbiBayYLVp.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of ocr-EPiReQzFJ5Xw9wElWMqbiBayYLVp.zip or ocr-EPiReQzFJ5Xw9wElWMqbiBayYLVp.zip.zip, and cannot find ocr-EPiReQzFJ5Xw9wElWMqbiBayYLVp.zip.ZIP, period.

    macOS Big Sur intel

    please kindly solve it, thanks.

    opened by jackwu882002 1
  • Refactor active parts into a Swift Package Manager distribution. Add a CLI wrapper.

    Refactor active parts into a Swift Package Manager distribution. Add a CLI wrapper.

    This is cool! I didn't know the APIs were available. I'd have guessed you'd have to package tesseract. I wanted a version I could build easily from the command line so I could add it to my cross-machine synced setup.

    Feel free to ignore, take pieces, etc.

    Changes:

    • use swift package manager
    • refactored to keep only the active parts
    • added a CLI arguments wrapper
    • removed the default pbcopy behaviour
    • added --copy or -c flag to copy to clipboard
    • made errors write to stderror and return a failed exit status
    • make the script delete the temporary image
    opened by adam-zethraeus 0
  • How to build Source code(with a little modify) to exec in order to get ocr(exec)?

    How to build Source code(with a little modify) to exec in order to get ocr(exec)?

    image As this image show, I compiled the code but ocr(exec) is red, and I can not find the location of it. How can I get ocr(exec) compiling by myself just like I download by curl or homebrew?
    opened by Republic1024 1
  • [brew] Warning: Calling bottle :unneeded is deprecated

    [brew] Warning: Calling bottle :unneeded is deprecated

    When running brew upgrade there's a following warning:

    Warning: Calling bottle :unneeded is deprecated! There is no replacement.
    Please report this issue to the schappim/ocr tap (not Homebrew/brew or Homebrew/core):
      /usr/local/Homebrew/Library/Taps/schappim/homebrew-ocr/ocr.rb:7
    
    opened by jaklan 0
Owner
Marcus S
Marcus S
An iOS app to turn typed text into images of handwritten text in your own handwriting style.

Text-to-Handwritting © 2021 by Daniel Christopher Long An iOS app to turn typed text into images of handwritten text in your own handwriting style. ht

Daniel Long 11 Dec 29, 2022
Convert text with HTML tags, links, hashtags, mentions into NSAttributedString. Make them clickable with UILabel drop-in replacement.

Atributika is an easy and painless way to build NSAttributedString. It is able to detect HTML-like tags, links, phone numbers, hashtags, any regex or

Pavel Sharanda 1.1k Jan 8, 2023
Twitter Text Libraries. This code is used at Twitter to tokenize and parse text to meet the expectations for what can be used on the platform.

twitter-text This repository is a collection of libraries and conformance tests to standardize parsing of Tweet text. It synchronizes development, tes

Twitter 2.9k Dec 27, 2022
Powerful text framework for iOS to display and edit rich text.

YYText Powerful text framework for iOS to display and edit rich text. (It's a component of YYKit) Features UILabel and UITextView API compatible High

null 8.8k Jan 4, 2023
Marky Mark is a parser written in Swift that converts markdown into native views.

Marky Mark is a parser written in Swift that converts markdown into native views. The way it looks it highly customizable and the supported markdown syntax is easy to extend.

M2mobi 287 Nov 29, 2022
Converts Markdown files and strings into NSAttributedStrings with lots of customisation options.

SwiftyMarkdown 1.0 SwiftyMarkdown converts Markdown files and strings into NSAttributedStrings using sensible defaults and a Swift-style syntax. It us

Simon Fairbairn 1.5k Dec 22, 2022
LDOMarkdownParser - Parse (some) markdown attributes into an NSAttributedString

LDOMarkdownParser Description Convert markdown text styling into an NSAttributed

Lurado 1 Feb 4, 2022
Fully open source text editor for iOS written in Swift.

Edhita Fully open source text editor for iOS written in Swift. http://edhita.bornneet.com/ What Edhita means? Edhita (Romaji) == エディタ (Katakana) == Ed

Tatsuya Tobioka 1.2k Jan 1, 2023
RichEditorView is a simple, modular, drop-in UIView subclass for Rich Text Editing.

RichEditorView RichEditorView is a simple, modular, drop-in UIView subclass for Rich Text Editing. Written in Swift 4 Supports iOS 8+ through Cocoapod

Caesar Wirth 1.8k Dec 24, 2022
Like a SwiftUI ViewBuilder, but for Text

TextBuilder Introduction Text composition in SwiftUI can often be cumbersome, especially when there's logic affecting its format and content. TextBuil

David Roman 180 Dec 26, 2022
A standalone, flexible API that provides a full-featured rich text editor for iOS applications.

Twitter Text Editor A standalone, flexible API that provides a full featured rich text editor for iOS applications. This provides a robust text attrib

Twitter 2.8k Dec 29, 2022
A lightning fast, native SwiftUI scratchpad/text editor.

Sedit A lightning fast, native SwiftUI scratchpad/text editor. Sedit (Swift Edit, as in the language and as in fast) is a lightning fast basic text ed

null 5 Jan 28, 2022
Automatic summarizer text in Swift

Overview Reductio is a tool used to extract keywords and phrases using an implementation of the algorithm TextRank. Installation Swift Package Manager

Sergio Fernández 438 Dec 9, 2022
Magnifying glass for text fields

Loupe Magnifying glass for text fields. Apple removed the maginifying glass when selecting texts since iOS 13, this tweak will brings it back. Compati

null 9 Dec 24, 2022
More powerful label, attributed string builder and text parser.

DDText More powerful label, attributed string builder and text parser. DDLabel More powerful label than UILabel, using TextKit. It supports features b

Daniel 16 Nov 8, 2022
Acčento is an easy-to-use tool for adding Czech diacritics to copied text.

Acčento is an easy-to-use tool for adding Czech diacritics to copied text. The app lives in the menu bar and is activated using a global hot key.

Matty Cross 3 Sep 16, 2021
A rich-text editor for iOS

DTRichTextEditor This project aims to provide a replacement for Apple's severely limited UITextView and to allow for editing attributed strings. It co

Cocoanetics 346 Oct 8, 2022
A beautiful rich text WYSIWYG editor for iOS with a syntax highlighted source view

ZSSRichTextEditor The Editor ZSSRichTextEditor is a beautiful Rich Text WYSIWYG Editor for iOS. It includes all of the standard editor tools one would

Nic Hubbard 3.7k Dec 31, 2022
Paranoid text spacing in Objective-C

Pangu.objective-c Paranoid text spacing for good readability, to automatically insert whitespace between CJK (Chinese, Japanese, Korean), half-width E

Tianyu Wang 110 Mar 10, 2021