Git Product home page Git Product logo

normcap's Introduction

NormCap

OCR powered screen-capture tool to capture information instead of images.

Build passing License: GPLv3 Code style: black Coverage Status

Links: Repo | PyPi | Releases | Changelog | FAQs

Content: Quickstart | Python package | Usage | Contribute | Credits

Screencast

Features

  • On-screen recognition of selected text
  • Multi platform support for Linux, Windows, MacOS
  • Multi monitor support, incl. HDPI displays
  • "Magically" parsing the text (optional, on by default)
  • Show notifications (optional)
  • Stay in system tray (optional)
  • Check for updates (optional, off by default)

Quickstart

❱❱ Download & run a pre-build package for Linux, MacOS or Windows ❰❰

If you experience issues please look at the FAQs or open an issue.

(On MacOS, allow the unsigned application on first start: "System Preferences" → "Security & Privacy" → "General" → "Open anyway". You might also need to allow NormCap to take screenshots.)

Python package

As an alternative to a pre-build package you can install the NormCap Python package:

On Linux

# Install dependencies (Ubuntu/Debian)
sudo apt install tesseract-ocr tesseract-ocr-eng \
                 libtesseract-dev libleptonica-dev \
                 python3-dev

## Install dependencies (Arch)
sudo pacman -S tesseract tesseract-data-eng leptonica

## Install dependencies (Fedora)
sudo dnf install tesseract tesseract-devel \
                 libleptonica-devel python3-devel

# Install normcap
pip install normcap

# Run
./normcap

On MacOS

# Install dependencies
brew install tesseract tesseract-lang

# Install normcap
pip install normcap

# Run
./normcap

On Windows

1. Install "Tesseract 4.1", e.g. by using the installer provided by UB Mannheim.

2. Set the environment variable TESSDATA_PREFIX to Tesseract's data folder, e.g.:

setx TESSDATA_PREFIX "C:\Program Files\Tesseract-OCR\tessdata"

3. Install tesserocr using the Windows specific wheel and NormCap afterwards:

# Install tesserocr package
pip install https://github.com/simonflueckiger/tesserocr-windows_build/releases/download/tesserocr-v2.4.0-tesseract-4.0.0/tesserocr-2.4.0-cp37-cp37m-win_amd64.whl

# Install normcap
pip install normcap

# Run
normcap

Usage

General

  • Select a region on screen with your mouse to perform text recognition

  • Press <esc> key to abort a capture and quit the application.

Magics

"Magics" are like add-ons providing automated functionality to intelligently detect and format the captured input.

First, every "magic" calculates a "score" to determine the likelihood of being responsible for this type of text. Second, the "magic" which achieved the highest "score" takes the necessary actions to "transform" the input text according to its type.

Currently implemented Magics:

Magic Score Transform
Single line Only single line is detected Trim unnecessary whitespace
Multi line Multi lines, but single Paragraph Separated by line breaks and trim each lined
Paragraph Multiple blocks of lines or multiple paragraphs Join every paragraph into a single line, separate different paragraphs by empty line
E-Mail Number of chars in email addresses vs. overall chars Transform to a comma-separated list of email addresses
URL Number of chars in URLs vs. overall chars Transform to line-break separated URLs

Why "NormCap"?

See XKCD:

Comic

Contribute

Setup Environment

Prerequisites are Python >=3.7.1, Poetry, Tesseract (incl. language data).

# Clone repository
git clone https://github.com/dynobo/normcap.git

# Change into project directory
cd normcap

# Create virtual env and install dependencies
poetry install

# Register pre-commit hook
poetry run pre-commit install

# Run NormCap in virtual env
poetry run python -m normcap

Credits

This project uses the following non-standard libraries:

Packaging is done with:

  • briefcase - converting Python projects into standalone apps

And it depends on external software

Thanks to the maintainers of those nice libraries!

Certification

WOMM

normcap's People

Contributors

dynobo avatar ashishpatel1992 avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.