doocus first ver
This commit is contained in:
22
Makefile
22
Makefile
@@ -24,7 +24,8 @@ FLAGS ?= --embed-images --scene-detection --scene-threshold 10 --diarize --trans
|
||||
# Per-run knobs (appended after FLAGS): language, plus any one-off extra flags
|
||||
# (e.g. --skip-cache-whisper, --transcript-formats srt).
|
||||
# NB: named AUDIO_LANG, not LANG — LANG is the shell locale env var.
|
||||
AUDIO_LANG ?=
|
||||
# Defaults to English; override (e.g. AUDIO_LANG=es) for other languages.
|
||||
AUDIO_LANG ?= en
|
||||
EXTRA ?=
|
||||
|
||||
# Optional: restrict scanned extensions / pick the python interpreter.
|
||||
@@ -32,7 +33,13 @@ EXT ?=
|
||||
PYTHON ?=
|
||||
export PYTHON
|
||||
|
||||
.PHONY: batch dry help
|
||||
# doocus (document extraction) knobs. DOCS_OUT defaults to docs-output; the input
|
||||
# tree is mirrored under it. DOC_EXTRA forwards one-off flags to process_doc.py
|
||||
# (e.g. --render for pdf page thumbnails, --ocr for images/scanned pdfs).
|
||||
DOCS_OUT ?= docs-output
|
||||
DOC_EXTRA ?=
|
||||
|
||||
.PHONY: batch dry docs docs-dry help
|
||||
|
||||
batch:
|
||||
@ctrl/batch.sh -i "$(IN)" -o "$(OUT)" $(if $(EXT),-e "$(EXT)") -- \
|
||||
@@ -41,5 +48,16 @@ batch:
|
||||
dry:
|
||||
@ctrl/batch.sh -i "$(IN)" -o "$(OUT)" $(if $(EXT),-e "$(EXT)") -n
|
||||
|
||||
# Document extraction (doocus), mirrors the input tree into DOCS_OUT.
|
||||
# make docs IN="/mnt/win/drive" # extract all docs
|
||||
# make docs IN="..." DOC_EXTRA="--render --ocr" # thumbnails + OCR
|
||||
# make docs-dry IN="..." # list what would run
|
||||
docs:
|
||||
@ctrl/batch_docs.sh -i "$(IN)" -o "$(DOCS_OUT)" $(if $(EXT),-e "$(EXT)") -- \
|
||||
$(DOC_EXTRA)
|
||||
|
||||
docs-dry:
|
||||
@ctrl/batch_docs.sh -i "$(IN)" -o "$(DOCS_OUT)" $(if $(EXT),-e "$(EXT)") -n
|
||||
|
||||
help:
|
||||
@sed -n '3,14p' Makefile
|
||||
|
||||
Reference in New Issue
Block a user