2023-03-30 07:53:23 +09:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2023-04-17 14:57:44 -07:00
|
|
|
set -e
|
|
|
|
|
2023-03-30 07:53:23 +09:00
|
|
|
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
|
|
|
cd "$SCRIPT_DIR"/.. || exit 1
|
|
|
|
|
|
|
|
PYTHONPATH=. ./unstructured/ingest/main.py \
|
2023-06-07 21:22:18 -07:00
|
|
|
--metadata-exclude filename,file_directory,metadata.data_source.date_processed \
|
2023-03-30 07:53:23 +09:00
|
|
|
--local-input-path example-docs \
|
|
|
|
--local-file-glob "*.html" \
|
|
|
|
--structured-output-dir local-ingest-output \
|
2023-05-15 15:26:53 -04:00
|
|
|
--partition-strategy hi_res \
|
2023-03-30 07:53:23 +09:00
|
|
|
--verbose \
|
|
|
|
--reprocess
|
|
|
|
|
2023-04-17 14:57:44 -07:00
|
|
|
set +e
|
|
|
|
|
2023-06-05 11:27:12 -07:00
|
|
|
if [ "$(find 'local-ingest-output' -type f -printf '.' | wc -c)" != 9 ]; then
|
2023-03-30 07:53:23 +09:00
|
|
|
echo
|
2023-06-05 11:27:12 -07:00
|
|
|
echo "9 files should have been created."
|
2023-03-30 07:53:23 +09:00
|
|
|
exit 1
|
|
|
|
fi
|