Metadata-Version: 2.4
Name: manga_ocr_pipe
Version: 1.0.0
Summary: Optical character recognition for Japanese text, with the main focus being Japanese manga.
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: pillow==12.3.0
Requires-Dist: jaconv==0.5.0
Requires-Dist: torch==2.12
Requires-Dist: transformers==5.13
Requires-Dist: torchvision==0.27

# Manga OCR Pipe

A lightweight CLI tool that is based on the excellent [Manga OCR](https://github.com/kha-white/) project by Kha White.

It reads images from **stdin**, performs OCR, and writes the recognized text to **stdout**.

## Examples

The beauty of **Manga OCR Pipe**, is that you can use whatever screenshot utility and clipboard manager you want. You can even send it to another tool if you wish.

### Hyprshot

```bash
hyprshot -m region -s -r _ | mocr | wl-copy
```

### Spectacle

```bash
spectacle -r -o ~/Pictures/Screenshots/ocr.png && mocr < ~/Pictures/Screenshots/ocr.png | wl-copy
```

### From file

```bash
mocr < ~/Pictures/Screenshots/ocr.png | wl-copy
```

### With notification

```bash
... && notify-send "OCR Complete"
```

## Features

* Read images directly from **stdin**
* Write recognized text to **stdout**
* Fast repeated OCR using a persistent daemon
* Simple Unix-friendly interface
* Works well with any screenshot tools and clipboard utilities
* Automatically frees memory in case of inactivity

## Installation



## Commands

### `mocr`

Reads an image from standard input and prints the recognized Japanese text to standard output.

### `mocrd`

Starts the background OCR daemon manually. Normally, this does not need to be started explicitly because `mocr` launches it automatically when needed.
