mirror of
https://github.com/Unstructured-IO/unstructured.git
synced 2025-08-18 21:57:58 +00:00

* Add --partition-by-api and --partition-host args to ingest * Fix error in make check * Bump changelog * Add a test ingest script Also add a workaround for the test causing 400s from our api. Seems we need to make sure unstructured-api can handle getting a file.content_type of None. * Remove the content type workaround
19 lines
489 B
Bash
Executable File
19 lines
489 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
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
|
|
|
|
if [ "$(find 'api-ingest-output' -type f -printf '.' | wc -c)" != 2 ]; then
|
|
echo
|
|
echo "2 files should have been created."
|
|
exit 1
|
|
fi
|