Command-line tools for marked-up PDFs and scanned handwritten notes: pdf-scrub, pdf-notes-md, scan-notes-md (Ollama by default, Claude on request), scan-notes-index (per-page search metadata), and scan-notes-stats. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011ZSvbNaLhgFuTm7wmkgbWs
19 lines
592 B
Bash
Executable file
19 lines
592 B
Bash
Executable file
#!/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 <stem>.md; everything else uses Claude.
|
|
set -euo pipefail
|
|
|
|
if [[ $# -lt 1 ]]; then
|
|
echo "usage: $0 <image-or-pdf> [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
|