2023-06-30 17:08:27 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2023-07-31 13:20:10 -04:00
|
|
|
# Processes several files in a nested folder structure from dropbox://utic-test-ingest-fixtures/
|
2023-06-30 17:08:27 -07:00
|
|
|
# through Unstructured's library in 2 processes.
|
|
|
|
# Due to Dropbox's interesting sdk:
|
|
|
|
# if you want files and folders from the root directory use `"dropbox:// /"`
|
|
|
|
# if your files and folders are in a subfolder it is normal like `dropbox://nested-1`
|
|
|
|
|
|
|
|
# To get or refresh an access token use dropbox_token.py
|
|
|
|
|
|
|
|
# Structured outputs are stored in dropbox-output/
|
|
|
|
|
2023-12-11 20:04:15 -05:00
|
|
|
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
2023-06-30 17:08:27 -07:00
|
|
|
cd "$SCRIPT_DIR"/../../.. || exit 1
|
|
|
|
|
|
|
|
PYTHONPATH=. ./unstructured/ingest/main.py \
|
2023-12-18 23:48:21 -08:00
|
|
|
dropbox \
|
|
|
|
--remote-url "dropbox:// /" \
|
|
|
|
--output-dir dropbox-output \
|
|
|
|
--token "$DROPBOX_TOKEN" \
|
|
|
|
--num-processes 2 \
|
|
|
|
--recursive \
|
|
|
|
--verbose
|