GithubHelp home page GithubHelp logo

dch42 / ocr Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 24 KB

CLI script to convert images and pdf files into text for easier processing.

License: GNU General Public License v3.0

Python 59.33% Shell 40.67%

ocr's Introduction

ocr

CLI script to convert images and pdf files into text for easier processing.

Uses pytesseract and pdf2image for OCR and image conversion respectively.

Users running MacOS may also need to install poppler (for pdftoppm).

Setup ๐Ÿ”ง

clone the repo and change to directory:

git clone https://github.com/dch42/ocr.git && cd ocr

Run setup.sh to install the script:

chmod +x setup.sh && ./setup.sh

This will install dependencies and install the script as ocr in /Users/$USER/bin, adding it to bash or zsh $PATH.

Usage

Invoke specifying desired input and output files with -i and -o, respectively:

ocr -i MyFile.pdf -o myfile.txt

The parsed text will be written/appended to the specified output file.

Multiple input files can be passed in one go, separated by spaces or globbed.

ocr -i MyFile.png MyFile2.jpg -o myfiles.txt
ocr -i MyFile* -o myfiles.txt

Options

  • -h, --help
    • show this help message and exit
  • -i, --input [INPUT...]
    • input file(s) to operate on
  • -o, --output
    • output file for converted text
  • -p, --print
    • prints converted text result to terminal

ocr's People

Contributors

dch42 avatar

Watchers

 avatar  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.