Skip to main content

macocr is a python script for OCR on macOS

Project description

macocr

License Python

Overview

macocr is a python script for OCR on macOS

Table of Contents

Installation

Just add tap and install homebrew package.

brew tap rioriost/macocr
brew install macocr

Prerequisites

  • Python 3.11 or higher

Usage

Execute macocr command.

macocr --help
usage: macocr [-h] image_dir output_dir

positional arguments:
  image_dir   Directory containing images to OCR
  output_dir  Directory to output OCR results

options:
  -h, --help  show this help message and exit

The indentical usage is shown below.

macocr images results
Processing /Users/rifujita/ownCloud/bin/macocr/images/img_horz01.png
Processing /Users/rifujita/ownCloud/bin/macocr/images/img_vert02.HEIC
Processing /Users/rifujita/ownCloud/bin/macocr/images/img_vert01.png

results

cat results/*
日本国内の交差点は約100万あるとされている
ので、そこに接続しているエッジは  T字路で 3
本、2本の道路が交差していれば4本、さらに五
叉路や側道があるパターンでは、1 つのノードに
20 ぐらいのエッジが接続しているパターンも実
在します。
航空路線に例えると、ハブ空港が日本国内だけ
で約100万あり、エッジがその10倍・約1,000万
存在する、みたいなものです*3。そしてその巨大
なネットワーク内で乗り継ぎを数十回、数百回す
るというのが、私たちが日常行っている、自動車
の運転を含めた地上での移動です。
道路ネットワークよりもさらに大規模なネット
ワークとしては、SNS やウェブのリンクなども
考えられます。PostgreSQL に航空路線のデータを格納する例を考えてみましょう。現在世界には約三千五百の空港があり、それらの空港を結ぶ航空路線
は数万に及びますが、羽田空港からシアトルタコマ空港への直行便は、航空会社の別を考慮しなければ一路線しかありません。条件は「羽田発
シアトルタコマ着」のみです。
しかし乗り継ぎを考慮すると、羽田からシアトルタコマへの経路は複数通り存在します。クエリの条件は「羽田発・空港(A)着」「空港(A)発シ
アトルタコマ着」です。さらに乗り継ぎが二回になると、「羽田発・空港(A)着」「空港(A)発-空港(B)着」「空港(B)着・シアトルタコマ着」とな
り、経路のパターンが増えることが分かります。空港(ノード)の数より、路線(エッジ)の数がかなり多くなるのはこういう理由です。
航空路線の場合、乗り継ぎ回数がそれほど増えることはないので、クエリもあまり難しくなるとは考えにくく、SQL で十分対応できるでしょ
う。•この薬はあなたの症状に合わせ処方したものです。他の人には譲らないでください。
•お薬は指示どおりにお飲みください。自己判断で服用量や回数を加減しないでください。
•お薬はお子様の手の届かない場所に置いてください。
•この薬以外に他の医療機関の薬又は市販薬を服用している方は、医師又は薬剤師に申し
出てください。
口食前とは食事前30分位、食後とは食後30分位に服用することです。
口食間とは食後2時間位に服用することです。
口(糖尿病の方を除き)食事のとれない方でも食事をする時と同じ時間に服用してください。
口時間ごとに定められた薬は食事に関係なく服用してください。

Release Notes

0.1.13 Release

  • Dependency update

0.1.12 Release

  • Dependency updates

0.1.11 Release

  • Dependency updates

0.1.10 Release

  • Security updates

0.1.9 Release

  • Dependency updates

0.1.8 Release

  • Dependency updates

0.1.7 Release

  • Dependency updates

0.1.6 Release

  • Dependency updates

0.1.5 Release

  • Dependency updates

0.1.4 Release

  • Dependency updates

0.1.3 Release

  • Dependency updates

0.1.2 Release

  • Dependency updates

0.1.1 Release

  • Dependency updates

0.1.0 Release

  • Initial release.

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

macocr-0.1.13.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

macocr-0.1.13-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file macocr-0.1.13.tar.gz.

File metadata

  • Download URL: macocr-0.1.13.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for macocr-0.1.13.tar.gz
Algorithm Hash digest
SHA256 86ecd7de74f9139763b404087e69b881a62ecded04e191211ef4b130d2d5c505
MD5 be19f3057130d092c552d361a3db848c
BLAKE2b-256 6ccbd352a550ad2746a01cdb53d51b3da0c3d18d2802e6cd8825958bd694c6d3

See more details on using hashes here.

File details

Details for the file macocr-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: macocr-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for macocr-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 ad110b32d34e6740b8575b1743042e76eb0064ea0a04e47753646b16ba44c974
MD5 0b8dffb975a928dfb04d8a144b3fefd5
BLAKE2b-256 07a76b917347224dedc2791b5a5a53c4665cc9eeb32f831d21d4d1edcd3fdf6e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page