2023-02-28 09:25:11 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2023-04-17 14:57:44 -07:00
|
|
|
set -e
|
|
|
|
|
2023-02-28 09:25:11 +01:00
|
|
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
|
|
cd "$SCRIPT_DIR"/.. || exit 1
|
|
|
|
|
|
|
|
PYTHONPATH=. ./unstructured/ingest/main.py \
|
2023-03-22 03:30:53 +09:00
|
|
|
--metadata-exclude filename \
|
2023-02-28 09:25:11 +01:00
|
|
|
--wikipedia-page-title "Open Source Software" \
|
|
|
|
--structured-output-dir wikipedia-ingest-output \
|
|
|
|
--num-processes 2 \
|
|
|
|
--verbose
|
|
|
|
|
2023-04-17 14:57:44 -07:00
|
|
|
set +e
|
|
|
|
|
2023-02-28 09:25:11 +01:00
|
|
|
if [ "$(find 'wikipedia-ingest-output' -type f -printf '.' | wc -c)" != 3 ]; then
|
|
|
|
echo
|
|
|
|
echo "3 files should have been created."
|
|
|
|
exit 1
|
|
|
|
fi
|