Последняя версияLatest: 0.6.08.252300
Стабильная версияStable: -
Установка
Install
Последняя:
Latest:
curl -fsSL https://packages.novij.tech/services/ocr/install.sh | sudo bash -s -- install neji-ocr.novij.tech
Стабильная:
Stable:
NOVIJ_PACKAGE_CHANNEL=stable curl -fsSL https://packages.novij.tech/services/ocr/install.sh | sudo bash -s -- install neji-ocr.novij.tech
Релизы
Releases
stable
- Релизов пока нет.
- No releases yet.
Команды
Commands
novij-ocrctl migrate- Применяет SQL-миграции PostgreSQL.Applies PostgreSQL SQL migrations.
novij-ocrctl cleanup- Запускает разовую очистку временных файлов и устаревших job.Runs one cleanup pass for temporary files and expired jobs.
novij-ocrctl health-json- Печатает локальный health payload в JSON.Prints the local health payload as JSON.
novij-ocrctl inspect-wallet- Проверяет service wallet и публичный ключ подписи.Inspects the service wallet and signing public key.
novij-ocr-service registry status- Показывает состояние регистрации в Service Registry.Shows Service Registry registration status.
novij-ocr-service registry register- Регистрирует или обновляет service-agent запись.Registers or updates the service-agent record.
novij-ocr-service registry challenge --challenge-id ID --nonce NONCE- Подписывает challenge Service Registry.Signs a Service Registry challenge.
Частые сценарии
Common Scenarios
1. Что закрывает сервис1. What the service covers
Novij OCR Service ставится как отдельный backend с API и worker. Он принимает изображения, ставит задачи распознавания в PostgreSQL-очередь и возвращает текст, страницы, блоки, confidence и извлечённые признаки.
Novij OCR Service runs as a standalone backend with API and worker processes. It accepts images, queues recognition jobs in PostgreSQL, and returns text, pages, blocks, confidence, and extracted fields.
images | PNG, JPEG, WebP и другие форматы, которые проходят magic-byte проверку.PNG, JPEG, WebP, and other formats accepted by magic-byte validation. |
|---|---|
pdf | PDF распознаётся постранично.PDF files are recognized page by page. |
payments | Поддерживаются DSR и tx_hash режимы оплаты через Novij Relay.DSR and tx_hash payment modes are supported through Novij Relay. |
registry | well-known endpoints и CLI-команды поддерживают регистрацию official service-agent.well-known endpoints and CLI commands support official service-agent registration. |
2. Установка на домен2. Install for a domain
Инсталлятор проверяет Ubuntu 24.04, DNS, nginx-конфликты и свободный API-port, ставит runtime-зависимости, PostgreSQL, systemd units, nginx/SSL и service wallet.
The installer validates Ubuntu 24.04, DNS, nginx conflicts, and a free API port, then installs runtime dependencies, PostgreSQL, systemd units, nginx/SSL, and the service wallet.
curl -fsSL https://packages.novij.tech/services/ocr/install.sh | sudo bash -s -- install neji-ocr.novij.tech
3. Создать OCR-задачу3. Submit an OCR job
Клиент передаёт файл multipart-запросом. Для production укажите платежные поля согласно выбранному payment mode.
A client uploads a file through a multipart request. For production, include payment fields according to the selected payment mode.
curl -fsS -X POST https://neji-ocr.novij.tech/api/v1/jobs \
-F file=@document.pdf \
-F mode=balanced \
-F languages=rus+eng
4. Получить статус и результат4. Read status and result
curl -fsS https://neji-ocr.novij.tech/api/v1/jobs/JOB_ID
curl -fsS https://neji-ocr.novij.tech/api/v1/jobs/JOB_ID/result
5. Проверить API и Registry5. Check API and Registry
curl -fsS https://neji-ocr.novij.tech/api/v1/health
curl -fsS https://neji-ocr.novij.tech/api/v1/settings
curl -fsS https://neji-ocr.novij.tech/.well-known/novij/status.json
curl -fsS https://neji-ocr.novij.tech/api/v1/service-registry/status
6. Обновление и rollback6. Update and rollback
curl -fsSL https://packages.novij.tech/services/ocr/install.sh | sudo bash -s -- update
curl -fsSL https://packages.novij.tech/services/ocr/install.sh | sudo bash -s -- rollback