#!/usr/bin/env bash # scan-to-md.sh — transcribe scanned pages to Markdown. # # scan-notes-md itself decides the backend: scans in the confidential # folders listed in ~/.config/pdf-tools/scan-notes.toml go to Ollama and # their companion .md; everything else uses Claude. set -euo pipefail if [[ $# -lt 1 ]]; then echo "usage: $0 [more inputs...]" >&2 exit 64 fi if command -v scan-notes-md >/dev/null 2>&1; then scan-notes-md "$@" else : "${PDF_TOOLS_DIR:?set PDF_TOOLS_DIR or install scan-notes-md}" (cd "$PDF_TOOLS_DIR" && uv run scan-notes-md "$@") fi