fastocr


Namefastocr JSON
Version 0.3.8 PyPI version JSON
download
home_pagehttps://github.com/BruceZhang1993/FastOCR
SummaryFastOCR is a desktop application for OCR API.
upload_time2025-02-22 08:00:59
maintainerNone
docs_urlNone
authorBruce Zhang
requires_python<4.0,>=3.11
licenseLGPL-3.0-only
keywords ocr
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # FastOCR

[![GitHub top language](https://img.shields.io/github/languages/top/BruceZhang1993/FastOCR?style=flat-square)](https://github.com/BruceZhang1993/FastOCR/search?l=python)
[![GitHub](https://img.shields.io/github/license/BruceZhang1993/FastOCR?style=flat-square)](https://github.com/BruceZhang1993/FastOCR/blob/master/LICENSE)
[![GitHub version](https://img.shields.io/github/v/tag/BruceZhang1993/FastOCR?label=Version&style=flat-square)](https://github.com/BruceZhang1993/FastOCR/releases)
![PyPI](https://img.shields.io/pypi/v/fastocr?style=flat-square)

FastOCR 是一款开源免费的提供在线 OCR 文字识别的桌面工具

## 支持的 OCR API 后端

- [x] 百度 AI 文字识别服务  https://ai.baidu.com/tech/ocr
- [x] 有道文字识别服务  https://ai.youdao.com/product-ocr-print.s
- [x] 旷视 Face++ 文字识别服务 (Experimental)  https://www.faceplusplus.com.cn/general-text-recognition/
- [ ] 本地 OCR

### 特性

- [x] 通用文字识别 / 多个在线 OCR API 支持
- [x] 多语言支持 / 百度
- [x] 高精度接口支持 / 百度
- [x] 识别文字搜索
- [ ] 本地 OCR 后端
- [ ] 自定义快捷动作

## 支持操作系统

- Linux X11
- Windows
- macOS (Experimental)
- Linux Wayland (Experimental)

### 支持的 Wayland 环境 (Linux)

- Gnome Wayland
- KDE Wayland
- Sway

## 安装

### Windows  
 64 位预编译版,解压即可使用

点击下载 -> [Download](https://github.com/BruceZhang1993/FastOCR/releases/latest) 解压到安装目录,执行 FastOCR.exe

### macOS

理论上支持但无构建环境,打包过程类似 Windows 如下,生成的文件位于项目的 dist 目录下

```shell
pip install poetry
poetry update
poetry run pyinstaller build.spec
```

### Arch Linux

稳定版本 https://aur.archlinux.org/packages/fastocr

开发版本 https://aur.archlinux.org/packages/fastocr-git

 从 AUR 下载脚本编译或使用你喜欢的 AUR 辅助工具

```shell
yay -S fastocr  # 使用 yay
pikaur -S fastocr  # 使用 pikaur
```

### Nix/NixOS
 
使用 [NixOS CN flakes](https://github.com/nixos-cn/flakes) 或 [berberman flakes](https://github.com/berberman/flakes) 安装

```shell
nix run github:berberman/flakes#fastocr
```

### 通用 (PyPI)

[fastocr @ PyPI](https://pypi.org/project/fastocr/)

```shell
pip install --user fastocr
# Linux 复制 desktop 文件到 ~/.local/share/applications
```

### 通用 (手动安装)

```shell
python setup.py install
# Linux 复制 desktop 文件到 ~/.local/share/applications
```

### 通用 (仅本地开发)

 自豪地使用 [Poetry](https://python-poetry.org/docs/) 进行开发

```shell
poetry install
```

## 使用方法

```shell
fastocr  # 运行
fastocr --help  # 查看帮助
```

## DBus (Linux only)

Service name: `io.github.brucezhang1993.FastOCR`

Object: `/io/github/brucezhang1993/FastOCR`

### 方法

| Actions            | Arguments           | Description                                                 |
|:-------------------|:--------------------|:------------------------------------------------------------|
| captureToClipboard | {seconds} {no_copy} | 执行 OCR 捕获到系统剪贴板或触发 dbus 信号                      |
|                    |                     | seconds: 延迟执行单位为秒                                    |
|                    |                     | no_copy: 如果为 true 则仅触发 dbus 信号而不复制到系统剪贴板    |
| quitApp            | --                  | 退出应用                                                    |

### 信号

| Signals  | Arguments | Description                            |
|:---------|:----------|:---------------------------------------|
| captured | {text}    | OCR 识别结果文本会触发此信号             |
|          |           | text: 文本识别结果                      |

## 贡献

Pull requests are welcome.

For major changes, please open an issue first to discuss what you would
like to change.

## License

LGPL3

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/BruceZhang1993/FastOCR",
    "name": "fastocr",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": null,
    "keywords": "ocr",
    "author": "Bruce Zhang",
    "author_email": "zttt183525594@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/53/b5/d1f3576392a9db3b306e2243a7f1d42a241326019a6c3947fc903bb1040f/fastocr-0.3.8.tar.gz",
    "platform": null,
    "description": "# FastOCR\n\n[![GitHub top language](https://img.shields.io/github/languages/top/BruceZhang1993/FastOCR?style=flat-square)](https://github.com/BruceZhang1993/FastOCR/search?l=python)\n[![GitHub](https://img.shields.io/github/license/BruceZhang1993/FastOCR?style=flat-square)](https://github.com/BruceZhang1993/FastOCR/blob/master/LICENSE)\n[![GitHub version](https://img.shields.io/github/v/tag/BruceZhang1993/FastOCR?label=Version&style=flat-square)](https://github.com/BruceZhang1993/FastOCR/releases)\n![PyPI](https://img.shields.io/pypi/v/fastocr?style=flat-square)\n\nFastOCR \u662f\u4e00\u6b3e\u5f00\u6e90\u514d\u8d39\u7684\u63d0\u4f9b\u5728\u7ebf OCR \u6587\u5b57\u8bc6\u522b\u7684\u684c\u9762\u5de5\u5177\n\n## \u652f\u6301\u7684 OCR API \u540e\u7aef\n\n- [x] \u767e\u5ea6 AI \u6587\u5b57\u8bc6\u522b\u670d\u52a1  https://ai.baidu.com/tech/ocr\n- [x] \u6709\u9053\u6587\u5b57\u8bc6\u522b\u670d\u52a1  https://ai.youdao.com/product-ocr-print.s\n- [x] \u65f7\u89c6 Face++ \u6587\u5b57\u8bc6\u522b\u670d\u52a1 (Experimental)  https://www.faceplusplus.com.cn/general-text-recognition/\n- [ ] \u672c\u5730 OCR\n\n### \u7279\u6027\n\n- [x] \u901a\u7528\u6587\u5b57\u8bc6\u522b / \u591a\u4e2a\u5728\u7ebf OCR API \u652f\u6301\n- [x] \u591a\u8bed\u8a00\u652f\u6301 / \u767e\u5ea6\n- [x] \u9ad8\u7cbe\u5ea6\u63a5\u53e3\u652f\u6301 / \u767e\u5ea6\n- [x] \u8bc6\u522b\u6587\u5b57\u641c\u7d22\n- [ ] \u672c\u5730 OCR \u540e\u7aef\n- [ ] \u81ea\u5b9a\u4e49\u5feb\u6377\u52a8\u4f5c\n\n## \u652f\u6301\u64cd\u4f5c\u7cfb\u7edf\n\n- Linux X11\n- Windows\n- macOS (Experimental)\n- Linux Wayland (Experimental)\n\n### \u652f\u6301\u7684 Wayland \u73af\u5883 (Linux)\n\n- Gnome Wayland\n- KDE Wayland\n- Sway\n\n## \u5b89\u88c5\n\n### Windows  \n 64 \u4f4d\u9884\u7f16\u8bd1\u7248\uff0c\u89e3\u538b\u5373\u53ef\u4f7f\u7528\n\n\u70b9\u51fb\u4e0b\u8f7d -> [Download](https://github.com/BruceZhang1993/FastOCR/releases/latest) \u89e3\u538b\u5230\u5b89\u88c5\u76ee\u5f55\uff0c\u6267\u884c FastOCR.exe\n\n### macOS\n\n\u7406\u8bba\u4e0a\u652f\u6301\u4f46\u65e0\u6784\u5efa\u73af\u5883\uff0c\u6253\u5305\u8fc7\u7a0b\u7c7b\u4f3c Windows \u5982\u4e0b\uff0c\u751f\u6210\u7684\u6587\u4ef6\u4f4d\u4e8e\u9879\u76ee\u7684 dist \u76ee\u5f55\u4e0b\n\n```shell\npip install poetry\npoetry update\npoetry run pyinstaller build.spec\n```\n\n### Arch Linux\n\n\u7a33\u5b9a\u7248\u672c https://aur.archlinux.org/packages/fastocr\n\n\u5f00\u53d1\u7248\u672c https://aur.archlinux.org/packages/fastocr-git\n\n \u4ece AUR \u4e0b\u8f7d\u811a\u672c\u7f16\u8bd1\u6216\u4f7f\u7528\u4f60\u559c\u6b22\u7684 AUR \u8f85\u52a9\u5de5\u5177\n\n```shell\nyay -S fastocr  # \u4f7f\u7528 yay\npikaur -S fastocr  # \u4f7f\u7528 pikaur\n```\n\n### Nix/NixOS\n \n\u4f7f\u7528 [NixOS CN flakes](https://github.com/nixos-cn/flakes) \u6216 [berberman flakes](https://github.com/berberman/flakes) \u5b89\u88c5\n\n```shell\nnix run github:berberman/flakes#fastocr\n```\n\n### \u901a\u7528 (PyPI)\n\n[fastocr @ PyPI](https://pypi.org/project/fastocr/)\n\n```shell\npip install --user fastocr\n# Linux \u590d\u5236 desktop \u6587\u4ef6\u5230 ~/.local/share/applications\n```\n\n### \u901a\u7528 (\u624b\u52a8\u5b89\u88c5)\n\n```shell\npython setup.py install\n# Linux \u590d\u5236 desktop \u6587\u4ef6\u5230 ~/.local/share/applications\n```\n\n### \u901a\u7528 (\u4ec5\u672c\u5730\u5f00\u53d1)\n\n \u81ea\u8c6a\u5730\u4f7f\u7528 [Poetry](https://python-poetry.org/docs/) \u8fdb\u884c\u5f00\u53d1\n\n```shell\npoetry install\n```\n\n## \u4f7f\u7528\u65b9\u6cd5\n\n```shell\nfastocr  # \u8fd0\u884c\nfastocr --help  # \u67e5\u770b\u5e2e\u52a9\n```\n\n## DBus (Linux only)\n\nService name: `io.github.brucezhang1993.FastOCR`\n\nObject: `/io/github/brucezhang1993/FastOCR`\n\n### \u65b9\u6cd5\n\n| Actions            | Arguments           | Description                                                 |\n|:-------------------|:--------------------|:------------------------------------------------------------|\n| captureToClipboard | {seconds} {no_copy} | \u6267\u884c OCR \u6355\u83b7\u5230\u7cfb\u7edf\u526a\u8d34\u677f\u6216\u89e6\u53d1 dbus \u4fe1\u53f7                      |\n|                    |                     | seconds: \u5ef6\u8fdf\u6267\u884c\u5355\u4f4d\u4e3a\u79d2                                    |\n|                    |                     | no_copy: \u5982\u679c\u4e3a true \u5219\u4ec5\u89e6\u53d1 dbus \u4fe1\u53f7\u800c\u4e0d\u590d\u5236\u5230\u7cfb\u7edf\u526a\u8d34\u677f    |\n| quitApp            | --                  | \u9000\u51fa\u5e94\u7528                                                    |\n\n### \u4fe1\u53f7\n\n| Signals  | Arguments | Description                            |\n|:---------|:----------|:---------------------------------------|\n| captured | {text}    | OCR \u8bc6\u522b\u7ed3\u679c\u6587\u672c\u4f1a\u89e6\u53d1\u6b64\u4fe1\u53f7             |\n|          |           | text: \u6587\u672c\u8bc6\u522b\u7ed3\u679c                      |\n\n## \u8d21\u732e\n\nPull requests are welcome.\n\nFor major changes, please open an issue first to discuss what you would\nlike to change.\n\n## License\n\nLGPL3\n",
    "bugtrack_url": null,
    "license": "LGPL-3.0-only",
    "summary": "FastOCR is a desktop application for OCR API.",
    "version": "0.3.8",
    "project_urls": {
        "Documentation": "https://github.com/BruceZhang1993/FastOCR",
        "Homepage": "https://github.com/BruceZhang1993/FastOCR",
        "Repository": "https://github.com/BruceZhang1993/FastOCR"
    },
    "split_keywords": [
        "ocr"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4dd7c5b630dacaf7cf24db4298a9074468c662eaedfb5305b3d933caffc2dd09",
                "md5": "689a19c8d02cf4579531a62b5ce1e2f7",
                "sha256": "5bf0c4eaa155ddc5a4da0d42bc8c6d3fc3c64a674e33afa37080d62d2108111d"
            },
            "downloads": -1,
            "filename": "fastocr-0.3.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "689a19c8d02cf4579531a62b5ce1e2f7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 50623,
            "upload_time": "2025-02-22T08:00:58",
            "upload_time_iso_8601": "2025-02-22T08:00:58.066311Z",
            "url": "https://files.pythonhosted.org/packages/4d/d7/c5b630dacaf7cf24db4298a9074468c662eaedfb5305b3d933caffc2dd09/fastocr-0.3.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "53b5d1f3576392a9db3b306e2243a7f1d42a241326019a6c3947fc903bb1040f",
                "md5": "ca15385b2ee85ac3249baa4cdf23f423",
                "sha256": "f3e47e12aecdf2147d7bfd6f470141f0b2be052f992c7d4ae3ca27589c4c7c13"
            },
            "downloads": -1,
            "filename": "fastocr-0.3.8.tar.gz",
            "has_sig": false,
            "md5_digest": "ca15385b2ee85ac3249baa4cdf23f423",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 44763,
            "upload_time": "2025-02-22T08:00:59",
            "upload_time_iso_8601": "2025-02-22T08:00:59.905609Z",
            "url": "https://files.pythonhosted.org/packages/53/b5/d1f3576392a9db3b306e2243a7f1d42a241326019a6c3947fc903bb1040f/fastocr-0.3.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-22 08:00:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "BruceZhang1993",
    "github_project": "FastOCR",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "fastocr"
}
        
Elapsed time: 0.79487s