unstructured/test_unstructured_ingest/test-ingest-against-api.sh

24 lines
539 B
Bash
Raw Normal View History

#!/usr/bin/env bash
set -e
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
cd "$SCRIPT_DIR"/.. || exit 1
PYTHONPATH=. ./unstructured/ingest/main.py \
--local-input-path example-docs \
--local-file-glob "*.pdf" \
--structured-output-dir api-ingest-output \
--partition-by-api \
--partition-strategy hi_res \
--verbose \
--reprocess
set +e
2023-06-05 09:14:43 -07:00
if [ "$(find 'api-ingest-output' -type f -printf '.' | wc -c)" != 7 ]; then
echo
2023-06-05 09:14:43 -07:00
echo "7 files should have been created."
exit 1
fi