mirror of
https://github.com/RapidAI/RapidOCR.git
synced 2026-11-10 21:10:55 +08:00
* feat(python): draw Arabic text in vis() with khatt from the rtl extra Recognized Arabic, Persian and Urdu text is returned in reading order, but vis() draws it with ImageDraw.text, which only joins Arabic letters and lays out right-to-left text when Pillow is built with Raqm. Without it the visualization shows separate letters in reverse order, running out of the box. When khatt is installed (now part of the rtl extra on Python 3.10+), right-to-left lines are shaped, start at the right edge of their box, are centered vertically and shrink to fit the box. Other text, and RTL text without khatt, is drawn by Pillow as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * style(python): ruff format the vis RTL changes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(python): let RTL text shrink below 10px to fit small boxes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
78 lines
1.7 KiB
TOML
78 lines
1.7 KiB
TOML
[build-system]
|
|
requires = [
|
|
"setuptools>=77",
|
|
"wheel",
|
|
"setuptools-scm>=8",
|
|
]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "rapidocr"
|
|
dynamic = ["version", "dependencies"]
|
|
description = "Awesome OCR Library"
|
|
readme = { file = "README.md", content-type = "text/markdown" }
|
|
requires-python = ">=3.8,<4"
|
|
license = "Apache-2.0"
|
|
license-files = ["LICENSE", "MODEL_LICENSES.md"]
|
|
authors = [
|
|
{ name = "SWHL", email = "liekkaskono@163.com" },
|
|
]
|
|
keywords = [
|
|
"ocr",
|
|
"text_detection",
|
|
"text_recognition",
|
|
"db",
|
|
"onnxruntime",
|
|
"paddleocr",
|
|
"openvino",
|
|
"rapidocr",
|
|
]
|
|
classifiers = [
|
|
"Programming Language :: Python :: 3.8",
|
|
"Programming Language :: Python :: 3.9",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
]
|
|
|
|
[project.urls]
|
|
Documentation = "https://rapidai.github.io/RapidOCRDocs"
|
|
Changelog = "https://github.com/RapidAI/RapidOCR/releases"
|
|
|
|
[project.scripts]
|
|
rapidocr = "rapidocr.main:main"
|
|
|
|
[project.optional-dependencies]
|
|
rtl = [
|
|
"python-bidi>=0.4.2,<1.0",
|
|
# Shapes Arabic text in vis(); needs Python 3.10+
|
|
"khatt>=0.4.0; python_version >= '3.10'",
|
|
]
|
|
|
|
[tool.setuptools]
|
|
include-package-data = true
|
|
platforms = ["Any"]
|
|
|
|
[tool.setuptools.dynamic]
|
|
dependencies = { file = ["requirements.txt"] }
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["."]
|
|
include = ["rapidocr*"]
|
|
exclude = ["tests*"]
|
|
namespaces = false
|
|
|
|
[tool.setuptools.package-data]
|
|
rapidocr = [
|
|
"**/*.yaml",
|
|
"**/*.pyi",
|
|
"py.typed",
|
|
]
|
|
|
|
[tool.setuptools_scm]
|
|
root = ".."
|
|
tag_regex = "^v?(?P<version>[0-9]+(?:\\.[0-9]+)*.*)$"
|
|
version_file = "rapidocr/_version.py"
|
|
local_scheme = "no-local-version"
|