unstructured/test_unstructured_ingest/test-ingest-against-api.sh
Matt Robinson aa01cdfc7a
fix: group together text from the same bounding box in partition_pdf with fast strategy (#542)
* switch to using PDF objects

* linting, linting, linting

* couple more tweaks

* added test for chevron-page

* version and changelog

* linting, linting, linting

* now processing 4 files
2023-05-03 18:33:24 -04:00

23 lines
505 B
Bash
Executable File

#!/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 \
--verbose \
--reprocess
set +e
if [ "$(find 'api-ingest-output' -type f -printf '.' | wc -c)" != 4 ]; then
echo
echo "4 files should have been created."
exit 1
fi