- Submodule services/chandra/upstream (shallow), run-chandra.sh, .env.example - Docs: service-chandra, chandra-ocr-documents; link from PageIndex feature - Index updates in docs/README, repo/README, services, system-architecture
19 lines
599 B
Bash
Executable File
19 lines
599 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Run Chandra OCR CLI from vendored upstream (PDF / images → md/html/json).
|
|
set -euo pipefail
|
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
UP="${ROOT}/upstream"
|
|
if [[ ! -d "${UP}/chandra" ]]; then
|
|
echo "Missing ${UP}/chandra — run: git submodule update --init services/chandra/upstream" >&2
|
|
exit 1
|
|
fi
|
|
cd "${UP}"
|
|
if [[ -x "${UP}/.venv/bin/chandra" ]]; then
|
|
exec "${UP}/.venv/bin/chandra" "$@"
|
|
fi
|
|
if command -v uv >/dev/null 2>&1; then
|
|
exec uv run chandra "$@"
|
|
fi
|
|
echo "Install first: cd ${UP} && uv sync (or python -m venv .venv && pip install -e .)" >&2
|
|
exit 1
|